|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ClientScript.RegisterClientScriptBlock in ASP.NET 2.0I am working on converting my code from ASP.NET 1.1 to ASP.NET 2.0. In
ASP.NET 1.1 the RegisterClientScriptBlock method was just a key and script (2 Strings), but in ASP.NET the ClientScript.RegisterClientScriptBlock also includes a parameter called 'type' which is of Type. This sounds like it is supposed to specify whether the script is JavaScript, VBScript, JScript, ECMAScript, etc., but I what am I supposed to enter here (I have not heard of a value of Type that would specify this)? (I always use JavaScript for my client-side scripts) Thanks. Hi Nathan,
Try it like this: ClientScript.RegisterStartupScript(Me.GetType, "Startup", scriptString) Ken Microsoft MVP [ASP.NET] Show quoteHide quote "Nathan Sokalski" <njsokal***@hotmail.com> wrote in message news:OITliwjnGHA.2264@TK2MSFTNGP04.phx.gbl... >I am working on converting my code from ASP.NET 1.1 to ASP.NET 2.0. In >ASP.NET 1.1 the RegisterClientScriptBlock method was just a key and script >(2 Strings), but in ASP.NET the ClientScript.RegisterClientScriptBlock also >includes a parameter called 'type' which is of Type. This sounds like it is >supposed to specify whether the script is JavaScript, VBScript, JScript, >ECMAScript, etc., but I what am I supposed to enter here (I have not heard >of a value of Type that would specify this)? (I always use JavaScript for >my client-side scripts) Thanks. > -- > Nathan Sokalski > njsokal***@hotmail.com > http://www.nathansokalski.com/ > Hi Nathan
RegisterClientScriptBlock doesn't know about client side scripting, the parameter type is the object 'type', You usually get this with GetType() method. See ya daniel # Show quoteHide quote "Nathan Sokalski" <njsokal***@hotmail.com> wrote in message news:OITliwjnGHA.2264@TK2MSFTNGP04.phx.gbl... >I am working on converting my code from ASP.NET 1.1 to ASP.NET 2.0. In >ASP.NET 1.1 the RegisterClientScriptBlock method was just a key and script >(2 Strings), but in ASP.NET the ClientScript.RegisterClientScriptBlock also >includes a parameter called 'type' which is of Type. This sounds like it is >supposed to specify whether the script is JavaScript, VBScript, JScript, >ECMAScript, etc., but I what am I supposed to enter here (I have not heard >of a value of Type that would specify this)? (I always use JavaScript for >my client-side scripts) Thanks. > -- > Nathan Sokalski > njsokal***@hotmail.com > http://www.nathansokalski.com/ >
WebBrowser1.DocumentText
Multithreaded Updating of StatusBar HTML edit Vb.net how to delete a file when the windows start programmically open a pdf file in vb.net problem with string function in vb.net XML or SQL Server? Font size not right when converting from RTF to Web Looping through directories Publishing An ASP.NET Website With Visual Studio .NET 2005 |
|||||||||||||||||||||||