Asp.Net¼Ì³ÐʵÏÖÉí·ÝÑéÖ¤
ÔÚASP.NETÍøÕ¾ÖÐÍøÕ¾¹ÜÀíºǫ́ÐèÒª¾³£ÑéÖ¤Óû§Éí·Ý,ҪʵÏÖÕâÖÖ¹¦ÄܾͿÉÒÔÀûÓÃÄǸö¼Ì³Ð»úÖƺÍASP.NETµÄʼþ»úÖÆ.Ê×Ïȶ¨ÒåÒ»¸öÐèÒª½øÐÐÉí·ÝÑéÖ¤µÄBasePageÀà,¼Ì³Ð×ÔPageÀà,ÔÚBasePageÀàµÄ¹¹Ô캯ÊýÖж¨ÒåËüµÄ¼ÓÔØʼþµÄ´¦Àí´úÂë,ÕâÑùËùÓм̳Ð×ÔBasePageÀàµÄÒ³Ã涼ÄÜ×Ô¶¯Ö´ÐÐÉí·ÝÑéÖ¤£º
/// <summary>
/// ÑéÖ¤µÇ½Àà
/// </summary>
public class ValidateLogin : System.Web.UI.Page //¼Ì³Ð×ÔSystem.Web.UI.Page
{
public ValidateLogin()
{
//µ±Ò³Ãæ¼ÓÔØʱִÐиÃʼþ
this.Load += new EventHandler(BasePage_Load);
}
//¶ÔµÇ¼½øÐÐÑéÖ¤
protected void BasePage_Load(object sender,EventArgs e)
{
if (Session["uid"] == "" || Session["uid"] == null)
{
Response.Redirect("~/login.aspx");
}
}
}
¼Ì³ÐÒ³Ã棺
public partial class Default3 : ValidateLogin //¼Ì³Ð×ÔValidateLoginÀà
{
protected void Page_Load(object sender, EventArgs e)
{
//¼Ì³Ð×ÔValidateLoginÀà,ʵÏּ̳ÐÉí·ÝÑéÖ¤
}
}
Ïà¹ØÎĵµ£º
ż¶ûʹÓÃ,¼òµ¥µÄ¼Ç¼Ï¹ý³Ì
1.ÏÂÔØNewtonsoft.Json.Net20.dllºó,·ÅÈëAsp.netÏîÄ¿BinÎļþ¼ÐÖÐ.
Newtonsoft.Json.Net20,ÊÇÒ»¸öObject/Jsonת»»¹¤¾ß,ÕâÀïÓÃÀ´°Ñ¶ÔÏóת»»³ÉJson¸ñʽ×Ö·û´®.
2.Ê÷½ÚµãModel¶ÔÏó,
public class TreeModel{
private string _i ......
asp.net ѧϰ×ÊÔ´
¹ØÓÚ´ËÖ÷Ìâ½öÓÐ 1 ¸öÌû×Ó - Ê÷ʽä¯ÀÀ
astin...@gmail.com
9ÔÂ26ÈÕ ÉÏÎç12ʱ41·Ö ÏÔʾѡÏî
·¢¼þÈË£º astin...@gmail.com - ²éÕÒ´Ë×÷ÕßµÄÌû×Ó
ÈÕÆÚ£ºSun, 25 Sep 2005 09:41:54 -0700
µ±µØʱ¼ä£º2005Äê9ÔÂ26ÈÕ(ÐÇÆÚÒ») ÉÏÎç12ʱ41·Ö
Ö÷Ì⣺asp.net ѧϰ×ÊÔ´
´ð¸´×÷Õ ......
http://blog.csdn.net/chengking/archive/2005/10/27/518079.aspx
(Ò»).Ñ¡Ôñ»á»°×´Ì¬´æ´¢·½Ê½
ÔÚWebconfigÎļþÅäÖÃ:
<sessionState mode="???" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString ......
1£®URL´«Öµ
ÕâÊǾµäµÄ´«Öµ·½Ê½£¬ÕâÖÖ·½·¨µÄʹÓ÷dz£¼òµ¥£¬²»¹ýËù´«µÝµÄÖµÊÇ»áÏÔʾÔÚä¯ÀÀÆ÷µÄµØÖ·À¸Éϵģ¬¶øÇÒ²»ÄÜ´«µÝ¶ÔÏó¡£ËùÒÔÕâÖÖ·½·¨Ò»°ãÓÃÓÚ´«µÝµÄÖµÉÙÇÒ°²È«ÐÔÒªÇ󲻸ߵÄÇé¿öÏ¡£ÔÚ*.aspxÒ³Ã濪·¢ÖпÉÒÔʹÓ󬼶Á´½ÓÎı¾½øÐд«Öµ
2£®Session´«Öµ
ÕâÖÖ·½·¨½«Ã¿·ÝÊý¾Ý´æ´¢ÓÚ·þÎñÆ÷±äÁ¿ÖУ¬¿ÉÒÔ´«µÝ±È½Ï¶àµÄÊý¾Ý£¬²¢ ......