|
-
Mar 26th, 2008, 07:57 AM
#8
Re: Response.Write is not a good thing to use on ASP.NET pages.
Yes, in ASP.NET 2.0+, it's ClientScript instad of Page.Register....
Note that ClientScript.RegisterClientScriptBlock != Page.RegisterStartupScript. The equivalent is ClientScript.RegisterStartupScript.
RegisterStartupScript means "execute this as soon as the page loads", while RegisterClientScriptBlock means "here's some new JavaScript. Put it on the page, I might use it later."
Also, move your conn.Close() to the Finally block, not the Catch.
Also also, you need to close your script tag.
"<script type='text/JavaScript'>alert('" & ex.Message & "');</script>"
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
|