Message Box In ASP.NET
-
Hi, I am trying to display error messages in the Windows Message Box Like Appearance in ASP.NET. Does anybody has done this before ? Thanks in Advance Happy Coding MankayarKarasi
-
Hi, I am trying to display error messages in the Windows Message Box Like Appearance in ASP.NET. Does anybody has done this before ? Thanks in Advance Happy Coding MankayarKarasi
-
Hi, I am trying to display error messages in the Windows Message Box Like Appearance in ASP.NET. Does anybody has done this before ? Thanks in Advance Happy Coding MankayarKarasi
Better use java script to display the error messages its more flexible. If you want to display the server side error messages than use literal coltorl and set the text property to a java script string; for example,
String JS=""; JS = "{"; JS += "alert('Not a valid user !! Please Check your User Id and Password and try again !!')}"; JS += "</"; JS += "script>"; Literal1.Text = JS; </code> for validation also instead of using the validation control you can also use the java script for displaying the error messages on the form "onsubmit" event, Hope this'll help <CENTER><A href="HTTP://PRAKASH-K.BLOGSPOT.COM"> <DIV style="WIDTH:225PX;BACKGROUND-IMAGE: url(http://www.prakashshipping.org/image/prakash.gif); BACKGROUND-REPEAT: no-repeat; BACKGROUND-COLOR: #ffffff"><BR><BR><br></DIV></A></CENTER> </x-turndown>
-
Better use java script to display the error messages its more flexible. If you want to display the server side error messages than use literal coltorl and set the text property to a java script string; for example,
String JS=""; JS = "{"; JS += "alert('Not a valid user !! Please Check your User Id and Password and try again !!')}"; JS += "</"; JS += "script>"; Literal1.Text = JS; </code> for validation also instead of using the validation control you can also use the java script for displaying the error messages on the form "onsubmit" event, Hope this'll help <CENTER><A href="HTTP://PRAKASH-K.BLOGSPOT.COM"> <DIV style="WIDTH:225PX;BACKGROUND-IMAGE: url(http://www.prakashshipping.org/image/prakash.gif); BACKGROUND-REPEAT: no-repeat; BACKGROUND-COLOR: #ffffff"><BR><BR><br></DIV></A></CENTER> </x-turndown>
This is just a thought, as I'm not sure about which solution is better, but wouldn't it be better to use
Page.RegisterStartupScript
orPage.RegisterClientScriptBlock
for server-side JavaScript generation instead of using LiteralControl for this? Rado
Radoslav Bielik http://www.neomyz.com/poll [^] - Get your own web poll