Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

asp.net Éí·ÝÑéÖ¤£¨·ÖĿ¼Ñé֤ƪ£©

ÔÚÉÏһƪ²©ÎÄ¡¶asp.netÖеÄÉí·ÝÑéÖ¤£¨×î¼òµ¥Æª£©¡·ÖеÄÉí·ÝÑéÖ¤ËäÈ»ºÜ¼òµ¥£¬µ«ÊÇÓÐÒ»¸öȱµã£¬¾ÍÊÇ·ÃÎÊÕû¸öÍøÕ¾¶¼±ØÐëÒª¾­¹ýÉí·ÝÑéÖ¤£¬¶øÊÂʵÉÏ£¬ºÜ¶àÍøÕ¾¶¼²»»áÕâôҪÇóµÄ¡£
±ÈÈçÒ»¸öÐÂÎÅϵͳ£¬Í¨³£Ö»ÓÐÔÚ·¢²¼ÐÂÎŵÄÍøÒ³²ÅÐèÒªÉí·ÝÑéÖ¤£¬¶øÓû§ä¯ÀÀÐÂÎÅÊDz»ÐèÒªÉí·ÝÑéÖ¤µÄ¡£¶ÔÓÚÕâÖÖÇé¿ö£¬¾ÍÒªÕë¶Ô²»Í¬µÄÍøÒ³À´½øÐÐÉí·ÝÑéÖ¤ÁË¡£
ҪʵÏÖÕâÖÖ¹¦ÄÜ£¬Ò²Ö»Òª½«¡¶asp.netÖеÄÉí·ÝÑéÖ¤£¨×î¼òµ¥Æª£©¡·ÉÔ×÷Ð޸쬾ßÌå²Ù×÷·½Ê½ÈçÏÂËùʾ£º
µÚÒ»²½¡¢´´½¨Ò»¸ö×ÓÎļþ¼Ð£¬½«ËùÓÐÒªÑéÖ¤µÄÍøÒ³¶¼·ÅÔÚÕâ¸öÎļþ¼ÐÖУ¬ÉèÖøÃÎļþ¼ÐµÄÃû×ÖΪ“admin”¡£
µÚ¶þ²½¡¢ÐÞ¸Äweb.configÎļþ¡£
1¡¢ÔÚ<system.web>ºÍ</system.web>ÖÐÕÒµ½<authentication>½Ú£¬½«Æä¸ÄΪ“<authentication mode="Forms"><forms loginUrl="~/admin/AdminLogin.aspx"></forms></authentication>”£¬ÆäÖÐForms´ú±íʹÓÃ±íµ¥ÈÏÖ¤£»loginUrlÓÃÓÚÖ¸¶¨µÇÂ¼Ò³ÃæURL£¬¸öÈ˱ȽÏϲ»¶½«µÇÂ¼Ò³ÃæÒ²·ÅÔÚadminÎļþ¼ÐÖУ¬ËùÒÔÔÚ´ËÒªÖ¸¶¨µÇÂ¼Ò³ÃæURL£¬Èç¹û»¹ÊÇÏëʹÓøùĿ¼ÖеÄlogin.aspxÒ³Ãæ×÷ΪµÇÂ¼Ò³Ãæ£¬Ôò¿ÉÒÔÊ¡ÂÔ<forms>½Ú¡£
2¡¢ÔÚ<system.web>ºÍ</system.web>ÖÐÌí¼Ó“<authorization><allow users="?"/></authorization>”£¬ÆäÖГ<allow users="?"/>”´ú±íÔÊÐíËùÓеÄÄäÃûÓû§¡£×¢Òâ´Ë´¦Óë¡¶asp.netÖеÄÉí·ÝÑéÖ¤£¨×î¼òµ¥Æª£©¡·µÄÇø±ð£¬ÔÚ¡¶asp.netÖеÄÉí·ÝÑéÖ¤£¨×î¼òµ¥Æª£©¡·ÖУ¬´Ë´¦Ê¹ÓõÄÊÇ“<deny users="?"/>”£¬ÓÃÓھܾøËùÓÐÄäÃûÓû§¡£
µÚÈý²½¡¢ÔÚÐèÒªÉí·ÝÑéÖ¤µÄ×ÓÎļþ¼ÐÖÐÌí¼ÓÒ»¸öweb.configÎļþ£¬ÔÚ±¾ÀýÖÐΪÔÚ“admin”Îļþ¼ÐÖÐÌí¼Ó¸ÃÎļþ¡£
µÚËIJ½¡¢ÐÞ¸ÄÐèÒªÉí·ÝÑéÖ¤µÄ×ÓÎļþ¼ÐÖеÄweb.configÎļþ£¬ÔÚ±¾ÀýÖÐΪ“admin”Îļþ¼ÐÖеÄweb.configÎļþ¡£
ÔÚ<system.web>ºÍ</system.web>ÖУ¬Ìí¼Ó“<authorization><deny users="?"/></authorization>”£¬ÓÉÓÚÔÚ¸ùĿ¼ÖеÄweb.configÎļþÖÐÉùÃ÷ÁËÔÊÐíËùÓÐÄäÃûÓû§·ÃÎÊ£¬ËùÒÔÔÚ²»ÄÜÔÊÐíÄäÃûÓû§·ÃÎʵÄ×ÓÎļþ¼ÐÖУ¬±ØÐëҪʹÓÓ<deny users="?"/>”À´¾Ü¾øÄäÃûÓû§·ÃÎÊ¡£ÁíÍ⣬ÔÚ×ÓÎļþ¼ÐÖеÄweb.configÎļþÖпÉÒÔûÓÐ<authentication>½Ú¡£
µÚÎå²½¡¢ÔÚ“admin”×ÓÎļþ¼ÐÖд´½¨AdminLogin.aspxÎļþ¡£Èç


Ïà¹ØÎĵµ£º

ASP.NET ´´½¨XML

 public void CreatXml(int oid)
        {
            XmlTextWriter writer = null;
           string fileName ="a"+ oid.ToString() + ".xml";
   ......

asp.net ת»»ÈËÃñ±Ò´óС½ð¶î


using System;
using System.Collections.Generic;
using System.Text;
namespace Common
{
/// <summary>
/// ת»»ÈËÃñ±Ò´óС½ð¶î¡£
/// </summary>
public class Rmb
{
/// <summary>
/// ת»»ÈËÃñ±Ò´óС½ð¶î
/// </summary>
/// <param name="num">½ð¶î</ ......

д¸øÄÇЩASP.NET³ÌÐòÔ±£ºÍøÕ¾ÖеݲȫÎÊÌâ

ÔÚÍøÂç¾­³£¿´µ½ÍøÕ¾±»¹ÒÂí¡¢Ö÷Ò³±»Ð޸ĵÄÐÂÎÅ£¬ÆäʵÕâЩÎÊÌâ¿ÉÄÜÊÇ¶à·½ÃæµÄ£¬·þÎñÆ÷£¬ÍøÕ¾³ÌÐòµÈµÈ¡£¡£¡£µ«ÊÇÏÖÔÚÒç³öÒѾ­±»ÈËÃÇÖØÊӺͷþÎñÆ÷µÄ²»¶ÏÍêÉÆ£¬·þÎñÆ÷ϵͳ©¶´Ò²²»ÊÇÄÇôÈÝÒ×·¢¾ò£¬µ±È»Ò²Òª±£Ö¤µÚÈý·½µÄÈí¼þ°²È«¡£
×öÏîĿҲÓÐÒ»¶Îʱ¼äÁË¡£ÔÚ³ÌÐòÖÐÒ²Óöµ½ºÜ¶à°²È«·½ÃæµÄÎÊÌâ¡£Ò²¸Ã×ܽáÒ»ÏÂÁË¡£Õâ¸öÏîÄ¿ÊÇÒ»¸öCMSÏ ......

ASP.NET ÉÏ´«Í¼Æ¬²¢Éú³ÉËõÂÔͼ

private void btnUploadPicture_Click(object sender, System.EventArgs e) { //¼ì²éÉÏ´«ÎļþµÄ¸ñʽÊÇ·ñÓÐЧ if(this.UploadFile.PostedFile.ContentType.ToLower().IndexOf("image") < 0) { Response.Write("ÉÏ´«Í¼Æ¬¸ñʽÎÞЧ£¡"); return; } //Éú³Éԭͼ Byte[] oFileByte = new byte[this.UploadFile.PostedFile.Conte ......

Asp.net treeviewʵÏÖÎÞÏÞ¼¶Ê÷ʵÏÖ´úÂë

×î½üÑо¿ÁËÒ»ÏÂtreeview£¬·¢ÏÖÓÐÁ½ÖÖʵÏÖÎÞÏÞ¼¶Ê÷µÄ·½·¨£¬ÎÄ×Ö²»Ïë¶àд£¬Ö±ÈëÖ÷Ìâ¡£
ÏÈ¿´¿´Ð§¹ûͼ£º
ÏÈ¿´¿´Êý¾Ý¿â±íµÄÉè¼Æ£¬Êý¾Ý±íÖ÷Òª°üÀ¨ID£¬Name£¬ParentIDÕâÈýÏÆäÖÐIDÊÇÖ÷¼ü£¬ParentID¶ÔÓ¦½ÚµãµÄ¸¸½Úµã£º
·½·¨Ò»£ºÓõݹé±éÀúÊý¾Ý£¬²¢½«½ÚµãÖð¸öÌí¼Óµ½treeviewÖÐÈ¥¡£
1.ÏȽøÐÐÊý¾Ý¿âÁ¬½ÓºÍÊý¾ÝµÄ¶ÁÈ¡£¬²¢½«¸ù½Ú ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ