Why can't this code run in body?

liunx

Guest
Hello, the following code runs well in Page_Load sub rountine. But it can't run in the html body <% %>. What's the problem ?
Dim subject as string
subject = Request.QueryString("subject")
Session("sub_sel") = subject
Response.write("sub_sel=" & subject)if u wanna bring those code into your aspx "body" you need to add the following tags:

<script language="VB" runat="Server">
private void Page_Load(){
your code goes here
}
</script>
 
Top