| | |
Enter doesn't execute button.click
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
For some reason, when I am in the password text box, when I press enter, it simply clears both fields. Doesn't validate, doesn't login, just clears the fields. What is going on here?
Codebehind:
And the aspx page is attached. Please help.
Slade
Codebehind:
PrivateSub cmdLogin_ServerClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdLogin.ServerClick If FormsAuthentication.Authenticate(txtUser.Text, txtPass.Text) Then FormsAuthentication.RedirectFromLoginPage(txtUser.Text, chkPersist.Checked) Else lblStatus.Text = "Not Authenticated" IfCInt(ViewState("Tries")) > 1 Then Response.Redirect("Denied.aspx") Else ' Otherwise, increment number of tries. ViewState("Tries") = CInt(ViewState("Tries")) + 1 EndIf EndIf EndSub
And the aspx page is attached. Please help.
Slade
Formerly known as Slade.
Is the viewstate enabled? Is the page properly posting back? Try putting in a Response.Write somewhere...
-Ryan Hoffman
.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
Ah, well, when you hit enter, the button isn't a default button :-P. You'll either need to write some javascript here, or use the free MetaBuilder's DefaultButtons Control.
-Ryan Hoffman
.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
•
•
•
•
Originally Posted by slade
As always tekmaven you were helpful, that control is awesome. Where do you find out about all of them?
And, the thanks for the kind words. Don't forget to share that thought with the member rating system ("reputation")..
. -Ryan Hoffman
.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
![]() |
Similar Threads
- execute one insert query and two update query, in one single button click. (VB.NET)
- Passing value of string from one button click event to another (ASP.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: ASP.NET problem
- Next Thread: mod_rewrite in asp .net using vb
| Thread Tools | Search this Thread |
.net 2.0 3.5 ajax alltypeofvideos appliances asp asp.net beginner box browser businesslogiclayer button c# c#gridviewcolumn cac checkbox class compatible confirmationcodegeneration content contenttype control countryselector courier dataaccesslayer database datagrid datagridview datalist deployment development dgv dialog dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash flv forms gridview gudi homeedition iis javascript jquery list listbox menu microsoft mouse mssql nameisnotdeclared news novell numerical opera order problem radio ratings redirect registration relationaldatabases reportemail schoolproject search security serializesmo.table sessionvariables silverlight smoobjects software sql sql-server ssl tracking treeview validatedate validation vb.net videos vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment webprogramming wizard xml xsl





