M
Mike Malter
I have scoured the web looking for an example of how to do a javascript confirm box in .NET.
Is there any way to do it?
Thanks.
Is there any way to do it?
Thanks.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I have scoured the web looking for an example of how to do a
javascript confirm box in .NET.
Matt Berther said:Hello Mike,
control.Attributes.Add("onClick", "return confirm('Your Message');");
where control is the control you want the confirm box attached to. Keep in mind that this will not postback unless the user selects OK.
C:\Projects\SSSC\Cheese\wwwroot\ManageBrand.aspx.cs(51): Invalid token
'(' in class, struct, or interface member declaration
My code is as follows:
protected System.Web.UI.WebControls.Button bDelete;
bDelete.Attributes.Add("onClick", "if (!confirm('Are you sure you want
to delete?')) return false;");
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.