ASP.NET(C#)

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2005年4月20日

摘要: 当我们在网站上建立数据库时,保护用户的信息安全是非常必要的。多数用户不愿意让别人知道自己的信息,同时网管也不想因为安全问题而丢失网站的信誉。无论对于谁,安全问题都是非常重要的。 为了解决这个问题,我给大家提供一个简单实用,但是老套的方法,就是口令加密。在此我们使用ASP.NET技术对口令加密。简单的讲,就是将用户提供的口令加密之后,然后让它和存放于系统中的数据比较,如果相同,则通过验证。 ... 阅读全文
posted @ 2005-04-20 09:15 battlerstar 阅读(1208) 评论(0) 推荐(0) 编辑

2005年4月19日

摘要: this.GetType().BaseType.Namespace.ToString() 阅读全文
posted @ 2005-04-19 09:07 battlerstar 阅读(630) 评论(0) 推荐(0) 编辑

摘要: 经是黑社会老大▄︻┻┳═一!只要精神不死,只要信心还在,失去的一切都会重新回来! 阅读全文
posted @ 2005-04-19 08:59 battlerstar 阅读(363) 评论(0) 推荐(0) 编辑

摘要: ManagementObjectSearcher query =new ManagementObjectSearcher("SELECT * FROM Win32_NetworkAdapterConfiguration") ; ManagementObjectCollection queryCollection = query.Get(); foreach( Management... 阅读全文
posted @ 2005-04-19 08:43 battlerstar 阅读(679) 评论(1) 推荐(0) 编辑

摘要: ClientIP: this.Label1.Text = Request.ServerVariables["remote_addr"].ToString(); LocalIP: this.Label1.Text = Request.ServerVariables["LOCAL_ADDR"].ToString(); --------------------------------------... 阅读全文
posted @ 2005-04-19 08:31 battlerstar 阅读(730) 评论(0) 推荐(0) 编辑

2005年4月18日

摘要: 在ItemCreate 事件中加入以下代码: private void DataGrid1_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e) { if ( e.Item.ItemType == ListItemType.Header ) { Tabl... 阅读全文
posted @ 2005-04-18 17:26 battlerstar 阅读(786) 评论(1) 推荐(0) 编辑

摘要: TextBox txt = new TextBox(); txt.ID="Text1"; txt.Width=250; txt.Text="這是動態使用程式新增的TextBox!"; ((HtmlForm )Page.FindControl("Form1")).Controls.Add(txt); txt.ForeColor=Color.FromName("Gr... 阅读全文
posted @ 2005-04-18 17:19 battlerstar 阅读(747) 评论(1) 推荐(0) 编辑

摘要: 步驟: 1. 引用System.Security.Principal命名空间 using System.Security.Principal; 2.代码 WindowsPrincipal wp = new WindowsPrincipal(WindowsIdentity.GetCurrent()); wp.Identity.... 阅读全文
posted @ 2005-04-18 16:19 battlerstar 阅读(728) 评论(2) 推荐(0) 编辑

2005年4月16日

摘要: 1.WebService里如何获取当前的应用程序的路径??? string serviceUrl = @"http://" + Context.Request.Url.Host + Context.Request.ApplicationPath; Server.MapPath("../") 2. )▄︻┻┳═一观天上云卷云舒,看门前花开花落▄︻┻┳═一 阅读全文
posted @ 2005-04-16 17:23 battlerstar 阅读(432) 评论(0) 推荐(0) 编辑

2005年3月31日

摘要: string strConn = "server=.;database=test;uid=sa"; string strSQL = "insert into person (Name,Age) values (@Name,@Age)"; //存储参数缓存 SqlParameter[] paramsToStore = new SqlParameter[2]; p... 阅读全文
posted @ 2005-03-31 10:54 battlerstar 阅读(619) 评论(0) 推荐(0) 编辑