I have two radio buttons yes/no on my web page showing yes or no based on the values in the database field 'registration sent' boolean type 0 or 1.
If the user wants to change this value on the page, i want to send a confirm box "are you sure you want to make changes?".
Originally, i had an input type submit button to change the values after selecting the radio button.
After research i was able to get this done.
but, the requirement from my boss is to show the confirm box just after the selection of a radio button with out the input submit button in addition. he does not want any additional button. just the radio buttons.
my code was on the page load i had
1.
me.btnchangeregistration.attributes.add("onclick","return confirm('are you sure?');")
and
2.
in html i had a input type submit button.
and
3.
private sub btnchangeregistration_serverclick(byval sender as system.object, byval e as system.eventargs)handles btnchangeregistration.serverclick
if me.rdoReg.checked then
sql to update the field to 1
else
sql to update the field to 0
end if
end sub
The above actually works. shows the confirmbox when user selects one of the radio's and click the button to change the values, confirm box appears and based on the user decision ok/cancel changes the database field.
*Now this requirment is changed.
I want to be able to do this with out the button. How can i do this with just the selection of the radio button to show the confirm box and based on the ok/cancel be able to update the field in the database?
help me out with this or direct me to an online article were i can see a sample.
Thanks
If the user wants to change this value on the page, i want to send a confirm box "are you sure you want to make changes?".
Originally, i had an input type submit button to change the values after selecting the radio button.
After research i was able to get this done.
but, the requirement from my boss is to show the confirm box just after the selection of a radio button with out the input submit button in addition. he does not want any additional button. just the radio buttons.
my code was on the page load i had
1.
me.btnchangeregistration.attributes.add("onclick","return confirm('are you sure?');")
and
2.
in html i had a input type submit button.
and
3.
private sub btnchangeregistration_serverclick(byval sender as system.object, byval e as system.eventargs)handles btnchangeregistration.serverclick
if me.rdoReg.checked then
sql to update the field to 1
else
sql to update the field to 0
end if
end sub
The above actually works. shows the confirmbox when user selects one of the radio's and click the button to change the values, confirm box appears and based on the user decision ok/cancel changes the database field.
*Now this requirment is changed.
I want to be able to do this with out the button. How can i do this with just the selection of the radio button to show the confirm box and based on the ok/cancel be able to update the field in the database?
help me out with this or direct me to an online article were i can see a sample.
Thanks