Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 05-04-2011, 10:44 PM
tomn tomn is offline
Junior Member
 
Join Date: 05-04-11
Posts: 1
iTrader: 0 / 0%
updatepanel not working

hi,

could someone please tell me whats wrong this code, the button to make just a part of the page postback asynchronously, is posting the entire page and not just the section inside of the updatepanel.

thank you very much in advanced.
Code:
<%@ Page Language="VB" %> <%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %> <script runat=server> Protected Sub btn2_click(ByVal sender As Object, ByVal e As System.EventArgs) lbl2.Text = DateTime.Now End Sub Sub Page_load(ByVal obj As Object, ByVal e As EventArgs) lbl1.Text = DateTime.Now End Sub </script> <html xmlns="http://www.w3.org/1999/xhtml" > <body> <form id="form1" runat="server"> <asp:ScriptManager runat=server ID=scriptmanager EnablePartialRendering=true > </asp:ScriptManager> <br /><br /> page loaded at: <asp:Label ID=lbl1 runat=server></asp:Label>&nbsp;&nbsp;&nbsp;<asp:button ID=btn1 runat=server Text= "post back" /> <br /> <br /> <br /> <br /> <asp:UpdatePanel runat="server" UpdateMode=conditional ID=updatep> <ContentTemplate > async page loaded at:&nbsp;&nbsp;<asp:Label ID=lbl2 runat=server></asp:Label> <asp:button ID=btn2 runat=server Text= "post back" OnClick=btn2_click /> </ContentTemplate> <Triggers > <asp:AsyncPostBackTrigger ControlID="lbl2" EventName="Click" /> </Triggers> </asp:UpdatePanel> </form> </body> </html>
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 05-09-2011, 09:35 PM
webcosmo's Avatar
webcosmo webcosmo is offline
Contributing Member
 
Join Date: 03-17-07
Location: Boston, MA
Posts: 2,071
iTrader: 5 / 100%
Trying having the Label inside updatepanel and getting rid of the trigger.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SEO Not Working For You? Here’s Why snakeair SEO Forum 11 01-28-2011 11:03 PM
WTB: working & non working phones (UK only) gullsinn The Webmaster Marketplace 0 09-30-2010 12:25 PM
Been Working DigitalAlien Forum Lobby 4 09-07-2010 03:21 AM
What If your Net is not working ??? Palak Tech Talk 32 08-20-2009 03:40 AM
Two HTML similar codes , one working well and another not working why? Banjika Web Design Lobby 1 06-11-2005 07:14 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 10:45 PM.
Powered by vBulletin
Copyright © 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC