会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
鈡嘓电信Wǒ不信
走自己的路 穿别人的鞋 让别人去找吧 找到了也不给
博客园
首页
新随笔
联系
订阅
管理
一些代码
//
读取服务器信息
protected
void
Button1_Click(
object
sender, EventArgs e)
{
Response.Write(
"
当前网页虚拟路径是:
"
+
Request.ServerVariables[
"
url
"
]);
Response.Write(
"
<br>当前网页虚拟路径是:
"
+
Request.RawUrl);
Response.Write(
"
<br>实际路径
"
+
Request.ServerVariables[
"
path_translated
"
]);
Response.Write(
"
<br>实际路径
"
+
Request.PhysicalPath);
Response.Write(
"
<br>服务器名:
"
+
Request.ServerVariables[
"
server_name
"
]);
Response.Write(
"
<br>服务器IP
"
+
Request.UserHostAddress);
}
//
读取客户端信息
protected
void
Button2_Click(
object
sender, EventArgs e)
{
Response.Write(
"
<br>是否支持背景音乐:
"
+
Request.Browser.BackgroundSounds);
Response.Write(
"
<br>是否支持框架:
"
+
Request.Browser.Frames);
Response.Write(
"
<br>客户用的是系统平台:
"
+
Request.Browser.Platform);
}
protected
void
Button3_Click(
object
sender, EventArgs e)
{
//
写入cookie
HttpCookie nc
=
new
HttpCookie(
"
newcookie
"
);
nc.Value[name]
=
"
天轰川
"
;
nc.Value[age]
=
"
27
"
;
nc.Value[dt]
=
DateTime.Now.ToString();
Response.Cookies.Add(nc);
Response.Write(
"
Cookie写入成功!
"
);
<
siteMap
>
<
siteMapNode title
=
"
Home
"
description
=
"
Home
"
url
=
"
~/home.aspx
"
>
<
siteMapNode title
=
"
Products
"
description
=
"
Out products
"
url
=
"
~/Products.aspx
"
>
<
siteMapNode title
=
"
Hardware
"
description
=
"
Hardware we offer
"
url
=
"
~/Hardware.aspx
"
/>
<
siteMapNode title
=
"
Software
"
description
=
"
Software for sale
"
url
=
"
~/Software.aspx
"
/>
</
siteMapNode
>
<
siteMapNode title
=
"
Services
"
description
=
"
Services we offer
"
url
=
"
~/Services.aspx
"
>
<
siteMapNode title
=
"
Training
"
description
=
"
Training
"
url
=
"
~/Training.aspx
"
/>
<
siteMapNode title
=
"
Consulting
"
description
=
"
Consulting
"
url
=
"
~/Consulting.aspx
"
/>
<
siteMapNode title
=
"
Support
"
description
=
"
Support
"
url
=
"
~/Support.aspx
"
/>
</
siteMapNode
>
</
siteMapNode
>
</
siteMap
>
posted on
2007-05-20 10:15
简约旋律
阅读(
191
) 评论(
0
)
收藏
举报
刷新页面
返回顶部