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

ASP.NETѧϰ¾­ÑéÊÕ¼¯£¨²»¶Ï¸üУ©

       ÔÚÈÕ³£Ñ§Ï°ºÍʹÓÃASP.NETµÄ¹ý³ÌÖУ¬ÓÐЩ±È½ÏÌØÊâÓÐÓõľ­ÑéÊÕ¼¯ÔÚÕâÀ·½±ã×Ô¼º¼ÇÒäºÍÀí½â£¬Ò²Ï£ÍûÄÜ°ïÖúµ½Ò»Ð©³õѧÕ߲ο¼¡£Èç¹ûÓÐЩ²»×ãµÄµØ·½Ï£Íû¸ßÊÖ²»Áߴͽ̣¡£¡£¡
Ò»¡¢ÔÚÒ»°ã´¦ÀíÎļþ(ashx)ÖÐʹÓÃSessionʱ£¬ÐèÒªÒý½øÃüÃû¿Õ¼ä£ºusing System.Web.SessionState; ²¢ÇÒʹ¸ÃÀàʵÏÖIRequiresSessionState½Ó¿Ú£¬È»ºó¾ÍÄÜͨ¹ýHttpContext.Current.SessionʹÓÃSessionÁË£¡   
       
¼òÒ×´úÂëÈçÏ£º
          
using System.Web.SessionState;
........
public class Handler : IHttpHandler, IRequiresSessionState
{
    public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "text/plain";
       
         HttpContext.Current.Session["user"] = "luoyisheng";         
       
      }
 
    public bool IsReusable
    {
         get
         {
             return false;
         }
     }
}


Ïà¹ØÎĵµ£º

Asp.net(C#)¶àÎļþÉÏ´«


FileUp.aspx Ò³Ãæ
 1<%@ Page language="c#" Codebehind="FileUp.aspx.cs" AutoEventWireup="false" Inherits="TestCenter.FileUp" %>
 2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
 3<HTML>
 4  <HEAD>
 5    &l ......

ÔâÓöAsp.Net³¤ÎļþÃûÏÂÔصÄÎÊÌâºÍ½â¾ö°ì·¨

ÔÚAsp.NetÖÐдÁËÒ»¸ö¸½¼þÉÏ´«ºÍÏÂÔصijÌÐò£¬¸½¼þÉÏ´«µ½Êý¾Ý¿âÖУ¬È»ºó½«¸½¼þµÄGUID±£´æÆðÀ´£¬ÎÒÃÇ¿ÉÒÔ¸ù¾ÝGUIDÀ´ÕÒµ½Êý¾Ý¿âÖеĸ½¼þ£¬Ò»°ã¸½¼þÏÂÔصĴúÂëÊÇ£º
private void Download(string ID)
    {
        file = logic.GetA ......

asp.net Êý¾Ý¿â²Ù×÷

ASP.NET²Ù×÷Êý¾Ý¿â
ͨ¹ý¶ÔADO.NETµÄ»ù±¾½²½â£¬ÒÔ¼°½²½âÁËһЩÊý¾ÝÔ´¿Ø¼þµÄ»ù±¾Ó÷¨ºó£¬±¾Õ½«½éÉÜһЩASP.NET²Ù×÷Êý¾Ý¿âµÄ¸ß¼¶Ó÷¨£¬°üÀ¨Ê¹ÓÃSQLHelper£¬ÒÔ¼°Êý¾ÝÔ´¿Ø¼þ¶ÔÊý¾ÝµÄ²Ù×÷¡£±¾ÕÂÊǶÔÇ°ÃæµÄÊý¾Ý¿â֪ʶµÄÒ»ÖÖ²¹³äºÍÌáÉý¡£
9.1  ʹÓÃADO.NET²Ù×÷Êý¾Ý¿â
ÉÏÒ»ÕÂÖнéÉÜÁËADO.NETµÄ»ù±¾¸ÅÄî¡¢ADO.NETµÄ¶ÔÏó£¬ÒÔ¼ ......

ASP.NET URL Rewrite. URLÖØд

URL ÖØдÊǽØÈ¡´«Èë Web ÇëÇó²¢×Ô¶¯½«ÇëÇóÖض¨Ïòµ½ÆäËû URL µÄ¹ý³Ì¡£
  ±ÈÈçä¯ÀÀÆ÷·¢À´ÇëÇóhostname/101.aspx £¬·þÎñÆ÷×Ô¶¯½«Õâ¸öÇëÇóÖж¨ÏòΪhttp://hostname/list.aspx?id=101¡£
urlÖØдµÄÓŵãÔÚÓÚ£º
    Ëõ¶Ìurl£¬Òþ²Øʵ¼Ê·¾¶Ìá¸ß°²È«ÐÔ
    Ò×ÓÚÓû§¼ÇÒäºÍ¼üÈë¡£
 &nbs ......

asp.net ͼƬ´¦Àí »ñȡͼƬ¿í¶ÈºÍ¸ß¶È

1.»ñȡͼƬ¿í¶ÈºÍ¸ß¶È
    1.Äú¿ÉÒÔʹÓà System.Drawing.Image Àà
    System.Drawing.Image img = System.Drawing.Image.fromFile(Server.MapPath("example.gif"));
int width = img.Width;
int height = img.Height;
img.Dispose();
µ«ÊÇÕâÀïÎÒÃÇÈ´²»ÄÜÔÚµ¼ÈëÃû³Æ¿Õ¼äºóʹÓà Image& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ