——此文章摘自《ASP
NET网络数据库开发实例精解》定价
¥
特价
¥
详细>>http://track
linktech
cn/?m_id=dangdang&a_id=A
&l=
&l_type
=
width=
height=
border=
nosave>
…… //请参考本书附赠光盘
<asp:label ID=servertime runat=server />
<asp:label ID=serverppath runat=server />
<asp:label ID=servernpath runat=server />
<asp:label ID=servers runat=server />
<asp:label ID=servera runat=server />
<font color=#>浏览者相关信息</font>
<asp:label ID=cip runat=server></asp:label>
<asp:label ID=ms runat=server />
…… //请参考本书附赠光盘
<asp:label ID=cookies runat=server />
<asp:label ID=cl runat=server></asp:label>
<asp:label ID=frames runat=server /></font>
<font color=#>执行效率相关情况</font></div>
<asp:label ID=runtime runat=server />
<font size=>亿次加法循环测试</font></td>
<asp:label ID=l runat=server></asp:label>
.设计页面ServerClientInfoaspx的事件和函数
页面ServerClientInfoaspx调用函数Page_Load(Object senderEventArgs e)初始化该函数获取服务器和客户端的信息它的程序代码如下
private void Page_Load(Object senderEventArgs e)
{
ResponseExpires = ;
ResponseCacheControl = nocache;
if(!PageIsPostBack)
{ //获取页面执行开始时间
DateTime stime=DateTimeNow;
//获取服务器相关信息
servernameText=ServerMachineName;
serveripText=RequestServerVariables[LOCAL_ADDR];
server_nameText=RequestServerVariables[SERVER_NAME];
//使用NET 中的Environment类获取版本等信息
int build major minorrevision;
build=EnvironmentVersionBuild;
major=EnvironmentVersionMajor;
minor=EnvironmentVersionMinor;
revision=EnvironmentVersionRevision;
servernetText=NET CLR +major ++ minor +
+ build++revision;
servermsText=EnvironmentOSVersionToString();
//获取服务器的软件及其版本号
[http://developcsaicn/dotnet_ASP/htm>] [] [http://developcsaicn/dotnet_ASP/htm>] [http://developcsaicn/dotnet_ASP/htm>]