Hai....
"i want used confirm in javascript in code behind"
i am used confirm button ,in code behind.
if the confirm button worked
the function is return the true...
else
the function return the false..
i want to get true and false value for my further proces..
this my code..
Dim popupScript6 As String = "<script language='javascript'>var agree= confirm('Are you sure to cancel the ticket?');if(agree){ return true};else {return false;}</script>"
'Page.RegisterStartupScript("PopupScript6", popupScript6)
in my codebehind window i want to get "agree" value....
in this popupScript6 used confirm coding is worked...but i wrote return word..this is nothing done..
i ma used return word is not worked..
please how can use this statement..
how can i get return value..
because i got the return value..
then my next code if(true) the redirect to another page...
so please hrlp me...
i am used this code also code..
but the same process done this also return word is used in not working..
this code..
Dim str As StringBuilder = New StringBuilder
str.Append("<script language='javascript'>")
str.Append("var agree= confirm('Are you sure to cancel the ticket?');")
str.Append("if(agree){")
str.Append("return true;}")
str.Append("else {")
str.Append("return false;}")
str.Append("</script>")
RegisterStartupScript("TicketNumber", str.ToString)
so please help me...