The purpose would be to add the reference at runtime instead of design time.
If you know the details of the JavaScript file at design time it would be
best to declare it then, otherwise you'd be pretty much forced to use
RegisterClientScript.
--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
"First Last" <es**********@yahoo.comwrote in message
news:bs******************************@speakeasy.ne t...
Hi,
Newbie question: Why use Page.ClientScript.RegisterClientScript*
when we can just make a .js file and include a reference to it in the
page? (i.e. <script src="myscript.js" type="text/javascript"></script>)
Is it because RegisterClientScript* enables us to reference ASP.NET
objects within the .js?
Thx,
Hank