•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 362,352 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,783 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 6950 | Replies: 6
![]() |
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
ASP.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
ASP.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
ASP.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
ASP.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?
Just about every employee that works on .NET at Microsoft has blogs. Just get a good RSS agregator, and check them all. With a little time each day (okay, maybe a lot), I guaruntee you will learn a lot.
And, the thanks for the kind words. Don't forget to share that thought with the member rating system ("reputation")..
. -Ryan Hoffman
ASP.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
ASP.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
.net .net framework 3.0 access ajax asp business code combo custom cyber-squatting data developer development dom domains dropdownlist feed microsoft module msdn net office pay-per-click reader reuse security skin software sql strider theme trademark typo-squatting vista weather web windows workflow xml xoap
- Passing value of string from one button click event to another (ASP.NET)
- how to set default focus on button in winform (C#)
Other Threads in the ASP.NET Forum
- Previous Thread: ASP.NET problem
- Next Thread: mod_rewrite in asp .net using vb


Linear Mode