Line Break in Page.RegisterClientScriptBlock
-
Hi, I need to display the 3 Lines of text in the alert Box in asp.net code behind but '\n' is does not work. My coding is as follows Page.RegisterClientScriptBlock("", "alert('Please Enter Date \n Please Enter Intime \n Please Enter Outtime')"); If any one know the solution Please send it immediately. Bye. :((
-
Hi, I need to display the 3 Lines of text in the alert Box in asp.net code behind but '\n' is does not work. My coding is as follows Page.RegisterClientScriptBlock("", "alert('Please Enter Date \n Please Enter Intime \n Please Enter Outtime')"); If any one know the solution Please send it immediately. Bye. :((
-
Change \n to \\n. Therefore your code should be Page.RegisterClientScriptBlock("", "<script>alert('Please Enter Date \\n Please Enter Intime \\n Please Enter Outtime')</script>");
-
Ramesh already answered your question
jai_101 wrote:
Page.RegisterClientScriptBlock("", alert('Please Enter Date \n Please Enter Intime \n Please Enter Outtime')");
consider changing your message to
Please Enter : Date, Intime and Outtime
Yusuf May I help you?