Search
Winners

Win Prizes

Social Presence
Twitter Twitter LinkedIn YouTube Google

Like us on Facebook
Advertisements
Top Forums Author
Fri, 31-Oct-2014 Authors
Bhuwan87rawat
10
Jayakumars
10
All Time Authors
Jayakumars
4210
Karthikanbarasan
3455
Chvrsri
3140

Latest members | More ...


(Statistics delayed by 5 minutes)
 Forum Post

alert message not showing new line

Shoyebaziz123
Posted by Shoyebaziz123 under Regular Expressions on 6/23/2011 12:30:12 AM | Points: 10 | Views : 2054 | Status : [Member] | Replies : 2


Hi all,
i am using this code for showing alert message but it not working , if i am using \n

protected void Button1_Click(object sender, EventArgs e)
{

if(clsValidation.Return_Date(txtDate)==true)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "test", "alert('Ok')", true);
}
else
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "test", "alert('Enter Valid Date \n in dd/mm/yyyy format')", true);
}


}

working if \n not use what is the reason , any solution?
thanks



Posted by: Navalemanoj0405 on: 6/23/2011 [Member] Starter | Points: 25

Dear Shoyebaziz123,
try this:

ScriptManager.RegisterStartupScript(this, this.GetType(), "test", "alert('Enter Valid Date \\n \\n in dd/mm/yyyy format')", true);

Shoyebaziz123, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Lakn2 on: 6/24/2011 [Member] Starter | Points: 25

try this

page.registerstartupscript("<script>","<script>alert( ' your message or variables in string ' ) </script>");


Thanks&Regards
LakshmiNarayana Nalluri.

Shoyebaziz123, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response


Found interesting? Add this to: