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

ASP.NETÄ£ÄâÖ¸¶¨ÕʺÅȨÏÞ, ɾ³ý·Ç±¾»úͼƬÎļþ

 ËµÃ÷: Ö´Ðе±Ç° Web ÇëÇóÆڼ䣬³öÏÖδ´¦ÀíµÄÒì³£¡£Çë¼ì²é¶ÑÕ»¸ú×ÙÐÅÏ¢£¬ÒÔÁ˽âÓйظôíÎóÒÔ¼°´úÂëÖе¼Ö´íÎóµÄ³ö´¦µÄÏêϸÐÅÏ¢¡£
Òì³£ÏêϸÐÅÏ¢: System.ArgumentException: ²»Ö§³Ö URI ¸ñʽ¡£
Ô´´íÎó:
ÐÐ 30: protected void BTNCLick(object sender, EventArgs e)
ÐÐ 31: {
ÐÐ 32: System.IO.File.Delete(path + "200911313360.jpg");
ÐÐ 33: ScriptManager.RegisterStartupScript(Page, typeof(Page), "ok", "alert('ɾ³ý³É¹¦');", true);
ÐÐ 34: }
²»Ö§³Ö URI ¸ñʽ¡£
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class _Default : System.Web.UI.Page
{
    protected System.Web.UI.WebControls.Label lbExist;
        protected System.Web.UI.WebControls.Label Label2;
        public const int LOGON32_LOGON_INTERACTIVE = 2;
        public const int LOGON32_PROVIDER_DEFAULT = 0;
        WindowsImpersonationContext impersonationContext; 
        [DllImport("advapi32.dll", CharSet=CharSet.Auto)]
        public static extern int LogonUser(String lpszUserName,String lpszDomain,
        String lpszPassword,int dwLogonType,int dwLogonProvider,
        ref IntPtr phToken);
        [DllImport("advapi32.dll", CharSet=System.Runtime.InteropServices.CharSet.Auto, 
        SetLastError=true)]
        public extern static int DuplicateToken(IntPtr hToken,int impersonationLe


Ïà¹ØÎĵµ£º

ASP.NET MVC ÈëÃÅ

ViewDataÓÐÒ»¸öModelStateµÄÊôÐÔ£¬ÕâÊÇÒ»¸öÀàÐÍΪModelStateDictionaryµÄModelStateÀàÐ͵Ä×ֵ伯ºÏ¡£ÔÚ½øÐÐÊý¾ÝÑéÖ¤µÄʱºòÕâ¸öÊôÐÔÊDZȽÏÓÐÓõġ£ÔÚʹÓÃHtml.ValidationMessage()µÄʱºò£¬¾ÍÊÇ´ÓViewData.ModelStateÖмì²âÊÇ·ñÓÐÖ¸¶¨µÄKEY£¬Èç¹û´æÔÚ£¬¾ÍÌáʾ´íÎóÐÅÏ¢¡£ÀýÈçÔÚǰһƪÎÄÕÂASP.NET MVC ÈëÃÅ7¡¢HellperÓëÊý¾ÝµÄÌá ......

ASP.NET AJAX¿Í»§¶Ë±à³ÌÖ®Âã¨Ò»£©

ÕªÒª
      ±¾ÎĽ«Ê×ÏȽéÉÜÒ»ÏÂÎÄÕµÄд×÷±³¾°ºÍÓõ½µÄÏà¹Ø¼¼Êõ¡£È»ºó½«·Ö±ðʹÓÃÆÓËصÄAjax¼¼ÊõºÍASP.NET AJAX¿ò¼Ü·Ö±ðʵÏÖ¾­µäµÄ“Hello£¡XX”£¬Í¨¹ýÁ½¸öСÀý×Ó£¬Ê¹ÅóÓÑÃǶÔÕâ¸ö¿ò¼ÜµÄÌصãºÍ¿ò¼ÜµÄʹÓ÷½·¨ÓÐÒ»¸ö³õ²½µÄÈÏʶ¡£
Ç°ÑÔ
      ÎÒÏ룬Èç¹û½ñÌìÄ ......

asp.netµÄÒ³ÃæÖ´Ðйý³Ì½²½â

Ê×ÏÈÏÈÖØÎÂһϹØÓÚb/sģʽµÄÕû¸öÇëÇó¹ý³Ì:
¿Í»§¶Ëͨ¹ýÔÚä¯ÀÀÆ÷µÄµØÖ·À¸ÇÃÈëµØÖ·À´·¢ËÍÇëÇóµ½·þÎñÆ÷¶Ë  ->  ·þÎñÆ÷½ÓÊÕµ½ÇëÇóÖ®ºó£¬·¢¸øÏàÓ¦µÄ·þÎñÆ÷¶ËÒ³Ã棨Ҳ¾ÍÊǽű¾£©À´Ö´ÐУ¬½Å±¾²úÉú¿Í»§¶ËµÄÏìÓ¦£¬·¢Ëͻؿͻ§¶Ë   ->  ¿Í»§¶Ëä¯ÀÀÆ÷½ÓÊÕµ½·þÎñÆ÷´«»ØµÄÏìÓ¦£¬¶ÔHtml½øÐ ......

ASP.NETÒ³Ãæ»Ø·¢Óëʼþ»Ø´«

         Ò³Ãæʼþ˳ÐòÊǹ̶¨µÄ£¬µ«Ò³ÃæÉϵĿؼþʼþÔòÒÀÀµ¾ßÌåÒ³ÃæºÍÓû§µÄ²Ù×÷¡£Èç¹û¿Ø¼þµÄAutoPostBackÊôÐÔÉèÖÃΪtrue£¨Ä¬ÈÏֵΪfalse£©£¬ÄÇô½«Á¢¿ÌÒýÆðÒ³Ãæ»Ø·¢£¬¼´Ò³ÃæÖи÷¸ö¿Ø¼þµÄÖµ»Ø´«µ½Web·þÎñÆ÷ÉÏ£¬Òý·¢ÏàӦʼþ£¬ÓÉʼþµÄ´¦Àí³ÌÐò´¦Àí¡£´¦ÀíÍê³ÉºóÈç¹ûûÓÐÌøתָÁ¸ÃÒ³Ãæ ......

ASP.NET¿çÒ³Ãæ´«Öµ¼¼ÇÉ×ܽá

 ¡ï1.  Ê¹ÓÃQueryString±äÁ¿
¡¡¡¡¡¡QueryStringÊÇÒ»Öַdz£¼òµ¥µÄ´«Öµ·½Ê½£¬Ëû¿ÉÒÔ½«´«Ë͵ÄÖµÏÔʾÔÚä¯ÀÀÆ÷µÄµØÖ·À¸ÖС£Èç¹ûÊÇ´«µÝÒ»¸ö»ò¶à¸ö°²È«ÐÔÒªÇ󲻸߻òÊǽṹ¼òµ¥µÄÊýֵʱ£¬¿ÉÒÔʹÓÃÕâ¸ö·½·¨¡£µ«ÊǶÔÓÚ´«µÝÊý×é»ò¶ÔÏóµÄ»°£¬¾Í²»ÄÜÓÃÕâ¸ö·½·¨ÁË¡£ÏÂÃæÊÇÒ»¸öÀý×Ó£º
a.aspxµÄC#´úÂë
private vo ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ