Re: I want to AJAX enable the site but UpdatePanel doesn't work
|
Dorner Sodcup |
|
5/26/2008 3:11:22 AM |
Then I added a totally new webpage and put this "Hello world" code into it: <body>
<form id="form1" runat="server"> <asp:scriptmanager id="ScriptManager1" runat="server"> </asp:scriptmanager> <div> <asp:label id="Label1" runat="server" text="Label"></asp:label>
<asp:updatepanel id="UpdatePanel1" runat="server"> <ContentTemplate> <asp:label id="Label2" runat="server" text="Label"></asp:label> <br /> <asp:button id="Button1" runat="server" text="Button" /> </ContentTemplate> </asp:updatepanel>
</div>
</form> </body>
And the code behind as follows: Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Label2.Text = DateTime.Now.ToString End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Label1.Text = DateTime.Now.ToString End Sub Even this simple page doesn't work. Then just before my hair were getting grey, I fire d up a brand new webiste in VS 2008, and put in t he code above, and to my surprise the page works a s a charm So my wondering is now, do I have to manually to s ome fix to my older website to really enable AJAX to that site? Thanks in advance Post Comments |
|
Re: I want to AJAX enable the site but UpdatePanel doesn't work
|
Wabou Lee |
|
5/26/2008 3:11:52 AM |
Take a look at the web.config that was generated for the new ASP.NET 3.5 site, and merge that with the upgraded site's web.config. That should get your existing site working. Post Comments |
|
Thank you very much! That did the trick, and now I am up and running with my AJAX enabling! Post Comments |
|