自动获取ip地址:.NET中获取一电脑名,IP地址及当前用户名来源: 发布时间:星期四, 2009年2月12日 浏览:361次 评论:0
在.NET中获取 ![]() ![]() ![]() ![]() ![]() ![]() ![]() 1. 在ASP.NET中专用属性: 获取服务器电脑名:Page.Server.ManchineName 获取用户信息:Page.User 获取客户端电脑名:Page.Request.UserHostName 获取客户端电脑IP:Page.Request.UserHostAddress 2. 在网络编程中 ![]() 获取当前电脑名: ![]() ![]() ![]() 根据电脑名取出全部IP地址: ![]() ![]() 也可根据IP地址取出电脑名: ![]() ![]() 3. 系统环境类 ![]() 当前电脑名: ![]() ![]() 当前电脑所属网域: ![]() ![]() ![]() 当前电脑用户: ![]() ![]() using ![]() private void ButtonIP_Click(object sender, ![]() { ![]() ![]() ![]() ![]() { TextLIP.Text = addressList[0]. ![]() ![]() TextSIP.Text = addressList[1]. ![]() ![]() } ![]() { TextLIP.Text = addressList[0]. ![]() ![]() TextSIP.Text = \"没有可用 ![]() } } 0
相关文章读者评论发表评论 |
|