G
Guest
I have a textbox and a button on my asp.net form. I have some Smtp code in my
button click procedure. When the user hits the return for the textbox the
button procedure runs. When the button is clicked the button procedure also
runs. This fine so I get the Smtp code to run either way. The problem is that
the user sometimes hits return AND clicks the "submit" button so the Smtp
code gets executed twice. Should I use Application state and a boolean to
make sure that the Smtp code only runs once?
I tried the various events and assigning them to each of the the textbox
changed and button click, but I could find the correct combination. Even if
no event is assigned to the textchanged or button click the code Smtp code
runs when the two events occur so I don't know the easy way around this. Help!
Thanks
button click procedure. When the user hits the return for the textbox the
button procedure runs. When the button is clicked the button procedure also
runs. This fine so I get the Smtp code to run either way. The problem is that
the user sometimes hits return AND clicks the "submit" button so the Smtp
code gets executed twice. Should I use Application state and a boolean to
make sure that the Smtp code only runs once?
I tried the various events and assigning them to each of the the textbox
changed and button click, but I could find the correct combination. Even if
no event is assigned to the textchanged or button click the code Smtp code
runs when the two events occur so I don't know the easy way around this. Help!
Thanks