求助!!怎样将 asp改写为C#
将ASP改为C#,,,第一次,需要一个例子熟悉下希望高人能将下面的改为C#代码。
----------------------------Session.asp---------------------------------------
<%
AdminUID=session("AdminUID")
AdminPWD=session("AdminPWD")
set rs=server.CreateObject ("ADODB.RecordSet")
rs.Source="select id from Admin where AdminUID='" & AdminUID & "' and AdminPWD='" & AdminPWD & "'"
rs.Open rs.Source,conn,1,1
if not rs.EOF then
rs.close
set rs=nothing
else
rs.close
set rs=nothing
session("AdminUID")=""
session("AdminPWD")=""
session("AdminRANK")=""
%>
<script language=javascript>
alert("登录超时,请重新登录!")
window.location="index.asp";
</script>
<%
Response.End
end if
%>