Hi, to all the users. I want to use a message box in ASP.NET web app such that when he clicks a logout button and message prompts to ask him do he really want to logout. I embedded javascript in with
VB.NET but it won't works. Can anyone give suggestion for the same..
private Sub ShowMessage(dim message as String)
MessageBox Script
Dim scriptString As String = "<script language=JavaScript>"
String scriptString = "<script language=JavaScript>";
scriptString += "alert('" + message + "')"
scriptString += "</script>"
'if(!this.IsStartupScriptRegistered("MessageBox"))
Page.RegisterStartupScript("ShowMessage", scriptString)
End Sub
Private Sub imgLoggedout_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgLoggedout.Click
ShowMessage("Do you really want to logout")
'MsgBox("Do you really want to logout", MsgBoxStyle.OKCancel = MsgBoxStyle.OKOnly, Session("userlogedin") = "No")
Session("userlogedin") = "No"
Response.Redirect("Logon.aspx")
End Sub