Alert Box
-
Sir/Madam My problem is that I have to check a textbox that it may contain some text or not on clicking a button if it not contain any text then i have to display a message box that you nave not entered any value or you have entered null. it may be done by using javascript or asp.net:confused::confused: Balwan Singh
-
Sir/Madam My problem is that I have to check a textbox that it may contain some text or not on clicking a button if it not contain any text then i have to display a message box that you nave not entered any value or you have entered null. it may be done by using javascript or asp.net:confused::confused: Balwan Singh
For ASP.NET, look at the RequiredFieldValidator[^] control. -- modified at 8:52 Monday 1st May, 2006 I hadn't noticed that you had already asked this question earlier. Did you not like the responses you got? They looked pretty good to me.
-
Sir/Madam My problem is that I have to check a textbox that it may contain some text or not on clicking a button if it not contain any text then i have to display a message box that you nave not entered any value or you have entered null. it may be done by using javascript or asp.net:confused::confused: Balwan Singh
for javascript on the click of button call a function in javascript there check for value of text box if it is empty then display a alert box with message and return false else pass true without displaying the alert box.
-
Sir/Madam My problem is that I have to check a textbox that it may contain some text or not on clicking a button if it not contain any text then i have to display a message box that you nave not entered any value or you have entered null. it may be done by using javascript or asp.net:confused::confused: Balwan Singh
Hi! I created a class called HelperClass where I have a lot of methods that help me with situations like this one. Here goes the code of the method to provide an alert window: public static void MsgBox(System.Web.UI.Page page,string msg) { msg = msg.Replace("'","\\'"); page.RegisterStartupScript("msg","alert('" + msg + "');"); } I also have other methods, if you need them let me know. I also found some free online tutorials at www.KYNOU.com I hope I helped. sfdsfsdf