Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.NET 4 how to pop up a simple message box?

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
0
36
US
Can some give me a code snippet. I don't have AJAX except the default. when I paste in code it get squigly lines.
I just need the basic most simple popup with "Are you sure you want to delete! with "Yes" and "No" buttons.


DougP
 
You have to use javascript:
confirm("Are you sure you want to delete!");
 
this is my code it has "OK" and "Cancel" buttons. Is there a way to change them to "Yes" and "No" ? or what if I want 3 buttons? can I do that too?

Code:
Response.Write("<script language='javascript'>confirm('Are you sure you want to Delete.')</script>")

Not sure why ASP or VB does not have a better way to create a simple popup?

DougP
 
Oh yes and how do I determine which button they pressed?

DougP
 
this is in a module so I can't use
Response.Write("<script language='javascript'>confirm('Are you sure you want to Delete.')</script>")

Catch ex As Exception
' MsgBox(ex.Message, MsgBoxStyle.Information, "Error")
'Response.redirect("ErrorScreen.aspx")
<a href="ErrorScreen.aspx" target="ErrorScreen.aspx">Link..</a>
I can't get anythiing to work.
How are you suposed to tell the user ther eis a problem?

Please I need help with this

DougP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top