麻烦告诉帮我把下面的代码该好...<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="gb2312" %>
<%@ Import Namespace="System" %> 
<%@ Import Namespace="System.Web" %> 
<%@ Import Namespace="System.IO" %> 
<%@ Import Namespace="System.Net" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<%
public string aa = "11";
aa = re();
public string re()
{
return "1111";
}
%>
<script language="C#">
public string bb = "22";
bb = "222222";
private void Page_Load(object sender, System.EventArgs e)
{
bb = HttpContext.Current.Request.Url.PathAndQuery.ToString();
}
</script><html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"> 
</head> 
<body> 
<%=aa%>
<%=bb%>
</body> 
</html>

解决方案 »

  1.   

    不知道楼主想从以上代码中获取什么样的信息?aa = re();???  
    public string bb = "22";
            bb = "222222";
      

  2.   

    这样的写法跟以前的ASP写法有区别吗?
    .net的优势似乎体现不出来
      

  3.   

    <script language="C#" runat=server>
      

  4.   

    <script language="C#">
            public string bb = "22";
            bb = "222222";
    =======================
    改成
    <script runat="server" language="C#">
            public string bb = "22";
            //bb = "222222";去掉===================
    <%
    public string aa = "11";
    aa = re();
    public string re()
    {
        return "1111";
    }
    %>
    =========================
    有这样的写法吗??没这样的写法哦!!!