ASP.Net C# JavaScript Popup Window Help
<p>I've looked all over the place and had very little luck.</p>

<pre><code>try{
FooError();
}
catch (Exception Exc){              
ClientScript.RegisterClientScriptBlock(this.GetType(), "errorPop",
@"&lt;script language='javascript'&gt; alert(" + Exc.Message + "); &lt;/script&gt;");
return;
}
</code></pre>

<p>I keep getting a javascript error saying "Expected a ')'.". I've tried the script with a @ at the start (like it is), without a @ at the start, with and without a semicolon at the end. I've tried    </p>

<pre><code>ClientScript.RegisterClientScriptBlock(this.GetType(), "errorPop",
@"&lt;script type=\"text/javascript\"&gt; alert(" + Exc.Message + "); &lt;/script&gt;");
</code></pre>

<p>I've been able to get this to work with a static value in the alert function</p>

<pre><code>ClientScript.RegisterClientScriptBlock(this.GetType(), "errorPop",
@"&lt;script language='javascript'&gt; alert('Foo'); &lt;/script&gt;");
</code></pre>

<p>But that's not what I need.
What am I doing wrong here? Is there a better way?
I guess what I mean to ask is how do you use a C# string variable in a JavaScript alert box, if it's even possible.</p>

<p>Thanks.</p>

<p>This is my first question I hope I did it right -.-;</p>
