ddee:is there a way I can pass in the value at run time that i would like to display in the confirm message
Yes, you can assign the OnClientClick Property from code behind , for examlpe , in page_Laod you can write this :
If Not IsPostBack Then
' the message that will be displayed to the user
' you can change the message Text as you want
Dim FirstAlert As String = " First Confirm Message goes here "
Dim secondalert As String = "Second Confirm Message goes here "
Button1.OnClientClick = _
String.Format("javascript:if(confirm('{0}'))return confirm('{1}'); else return false;", FirstAlert, secondalert)
End If
the FirstAlert and SecondAlert variables can be assigned to value from your language resource so that you can Display a locaized messsages,
To access the Global Resource File Or Page Local File , you can use
HttpContext.GetGlobalResourceObject Or Httpcontext.GetLocalResourceObject methods
Best Regards,
Anas Ghanem - انس الغانم |
My Blog