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

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 Ê±Ê¡ÂÔ System.Drawing£¬ÒòΪÕâ»áºÍ System.Web.UI.WebControls µÄ Image ²úÉú»ìÏý¡£
»òÕßÄúÒ²¿ÉÒÔʹÓà System.Drawing.Bitmap Àà
Bitmap bmp = new Bitmap(Server.MapPath("example.jpg"));
int width = bmp.Width;
int height = bmp.Height;
bmp.Dispose();

ËäÈ»Ãû³ÆÊÇ Bitmap£¬µ«Êµ¼ÊͬÑù¿ÉÒÔ´¦Àí BMP¡¢JPEG¡¢GIF¡¢PNG µÈ¸ñʽµÄͼƬ¡£
ÄÇô System.Drawing.Image ºÍ System.Drawing.Bitmap ÓÐʲôÇø±ðÄØ£¿
System.Drawing.Image ÆäʵÊÇ System.Drawing.Bitmap µÄ»ùÀ࣬Õâ¾ÍÊÇΪʲô Bitmap ²»µ¥µ¥¿ÉÒÔ´¦Àí BMP ͼƬµÄÔ­ÒòÁË¡£


Ïà¹ØÎĵµ£º

ASP.NET¶¯Ì¬¼ÓÔØÓû§¿Ø¼þµÄʵÏÖ·½·¨

µÚÒ»²½£ºÀýÈçÓû§¿Ø¼þ·ÅÔÚMyList.Ascx£¬È»ºóÆäControlÖ¸ÁîÊÇ£º
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ViewComment.ascx.cs" Inherits="Control_ViewComment"%>
ÕâʱºòÒѾ­ÓÐÁËInherits£¬×Ô´øÁËClassName¾ÍÊÇÆäÃû³Æ£¬Èç¹ûûÓУ¬Ôò±ØÐë´´½¨ClassNameÊôÐÔ¡£
¼ÙÉèÆäÓй«¹²ÊôÐÔID¡£
µÚ¶þ²½£ ......

½Å±¾(JS)¹Ø±Õ´°Ì壨ASP.NET£©

¹Ø±Õ´°Ìå 
  1.
      this.btnClose.Attributes.Add("onclick",  "window.close();return false;");
  2.¹Ø±Õ±¾´°Ìå¼äÌøתµ½ÁíÒ»¸öÒ³Ãæ
      this.HyperLink1.NavigateUrl = "javascript:onclick=window.opener.location.assign
        ......

ÔÚ²»Í¬°æ±¾µÄ IIS ÉÏʹÓà ASP.NET MVC

ÔÚ²»Í¬°æ±¾µÄ IIS ÉÏʹÓà ASP.NET MVC
ASP.NET MVC Framework ÒÀÀµÓÚ URL ·ÓÉ¡£ÎªÁËÀûÓà URL ·ÓÉ£¬¿ÉÄܲ»µÃ²»ÔÚ Web ·þÎñÆ÷ÉÏÖ´ÐжîÍâµÄÅäÖò½Öè¡£ÕâЩ²½ÖèÈ¡¾öÓÚ Internet Information Services (IIS) µÄ°æ±¾ºÍÓ¦ÓóÌÐòµÄÇëÇó´¦Àíģʽ¡£
IIS µÄ×îа汾ÊÇ°æ±¾ 7.0¡£IIS µÄ´Ë°æ±¾°üÀ¨ÔÚ Windows Server 2008 ÖС£»¹¿ÉÒÔ ......

Õ¾µãµØͼÔÚASP.NETÍøÒ³Öеĵ¼º½×÷ÓÃ

    ÔÚASP.NET2.0ÖУ¬ÎªÎÒÃÇÌṩÁËÁ½ÖÖй¦ÄÜ£¬·½±ãÎÒÃÇÖÆ×÷¹²Í¬ÌØÕ÷Ò»ÖµÄÒ³ÃæºÍµ¼º½¡£ÕâÁ½ÖÖ¹¦ÄÜÊÇĸ°åÒ³ºÍÍøÕ¾µ¼º½¡£¶ÔÓÚĸ°åÒ³´ó¼ÒºÜÇå³þÁË£¬²»¹ýÔÚ×öĸ°åҳʱ£¬¾­³£ÐèÒªÌí¼Óµ¼º½À¸£¬¶ÔÓÚ´Ëasp.net 2.0 ʹÎÒÃǵŤ×÷´óΪ¼ò»¯¡£Õâ±ãÊÇÕ¾µãµØͼµÄʹÓá£
    ¹ËÃû˼Ò壬վµãµØͼ¾ÍÊÇÔÚÕ¾µã ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ