That's surprising. I took your HTML code and the page doesn't do a full postback. Here is the code
And code behindCode:<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ForumTest.aspx.vb" Inherits="ForumTest" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <div> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:TextBox ID="txt" runat="server" Width="20em"> </asp:TextBox> <asp:Label ID="lbl" runat="server"> </asp:Label> <asp:Button ID="btn" runat="server" Text="Click Me!" /> </ContentTemplate> </asp:UpdatePanel> </div> </form> </body> </html>
Code:Partial Class ForumTest Inherits System.Web.UI.Page Protected Sub OnClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn.Click txt.Text = "Updated time:" + DateTime.Now() End Sub End Class




Reply With Quote