Appear in Online Interview to test your skills and be ready for job!
Twitter Twitter LinkedIn YouTube Google
Be Interview ready ! | Search
Submit content and win cash & prizes monthly.
Winners

Win Prizes

Announcements
Like us on Facebook
Sponsor
Top Forums Author
Thu, 24-Apr-2014 Authors
Zenny
10
All Time Authors
Jayakumars
3930
Karthikanbarasan
3455
Chvrsri
3140

Latest members | More ...


(Statistics delayed by 5 minutes)

alert message not showing new line

Shoyebaziz123
Posted by Shoyebaziz123 under Regular Expressions on 6/23/2011 12:30:12 AM | Points: 10 | Views : 1698 | 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



Reply | Reply with Attachment

=> Scroll below for responses


Comments or Responses

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.

Comments / Responses
Select text & click toolbar to format. Formatting appears in viewmode only. HTML Tags are not allowed.
Bold Italic Underline Paragraph Title Code  Link 
 Wait ... Processing ..... please wait.

Found interesting? Add this to: