Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Submit button in embedded User Control doesnt work (C#)

Thread Tools

Submit button in embedded User Control doesnt work (C#)
Posts: n/a
I have a user control on every single page on my website. Its called
sidenav.ascx. It has a sidemenu and some extras. One of the extras is a
login div that shows only when one of the images on the menu is

It has an asp button to submit username ans password:

<asp:button id="btnLogin" runat="server" cssClass="input1" Text="Login"
Width="50" OnClick="btnLogin_Click"></asp:button>

I have a codebehind for the user control (sidenav.ascx.cs) with a class
supposed to be called when btnLogin is clicked:

public void btnLogin_Click(object sender, System.EventArgs e)

but it doesnt call the class. all it does is a postback and refreshes
the page it's on.

Can anybody help me out?

Reply With Quote
Posts: n/a
If you click btnLogin in design view (assuming you are using visual
studio), does it go to the correct codebehind code for btnLogin_Click?

Reply With Quote
Posts: n/a
Yes it does. Just tried it.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
sort list doesnt work, key=str still doesnt work Python 3 05-27-2008 04:32 AM
Deployment issue: The submit button event doesnt fire on server. =?Utf-8?B?U3Bhcmt5IDcxNzc=?= ASP .Net 1 04-11-2007 11:04 AM
PC doesnt boot first time and doesnt shutdown dann Computer Support 6 08-21-2006 07:31 AM
embedded python example: PyString_FromString doesnt work? David Harris Python 5 03-25-2005 09:52 AM
HTML Reset Button Doesn't work after postback with Submit button Chris Lane ASP .Net 4 11-17-2003 11:52 PM