Dan Fesko

Dan Fesko

  • NA
  • 15
  • 473

Conditional Confirmation Box, comparing two controls

Nov 15 2017 11:51 AM
Hi, I've been at this for a few days and i cant figure out a decent way to tackle this. Here is the scenario.
 
I'm submitting a record to sql via a button onclick function. The users are entering a quantity into a textbox then submitting, I want to compare the number they enter in the textbox to another number i have stored in a invisible label on the page and if the number they entered is greater than the label number then pop a confirmation box. If they select Yes then go ahead with the sql submission/postback, if they select No then dont do anything and let them correct their mistake.
 
The issue i'm running into is i cant find a way to do this conditionally and only have the prompt pop up if they enter a higher number than the one im comparing to... I can make it so the confirm ALWAYS pops up but not conditionally. Any help would be much appreciated. 
If you need code examples or any more info please let me know.

Answers (1)