Click here to Skip to main content
15,902,189 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: how to publish the web site ? Pin
TerRO_GirL22-Oct-08 5:10
TerRO_GirL22-Oct-08 5:10 
GeneralRe: how to publish the web site ? Pin
SeMartens22-Oct-08 5:29
SeMartens22-Oct-08 5:29 
GeneralRe: how to publish the web site ? Pin
TerRO_GirL22-Oct-08 5:50
TerRO_GirL22-Oct-08 5:50 
QuestionAccessing css from javascript in a ASPX form. Pin
Steve Holdorf21-Oct-08 7:02
Steve Holdorf21-Oct-08 7:02 
AnswerRe: Accessing css from javascript in a ASPX form. Pin
NeverHeardOfMe21-Oct-08 7:57
NeverHeardOfMe21-Oct-08 7:57 
GeneralRe: Accessing css from javascript in a ASPX form. [modified] Pin
Steve Holdorf21-Oct-08 8:36
Steve Holdorf21-Oct-08 8:36 
GeneralRe: Accessing css from javascript in a ASPX form. Pin
Steve Holdorf21-Oct-08 10:02
Steve Holdorf21-Oct-08 10:02 
Question@-quoted string in C# Pin
Shahil Shah21-Oct-08 4:16
Shahil Shah21-Oct-08 4:16 
Hello

I am using this.ClientScript.RegisterStartupScript(this.GetType(), "Message", "<script language="javascript">alert('" + ex.Message.Replace("'", "") + "');</script>"); to show errors on an aspx webpage which are caught using a try catch block.

When the error message contains "\r\n" it throws an Unterminated String Constant error in javascript.

I can resolve this quite easily using this.ClientScript.RegisterStartupScript(this.GetType(), "Message", "<script language="javascript">alert('" + ex.Message.Replace("'", "").Replace("\r\n", @"\n") + "');</script>");

Does anyone know a more elegant solution to this though, as i presume "\n" etc. also might cause the same problem?

Thanks
AnswerRe: @-quoted string in C# Pin
V.21-Oct-08 4:29
professionalV.21-Oct-08 4:29 
GeneralRe: @-quoted string in C# Pin
Shahil Shah21-Oct-08 5:41
Shahil Shah21-Oct-08 5:41 
AnswerRe: @-quoted string in C# Pin
Adam Maras21-Oct-08 9:09
Adam Maras21-Oct-08 9:09 
AnswerRe: @-quoted string in C# Pin
Guffa21-Oct-08 14:32
Guffa21-Oct-08 14:32 
QuestionAbout CustomValidator Pin
jason_mf21-Oct-08 4:11
jason_mf21-Oct-08 4:11 
AnswerRe: About CustomValidator Pin
Brij21-Oct-08 4:20
mentorBrij21-Oct-08 4:20 
GeneralRe: About CustomValidator Pin
jason_mf21-Oct-08 4:44
jason_mf21-Oct-08 4:44 
GeneralRe: About CustomValidator Pin
N a v a n e e t h21-Oct-08 8:21
N a v a n e e t h21-Oct-08 8:21 
QuestionHow to select Date and Time simultaneously Pin
suresh_00121-Oct-08 3:44
suresh_00121-Oct-08 3:44 
AnswerRe: How to select Date and Time simultaneously Pin
Abhijit Jana21-Oct-08 3:51
professionalAbhijit Jana21-Oct-08 3:51 
Questiondesktop application to web migration problem! Pin
mr_muskurahat21-Oct-08 2:52
mr_muskurahat21-Oct-08 2:52 
AnswerRe: desktop application to web migration problem! Pin
Paddy Boyd21-Oct-08 3:18
Paddy Boyd21-Oct-08 3:18 
AnswerRe: desktop application to web migration problem! Pin
Abhijit Jana21-Oct-08 3:47
professionalAbhijit Jana21-Oct-08 3:47 
AnswerRe: desktop application to web migration problem! Pin
Brij21-Oct-08 4:05
mentorBrij21-Oct-08 4:05 
QuestionShow messagebox Pin
venkat86_ece21-Oct-08 2:36
venkat86_ece21-Oct-08 2:36 
AnswerRe: Show messagebox Pin
Sandeep Akhare21-Oct-08 2:39
Sandeep Akhare21-Oct-08 2:39 
GeneralRe: Show messagebox Pin
Eduard Keilholz21-Oct-08 2:45
Eduard Keilholz21-Oct-08 2:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.