Don't try this declaration with ASP.NET because it generates an error. You must use the <Script> tag with ASP.NET like this:
<Script runat="Server"> Sub mySub ...subroutine code End Sub </Script>
The <Script Runat="Server"> tag accepts two optional attributes. First, you can specify the programming language to use within the <Script> tag by including a language attribute like this:
<Script Language="C#" Runat="Server">
If you don't specify a language, the language defaults to the one defined by the <%@ Page Language %> directive mentioned in the previous section. If no language is specified in a page, the language defaults to Visual Basic.
曾经有个面试人问我C/S和B/S在server端的区别,如果我现在回答也许会抄上上面一段话,也许c/s系统的server更注重socket的传送方式以及组包拆包方式,而B/S注重同一页面是否保留viewstate以及cookie的保存和失效,以及 对安全性控制..