|
-
Jun 26th, 2003, 09:45 AM
#1
Thread Starter
PowerPoster
[Resolved]Submit button clicked?
I have login code that checks the DB for the Username/Password on this log in page.
The login page is the regular 2 textbox thing with a Submit button.
The code works but i need to be able to tell if the form was Posted by hitting the Submit button.
I currently have the Code in the Page_Load event, so i am trying to keep the code from running every time the page loads and only have it run when the user clicks the Submit Button.
I tried using
If IsPostBack Then
'do stuff
End if
but that doesn't work.
In PHP you simply put
If ($Submit) { // Where Submit is the name of the Forms Post Button
//do stuff
}
I also tried putting the code in the Submit_Click event but nothing at all happens then...
Which would be the best way to do this? I would think it would be the Click Event of the button, but why doesn't it do anything?
I have the form posting to itself, meaning that when you click the Submit button the page basically refreshes.
Thanks!
Last edited by Arc; Jun 26th, 2003 at 10:15 AM.
-We have enough youth. How about a fountain of "Smart"?
-If you can read this, thank a teacher....and since it's in English, thank a soldier.

-
Jun 26th, 2003, 09:48 AM
#2
Putting code in the button click event does work. Are you using the Web Form asp.net buttons or HTML buttons. If uing HTML buttons, you need the Web Form one.
-
Jun 26th, 2003, 10:15 AM
#3
Thread Starter
PowerPoster
yah i was using an html but that i had set to runat=server. I used a button from the toolbox and it seems to work now.
Thanks!
-We have enough youth. How about a fountain of "Smart"?
-If you can read this, thank a teacher....and since it's in English, thank a soldier.

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|