Javascript return value

  • Thread starter Thread starter DotNetJunkies User
  • Start date Start date
D

DotNetJunkies User

I want to include javascript confirm inside the Button_Click even procedure and contine the process based on the user selection. The real problem is how to assign javascript confirm return value to the private variable declared inside Button_Click event. Please any one help me.
 
Here's some server side code that outputs javascript similar to what you are
requesting:
myDeleteButton.Attributes.Add("onclick", _
"return confirm('Are you sure you want to delete?');")

In this example, the Delete button will post back only if the person
confirms they want to delete. Otherwise your server code is never called in
response to the button click.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net


DotNetJunkies User said:
I want to include javascript confirm inside the Button_Click even
procedure and contine the process based on the user selection. The real
problem is how to assign javascript confirm return value to the private
variable declared inside Button_Click event. Please any one help me.engine supports Post Alerts, Ratings, and Searching.
 
Back
Top