Use Parentheses When Passing Parameters to Subroutines and Methods


In ASP.NET, unlike ASP Classic, you must always use parentheses when passing parameters to a subroutine or a method call. For example, in ASP Classic, the following script works fine:

 
 <% Response.Write "Hello World!" %> 

In ASP.NET, however, this script generates an error. You need to use parentheses with the Write method like this:

 
 <% Response.Write( "Hello World!" ) %> 

You also need to always use parentheses when passing parameters to a subroutine. If a subroutine does not require any parameters, the parentheses are optional.



ASP.NET Unleashed
ASP.NET 4 Unleashed
ISBN: 0672331128
EAN: 2147483647
Year: 2003
Pages: 263

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net