vin

vin

  • NA
  • 1
  • 0

command buttons On_click

Apr 6 2008 7:12 PM
Hi, I wonder if anyone can help me....

I am working in .NET with c# and aspx web pages.
On the web page I have 2 buttons - a submit button and a next button.
I also have a textbox.

What I intend is that when the page loads up and I click on "next", a numerical question is displayed. I then enter the answer in the textbox and click on "submit" to check if correct or not.

However, if the text box is empty (which it is at the start) the program behaves as if the "submit" button has already been clicked, so it's looking for a number.

The only way I can get this to work is by entering any old number into the textbox and THEN clicking on "next", which seems a bit messy. I have tried having a number in the textbox on the form_load procedure, but this means that this number appears every time!

Incidentally this kind of thing (where buttons that have NOT been clicked are treated as if they HAVE been clicked ) seems to happen in a few programs, and I can't see the logical reason why.
Any ideas, anyone,please?


Answers (1)