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

ASP.NET ÉÏ´«Í¼Æ¬ÖÁÊý¾Ý¿â²¢¶ÁȡͼƬÏÔʾ

1£ºÉÏ´«Í¼Æ¬µÄÏà¶Ô·¾¶µ½Êý¾Ý¿âÖÐÏàÓ¦×Ö¶ÎÀ¶ÁÈ¡ÏÔʾʱ£¬½«¿Ø¼þ£¨¼ÙÉèÓõÄÊÇImage¿Ø¼þ£©µÄImageUrlÊôÐÔÖ¸Ïò¸ÃÏà¶Ô·¾¶¼´¿É¡£
2£º½«Í¼Æ¬ÒÔ¶þ½øÖÆÁ÷µÄ·½Ê½ÕûÌåÉÏ´«µ½Êý¾Ý¿âÀ¶ÁÈ¡ÏÔʾʱ£¬ÒÔ¶þ½øÖÆÁ÷µÄ·½Ê½ÕûÌå¶Á³ö¡£ÕâÖÖ·½·¨ÉÔ΢Âé·³Ò»µã£¬µ«±£´æµÄÊÇͼƬÕûÌåµ½Êý¾Ý¿âÀï¡£
µÚÒ»ÖÖ·½·¨£¬ÊµÏÖÆðÀ´±È½Ï¼òµ¥£¬ÒòΪ´æÈëÊý¾Ý¿âÀïµÄÖ»ÊÇͼƬÏà¶Ô·¾¶£¬µ±È»£¬Í¬Ê±Ò²¾ÍÓкܴóµÄ¾ÖÏÞÐÔ£¬ÓÉÓÚÊÇÏà¶Ô·¾¶£¬ËùÒÔµ±±¾µØµÄͼƬ±ä»»ÁËλÖÃ
»òÒƳý£¬»òÊÇÔÚÆäËûÖ÷»úÉÏä¯ÀÀ¸ÃͼƬʱ£¬¾ÍÎÞ·¨ÏÔʾÁË¡£µÚ¶þÖÖ·½·¨£¬¾Í±È½ÏÁé»îÁË£¬¿ÉÒÔÓÃÔÚ½»»¥ÐÔµÄÒ³Ã棬±ÈÈçУÓѼ£¬ÒòΪÉÏ´«µÄÊÇÕûÕÅͼƬ£¬Ëù
ÒÔÖ»Òª¶ÁÈ¡ÕýÈ·£¬¾ÍÄÜÈκÎÖ÷»úÉÏÏÔʾ³öÀ´¡£
ÏÂÃ棬·Ö±ðͨ¹ýʵ¼ÊµÄ´úÂ룬½éÉÜÕâÁ½ÖÖ·½·¨¡£
ÔÚÕâÁ½¸ö·½·¨ÀÎÒ½«Óõ½Ò»¸ö¿Ø¼þ£ºFileUpload£¬¸Ã¿Ø¼þµÄ¾ßÌåÓ÷¨²Î¼û°Ù¶È¹È¸è¡£¡£¡£Ñ§Ï°¹ý³ÌÖУ¬×îºÃµÄÀÏʦ¾ÍÊÇËûÃÇÁ©¡£
1£ºÉÏ´«Í¼Æ¬Ïà¶Ô·¾¶£¬²¢¶ÁÈ¡ÏÔʾ¡£
Êý¾Ý¿âÀïµÄ×ֶκܼòµ¥£¬¾ÍÁ½¸ö
Image_ID    int    identity(1,1)     primarykey    not null
Image_Wpath    varchar(50)        null
Image_Wpath ÓÃÀ´±£´æͼƬµÄÏà¶Ô·¾¶
ÕâÀï×¢Ò⣬ÎÒÐèÒªÉÏ´«µÄÎļþ¶¼·ÅÔÚÎļþ¼Ð“Image”£¬ÔÚºóÃæµÄÉÏ´«Â·¾¶Àï¾ÍÐèÒªÕâ¸öÎļþ¼Ð¡£
ÎÒÔÚÊäÈë¿òÀïÌîÈëImage_IDµÄÖµ£¬¶ÁÈ¡Ö¸¶¨µÄͼƬ£¬ÔÚͼƬµÄÏÂÃ棬ÏÔʾ³ö¸ÃͼƬµÄÏà¶Ô·¾¶¡£
½ÓÏÂÀ´£¬ÎÒÃÇ¿´Ò»Ï¾ßÌå´úÂëʵÏÖÉÏ´«ºÍ¶ÁÈ¡ÏÔʾ¹¦ÄÜ¡£
ÔÚÏîÄ¿ÀÓÐÒ»¸ösqlHelperÀ࣬ÊÇһЩ³£ÓõÄÊý¾Ý·ÃÎÊ·½·¨¡£ÕâÀï¾Í²»Ïêϸ½²ÁË¡£
ÉÏ´«°´Å¥ÀïµÄʼþ:
protected void Button1_Click(object sender, EventArgs e)
{
       string name = FileUpload1.FileName;       //»ñÈ¡ÎļþÃû
       string type = name.Substring(name.LastIndexOf(".") + 1);    //»ñÈ¡ÎļþÀàÐÍ
       string ipath = Server.MapPath("Image") + "\\" + name;    //»ñÈ¡Îļþ·¾¶
       string wpath = "Image\\" + name;        //[color=red]ÉèÖÃÎļþ±£´æÏà¶Ô·¾¶(ÕâÀïµÄ·¾¶Æðʼ¾ÍÊÇÎÒÃÇ´æ·ÅͼƬµÄÎļþ¼ÐÃû)[/color]
       string query1 = "insert into Images values('"


Ïà¹ØÎĵµ£º

ASP.NET 2.0 AJAXÖÐWebserviceµ÷Ó÷½·¨

ASP.NET 2.0 AjaxÖÐÄܹ»ÔÚ¿Í»§¶ËjsÖкܷ½±ãµØµ÷Ó÷þÎñÆ÷Webservice£¬ÒÔÏÂΪһЩµ÷ÓõÄʾÀý¡£±ÊÕß°²×°µÄASP.NET 2.0 AJAX
°æ±¾ÎªAJAX November CTP¡£
Èý¸öʾÀý·Ö±ðΪ£º
1 ´ø²ÎÊýµÄWS·½·¨
2 ²»´ø²ÎÊýµÄWS·½·¨
3 ²ÎÊýÀàÐÍΪDataTableµÄWS·½·¨
Ò»¡¢WebMethod
×¢ÒâÒªµã£º
1 WebMethodÀàÐèÒªÌí¼ÓÃüÃû¿Õ¼ä Microsoft.Web. ......

ASP.NETÅäÖÃÎļþWeb.config

ÈÏʶASP.NETÅäÖÃÎļþWeb.config
¡¡Ò»¡¢ÈÏʶWeb.configÎļþ
Web.configÎļþÊÇÒ»¸öXMLÎı¾Îļþ£¬ËüÓÃÀ´´¢´æ ASP.NET Web Ó¦ÓóÌÐòµÄÅäÖÃÐÅÏ¢£¨Èç×î³£ÓõÄÉèÖÃASP.NET Web Ó¦ÓóÌÐòµÄÉí·ÝÑéÖ¤·½Ê½£©£¬Ëü¿ÉÒÔ³öÏÖÔÚÓ¦ÓóÌÐòµÄÿһ¸öĿ¼ÖС£µ±Äãͨ¹ýVB.NETн¨Ò»¸öWebÓ¦ÓóÌÐòºó£¬Ä¬ÈÏÇé¿öÏ»áÔÚ¸ùĿ¼×Ô¶¯´´½¨Ò»¸öĬÈϵÄ
W ......

asp.netµ¼³ö³ÉEXCEL

ÒÔÏÂÊǵ¼³öµÄ·½·¨£º
public static void ToExcel(System.Web.UI.Control ctl)
    {
        //HttpContext.Current.Response.Charset   ="GB2312";  
        HttpContext.Current.Response.Charset = "G ......

asp.net×Ô¶¯Ö´ÐÐÈÎÎñ

ÔÚ¸´ÔÓµÄÒµÎñÓ¦ÓóÌÐòÖУ¬ÓÐʱºò»áÒªÇóÒ»¸ö»òÕ߶à¸öÈÎÎñÔÚÒ»¶¨µÄʱ¼ä»òÕßÒ»¶¨µÄʱ¼ä¼ä¸ôÄڼƻ®½øÐУ¬±ÈÈ綨ʱ±¸·Ý»òͬ²½Êý¾Ý¿â£¬¶¨Ê±·¢Ë͵ç×ÓÓʼþ£¬¶¨ÆÚ´¦ÀíÓû§×´Ì¬ÐÅÏ¢£¬Ö§¸¶ÏµÍ³Öж¨ÆÚͬ²½Òì³£Õ˵¥µÈµÈ£¬ÎÒÃdzÆ֮Ϊ¼Æ»®ÈÎÎñ¡£ÊµÏּƻ®ÈÎÎñµÄ·½·¨Ò²Óкܶ࣬¿ÉÒÔ²ÉÓÃSQLAgentÖ´Ðд洢¹ý³Ì£¬²ÉÓÃWindowsÈÎÎñµ÷¶È³ÌÐòÀ´ÊµÏÖ£ ......

Asp.Net 4.0 SEOÔöÇ¿Ö® UrlRouting

ÔÚ.Net 4.0֮ǰÎÒÃÇΪÁË×ö³öËÑË÷ÒýÇæÓѺõģ¬¶ÔÓû§Ò²ÓѺõÄurl¶¼ÊÇÐèÒª×Ô¼ºÊµÏÖUrlÖØд£¬ÏÖÔÚ²»ÐèÒªÁË£¬.Net 4.0ΪÎÒÃÇ×öÕâÒ»ÇС£UrlRoutingÖ®ËùÒÔ³Æ֮ΪRoutingÊÇÒòΪËü²»µ«ÊµÏÖÁËUrlÖØд»¹¿ÉÒÔͨ¹ý²ÎÊýµÃµ½ÖØдºóµÄUrlÔÚÒ³ÃæÉÏʹÓá£
1. Url Routing µÄͨ³£Ó÷¨
UrlRoutingÔÚAsp.Net MvcÏîÄ¿Öб»¹ã·ºÊ¹Óã¬ÔÚMvcÖкܺà ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ