>> ClientScript.RegisterStartupScript(GetType(), "error", "alert('In
>> Catch');",
>> true);
>
> Thanks but not sure how to use this. Where do I put this?
Wherever you like, so long as you don't Redirect from the page...
Basically, it will send down the JavaScript to run after the page had
loaded...
> do I need a RegisterStartupScript for each alert I wish to use?
Yes.
Incidentally, why are you actually doing this...?

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
gijeet@yahoo.com - 22 Oct 2007 21:27 GMT
> Incidentally, why are you actually doing this...?
basically for debugging. I don't like response.writes and I'm trying
to learn javascript. but if you know of a better way to popup alerts,
let me know.
Mark Rae [MVP] - 22 Oct 2007 22:35 GMT
>> Incidentally, why are you actually doing this...?
> basically for debugging. I don't like response.writes and I'm trying
> to learn javascript. but if you know of a better way to popup alerts,
> let me know.
There's no need to popup anything in order to debug in Visual Studio.NET -
it's all built-in:
http://www.wrox.com/WileyCDA/Section/id-305946.html

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
PokerJoker - 22 Oct 2007 22:39 GMT
use the debugger to debug. alert debugging is asp classic style :)
> > Incidentally, why are you actually doing this...?
> basically for debugging. I don't like response.writes and I'm trying
> to learn javascript. but if you know of a better way to popup alerts,
> let me know.