vb.net - Code Behind Client Side Alert -


i previous asked assistance don't think ask right question. new coding & have web app form on has yes/no dropdown & textbox after reason. managed write code behind msgbox need on client side. know it's not complicated thihk. code behind used server side msgbox:

protected sub submitbutton_click(sender object, e event args) handles submitbutton.click if criticallist.text = "yes"  if textbox13.text <> ""    sqldatasource1.insert()  response.redirect("formsreport.aspx") else   msgbox("if critical, must provide reason.")  end if else    sqldatasource1.insert()   response.redirect("formsreport.aspx") end if end sub 

can someone, please give me guidance of how write client side alert? preferably in code behind.

dim message string = "if critical, must provide reason." dim script string = "<script type='text/javascript'> alert('" + message + "');</script>" 

correction above this

clientscript.registerclientscriptblock(me.gettype(), "alertbox", script) 

dont forget single qouts @ alert code


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -