Long title... sorry about that.
Here is what I need to do. I have a master page with several buttons on it (btn1-3). I have a content page that has three fields on it.
I need to fire a btn_click event when btn1 is clicked on the content page... how do I do that?
Here is some of my code this far:
Master Page:
Content Page:
I keeping getting the following error:
Here is what I need to do. I have a master page with several buttons on it (btn1-3). I have a content page that has three fields on it.
I need to fire a btn_click event when btn1 is clicked on the content page... how do I do that?
Here is some of my code this far:
Master Page:
HTML:
<asp:ButtonID="btn1"runat="server"Text="page1"OnClick="btn1"PostBackUrl="~/page1.aspx"/>
<asp:ButtonID="btn2"runat="server"Text="page2"OnClick="btn2"PostBackUrl="~/page2.aspx"/>
<asp:ButtonID="btn3"runat="server"Text="page3"OnClick="btn3"PostBackUrl="~/page3.aspx"/>
VB.NET:
ProtectedSub btn1()
Session.Add("Name", txtName.Text)
Session.Add("Major", txtMajor.Text)
Session.Add("Email", txtEmail.Text)
EndSub
ProtectedSub btn2_Click()
Session.Add("Name", txtName.Text)
Session.Add("Major", txtMajor.Text)
Session.Add("Email", txtEmail.Text)
EndSub
ProtectedSub btn3()
Session.Add("Name", txtName.Text)
Session.Add("Major", txtMajor.Text)
Session.Add("Email", txtEmail.Text)
EndSub
I keeping getting the following error:
Error 1 'btn1' is not a member of 'ASP.students_master'. D:\Documents and Settings\ckeezer\My Documents\Visual Studio 2005\WebSites\testsite\test.master 15
Last edited by a moderator: