懂asp和asp.net的高手

来源:百度知道 编辑:UC知道 时间:2024/05/26 01:18:27
帮我把asp的翻译成asp.net的谢谢
<%
Response.Buffer=true
Response.Expires=0
userName=Request.Form("username")
if username="" then Response.Redirect "index.asp"
session("u_name")=username
if Request.Form("sx")="1" then
session("u_sx")="1"
else
session("u_sx")="0"
end if
%>

if (Request.Form.Count != 0)
{
string userName = Request["username"];
if (username == "")
Response.Redirect("index.asp");
Session["u_name"] = username;
if (Request["sx"] == "1")
Session["u_sx"] = "1";
else
session["u_sx"] = "0";
}

asp 基本上都可以在asp.net 运行