求助!!!把这段asp代码改为asp.net
<%host_dns=Request.ServerVariables("HTTP_HOST")%>
<%if Request.Cookies(host_dns)("UserLevelPur")!="0,0,0,0,0,0|0,0,0,0,0|1,1,1,1|1,1|1,1,1,1,1,1,1|1,1,1,1|1,1,1,1|1" then
response.write "<script>alert('无权使用!');history.back();</Script>"
response.end
end if %>
问题点数:20、回复次数:8Top
1 楼cj777(H3)回复于 2004-07-01 08:47:28 得分 0
大哥们,帮帮忙,只有能实现这功能就行!Top
2 楼coldljy(青山隐隐)回复于 2004-07-01 08:50:29 得分 8
string dns = Request.ServerVariables("HTTP_HOST");
HttpCookie cookie = Request.Cookies[dns];
if(cookie.Values["UserLevelPur"].ToString()!="...")
{
Response.Write("...");
Response.End();
};Top
3 楼cj777(H3)回复于 2004-07-01 08:58:01 得分 0
出现错误 “System.Web.HttpRequest.ServerVariables”表示“属性”,此处应为“方法”Top
4 楼stlwj(保持健康,渴望金钱。)回复于 2004-07-01 09:04:55 得分 3
Request.ServerVariables["HTTP_HOST"];Top
5 楼coldljy(青山隐隐)回复于 2004-07-01 09:05:20 得分 3
失误:P
==>ServerVariables["HTTP_HOST"];Top
6 楼cj777(H3)回复于 2004-07-01 09:16:45 得分 0
谢谢!coldljy
string dns = Request.ServerVariables("HTTP_HOST");
这句怎么改啊??Top
7 楼johnsuna(缘来是e)回复于 2004-07-01 09:26:49 得分 4
string dns = Request.ServerVariables("HTTP_HOST");改为:
string dns = Request.ServerVariables["HTTP_HOST"];Top
8 楼boy119(boy119)回复于 2004-07-01 09:31:54 得分 2
同意楼上的Top




