I have experience with
VB.Net on WinForms but new to web and ASP.Net programming. I am working thorugh Jacob Sanford's ASP.Net 2.0 Design book (excellent book BTW!).
My problem is that I put a textbox,button and label on a master page
<tr>
<td colspan="2" height="150" bgcolor="Gray" valign="middle" align="center">
Header Text:
<p>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</p>
<p>
<asp:Button ID="Button1" runat="server" Text="Update Header Text"
OnClick="Button1_Click"/>
</p>
<p>
<asp:Label ID="Label1" runat="server" Text=""></asp:Label>
</p>
</td>
</tr>
I then added the OnClick event code to the master page's code page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Label1.Text = TextBox1.Text
TextBox1.Text = ""
End Sub
I test it with IE6. When the button is clicked, the OnClick event gets called twice. I know this because I put a break in debug mode and saw it.
What is my problem?
TIA,
John