.NET NEWBIE - EASY QUESTION

G

Guest

I have been programming in ASP for years and am making the move to .NET and am having a problem. I have an item on a form that i am validating against and i am receiving the following error message. What am i doing wrong

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30456: 'LoginBtn_Click' is not a member of 'ASP.login_aspx'

Source Error

Line 58: </tbody
Line 59: </table
Line 60: <asp:button id="LoginBtn" onclick="LoginBtn_Click" runat="server" text="Login"></asp:button
Line 61: <p
Line 62: <asp:Label id="Msg" runat="server" forecolor="red"></asp:Label

I had been advised that i was receiving this message because my code is not located in between the form tags and it is. The form is shown below

<form runat="server"><h2>&nbsp
</h2><h2>Login Page
</h2><hr size="1" /><table><tbody><tr><td
Username:</td><td><asp:TextBox id="UserName" runat="server"></asp:TextBox></td><td><asp:RequiredFieldValidator id="Requiredfieldvalidator1" runat="server" ErrorMessage="*" Display="Static" ControlToValidate="UserName"></asp:RequiredFieldValidator></td></tr><tr><td
Password:</td><td><asp:TextBox id="UserPass" runat="server" TextMode="Password"></asp:TextBox></td><td><asp:RequiredFieldValidator id="Requiredfieldvalidator2" runat="server" ErrorMessage="*" Display="Static" ControlToValidate="UserPass"></asp:RequiredFieldValidator></td></tr></tbody></table><asp:button id="LoginBtn" onclick="LoginBtn_Click" runat="server" text="Login"></asp:button><p><asp:Label id="Msg" runat="server" forecolor="red"></asp:Label></p></form

I am developing with Web Matrix if that helps. Thanks
Ryan
 
S

Sharon

you need to add a handler for this event:
Private Sub LoginBtn_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs)

End Sub


Ryan Smith said:
I have been programming in ASP for years and am making the move to .NET
and am having a problem. I have an item on a form that i am validating
against and i am receiving the following error message. What am i doing
wrong?
Description: An error occurred during the compilation of a resource
required to service this request. Please review the following specific error
details and modify your source code appropriately.
Compiler Error Message: BC30456: 'LoginBtn_Click' is not a member of 'ASP.login_aspx'.

Source Error:

Line 58: </tbody>
Line 59: </table>
Line 60: <asp:button id="LoginBtn" onclick="LoginBtn_Click"
runat="server" text="Login"> said:
Line 61: <p>
Line 62: <asp:Label id="Msg" runat="server"
forecolor="red"> said:
I had been advised that i was receiving this message because my code is
not located in between the form tags and it is. The form is shown below:
<form runat="server"><h2>&nbsp;
</h2><h2>Login Page
</h2><hr size="1" /><table><tbody><tr><td>
Username:</td><td><asp:TextBox id="UserName"
runat="server"></asp:TextBox></td><td><asp:RequiredFieldValidator
id="Requiredfieldvalidator1" runat="server" ErrorMessage="*"
Display="Static"
ControlToValidate="UserName"> said:
Password:</td><td><asp:TextBox id="UserPass"
runat="server"
TextMode="Password"></asp:TextBox></td><td><asp:RequiredFieldValidator
id="Requiredfieldvalidator2" runat="server" ErrorMessage="*"
Display="Static"
ControlToValidate="UserPass"></asp:RequiredFieldValidator></td></tr></tbody>
</table><asp:button id="LoginBtn" onclick="LoginBtn_Click" runat="server"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top