Conditional doPostBack on Datagrid

W

Whale Skinner

I have a ButtonColumn on my datagrid that I would like to post back
conditionally. What I would like to see is a JavaScript confirm
message that only posts the page when they click the Yes or OK button.

Is that possible? If so, how?

Thank you much
 
A

Alvin Bruney [MVP]

RechargeButton.Attributes.Add("onClick", "event.returnValue=confirm('Are you
sure you wish to recharge this credit
card?');document.body.style.cursor='wait';");

where rechargeButton is your webserver control. This code goes in the
page_load routine
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top