-
April 20th, 2006, 10:22 AM
#1
passing invalid Javascript string in C#
Dear All,
I have the following code:-
StringBuilder strInvalid = new StringBuilder();
string strErrorMessage;
strErrorMessage = "Johann";
strErrorMessage = strErrorMessage + '\n';
strErrorMessage = strErrorMessage + "Montfort";
strInvalid.Append("<script language='javascript'> alert('");
strInvalid.Append(strErrorMessage);
strInvalid.Append("');</script>");
this.RegisterStartupScript("startup",strInvalid.ToString());
Basically what I am trying to do is skip a line between Johann and Montfort, however the script is not working.
I am guessing there is a missing character somewhere, however I am not very good in Javascript
Thanks for your help and time
Johann
www.johannmontfort.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|