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 ͼƬµÄÔÒòÁË¡£
Ïà¹ØÎĵµ£º
µÚÒ»²½£ºÀýÈçÓû§¿Ø¼þ·ÅÔÚMyList.Ascx£¬È»ºóÆäControlÖ¸ÁîÊÇ£º
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ViewComment.ascx.cs" Inherits="Control_ViewComment"%>
ÕâʱºòÒѾÓÐÁËInherits£¬×Ô´øÁËClassName¾ÍÊÇÆäÃû³Æ£¬Èç¹ûûÓУ¬Ôò±ØÐë´´½¨ClassNameÊôÐÔ¡£
¼ÙÉèÆäÓй«¹²ÊôÐÔID¡£
µÚ¶þ²½£ ......
¹Ø±Õ´°Ìå
1.
this.btnClose.Attributes.Add("onclick", "window.close();return false;");
2.¹Ø±Õ±¾´°Ìå¼äÌøתµ½ÁíÒ»¸öÒ³Ãæ
this.HyperLink1.NavigateUrl = "javascript:onclick=window.opener.location.assign
......
ÔÚ²»Í¬°æ±¾µÄ IIS ÉÏʹÓà ASP.NET MVC
ASP.NET MVC Framework ÒÀÀµÓÚ URL ·ÓÉ¡£ÎªÁËÀûÓà URL ·ÓÉ£¬¿ÉÄܲ»µÃ²»ÔÚ Web ·þÎñÆ÷ÉÏÖ´ÐжîÍâµÄÅäÖò½Öè¡£ÕâЩ²½ÖèÈ¡¾öÓÚ Internet Information Services (IIS) µÄ°æ±¾ºÍÓ¦ÓóÌÐòµÄÇëÇó´¦Àíģʽ¡£
IIS µÄ×îа汾ÊÇ°æ±¾ 7.0¡£IIS µÄ´Ë°æ±¾°üÀ¨ÔÚ Windows Server 2008 ÖС£»¹¿ÉÒÔ ......
ÔÚASP.NET2.0ÖУ¬ÎªÎÒÃÇÌṩÁËÁ½ÖÖй¦ÄÜ£¬·½±ãÎÒÃÇÖÆ×÷¹²Í¬ÌØÕ÷Ò»ÖµÄÒ³ÃæºÍµ¼º½¡£ÕâÁ½ÖÖ¹¦ÄÜÊÇĸ°åÒ³ºÍÍøÕ¾µ¼º½¡£¶ÔÓÚĸ°åÒ³´ó¼ÒºÜÇå³þÁË£¬²»¹ýÔÚ×öĸ°åҳʱ£¬¾³£ÐèÒªÌí¼Óµ¼º½À¸£¬¶ÔÓÚ´Ëasp.net 2.0 ʹÎÒÃǵŤ×÷´óΪ¼ò»¯¡£Õâ±ãÊÇÕ¾µãµØͼµÄʹÓá£
¹ËÃû˼Ò壬վµãµØͼ¾ÍÊÇÔÚÕ¾µã ......