ASP.NET ÉÏ´«Í¼Æ¬²¢Éú³ÉËõÂÔͼ
private void btnUploadPicture_Click(object sender, System.EventArgs e) { //¼ì²éÉÏ´«ÎļþµÄ¸ñʽÊÇ·ñÓÐЧ if(this.UploadFile.PostedFile.ContentType.ToLower().IndexOf("image") < 0) { Response.Write("ÉÏ´«Í¼Æ¬¸ñʽÎÞЧ£¡"); return; } //Éú³ÉÔͼ Byte[] oFileByte = new byte[this.UploadFile.PostedFile.ContentLength]; System.IO.Stream oStream = this.UploadFile.PostedFile.InputStream; System.Drawing.Image oImage = System.Drawing.Image.fromStream(oStream); int oWidth = oImage.Width; //Ôͼ¿í¶È int oHeight = oImage.Height; //Ôͼ¸ß¶È int tWidth = 100; //ÉèÖÃËõÂÔͼ³õʼ¿í¶È int tHeight = 100; //ÉèÖÃËõÂÔͼ³õʼ¸ß¶È //°´±ÈÀý¼ÆËã³öËõÂÔͼµÄ¿í¶ÈºÍ¸ß¶È if(oWidth >= oHeight) { tHeight = (int)Math.Floor(Convert.ToDouble(oHeight) * (Convert.ToDouble(tWidth) / Convert.ToDouble(oWidth))); } else { tWidth = (int)Math.Floor(Convert.ToDouble(oWidth) * (Convert.ToDouble(tHeight) / Convert.ToDouble(oHeight))); } //Éú³ÉËõÂÔÔͼ Bitmap tImage = new Bitmap(tWidth,tHeight); Graphics g = Graphics.fromImage(tImage); g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High; //ÉèÖøßÖÊÁ¿²åÖµ·¨ g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; //ÉèÖøßÖÊÁ¿,µÍËٶȳÊÏÖƽ»¬³Ì¶È g.Clear(Color.Transparent); //Çå¿Õ»²¼²¢ÒÔ͸Ã÷±³¾°É«Ìî³ä g.DrawImage(oImage,new Rectangle(0,0,tWidth,tHeight), new Rectangle(0,0,oWidth,oHeight),GraphicsUnit.Pixel); string oFullName = Server.MapPath(".") + "/" + "o" + DateTime.Now.ToShortDateString().Replace("-","") + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + DateTime.Now.Millisecond.ToString() + ".jpg"; //±£´æÔͼµÄÎïÀí·¾¶ string tFullName = Server.MapPath(".") + "/" + "t" + DateTime.Now.ToShortDateString().Replace("-","") + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + DateTime.Now.Millisecond.ToString() + ".jpg"; //±£´æËõÂÔͼµÄÎïÀí·¾¶ try { //ÒÔJPG¸ñʽ±£´æͼƬ oImage.Save(oFullName,System.Drawing.Imaging.ImageFormat.Jpeg); tImage.Save(tFul
Ïà¹ØÎĵµ£º
ÔÚºǫ́ÓÃC#ö¾Ù¿Ø¼þ²»ÏñjavascriptÄÇô¼òµ¥£¬HasControlsÖ»ÄÜ×¥µ½Ö±Êôϼ¶µÄ¿Ø¼þ£¬Èç¹ûÓжà¸ödiv£¬tableǶÌ×£¬¾ÍÒªµÝ¹éÁË
public static void CloseAllContent(System.Web.UI.Control page,bool bOpen)
{
int nPageControls = page.Controls.Count ......
»·¾³£ºASP.NET(C#)£¬Visual Studio 2010¡£
Ìáʾ£ºÎ´ÄܼÓÔØÀàÐÍ“EMS.App_Code.PersonalInfo”¡£Èç¹û¸ÃÀàÐÍλÓÚApp_CodeÎļþ¼ÐÖУ¬Çë¼ì²éËüÊÇ·ñÒѱàÒë¡£Èç¹û¸ÃÀàÐÍλÓÚÒѱàÒëµÄ³ÌÐò¼¯ÖУ¬Çë¼ì²é¸Ã³ÌÐò¼¯ÊÇ·ñ±»¸ÃÏîÄ¿ÒýÓá£
´¦Àí£º
×Ô¼º×öµÃÒ»¸öС³ÌÐò£¬È¡ÃûEMS£¬²¢ÔÚApp_CodeÎļþ¼ÐϽ¨Á¢ÁËÀàPersonalInfo¡¢Sal ......
¹«Ë¾½»¸øÎÒ¸öÏîÄ¿£¬ÒѾÍê³ÉÁËÒ»²¿·Ö£¬ÐèÒª×öÖÐÓ¢ÎÄË«ÓïÑÔ£¬ÒÔÇ°Ìý±ðÈË˵³ÌÐò¶àÓïÑÔʲôµÄ£¬¶¼²»ÖªµÀ´ÓÄÄÏÂÊֵá£ÏîÄ¿¼Ü¹¹ÒѾ´îºÃÁË£¬´ó¸Å¿´ÁËһϣ¬ÖªµÀÊÇʹÓÃ×ÊÔ´ÎļþÀ´ÊµÏֵģ¬²»ËµÁË£¬¸Ï½ô×Ô¼ºÊÔÊÔ°É¡£ÊÔÁ˲Żá¼Çס£¬²ÅÊÇ×Ô¼ºµÄO(∩_∩)O~
1. н¨Asp.net WebÓ¦ÓóÌÐòChangeLanuage£¬Ð½¨aspxÒ³ÃæDefau ......
ÔÚASP.NETÖÐÎÒÃǾ³£ÐèÒªÊä³öһЩJS½Å±¾£¬±ÈÈ絯³öÒ»¸ö¾¯¸æ´°¿Ú£¬·µ»Øµ½ÀúÊ·Ò³ÃæµÈJS¹¦ÄÜ£¬ÎÒ¿´µ½ÍøÉϺöàÕâ·½ÃæµÄ´úÂ룬ÒÔÏ´úÂëÊÇÆäÖÐÖ®Ò»¡£
Õû¸ö³ÌÐòµÄ´úÂëÈçÏ£º
¸´ÖÆ´úÂë ´úÂëÈçÏÂ:
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.UI;
/// &l ......
ÔÚÍøÂç¾³£¿´µ½ÍøÕ¾±»¹ÒÂí¡¢Ö÷Ò³±»Ð޸ĵÄÐÂÎÅ£¬ÆäʵÕâЩÎÊÌâ¿ÉÄÜÊǶ෽ÃæµÄ£¬·þÎñÆ÷£¬ÍøÕ¾³ÌÐòµÈµÈ¡£¡£¡£µ«ÊÇÏÖÔÚÒç³öÒѾ±»ÈËÃÇÖØÊӺͷþÎñÆ÷µÄ²»¶ÏÍêÉÆ£¬·þÎñÆ÷ϵͳ©¶´Ò²²»ÊÇÄÇôÈÝÒ×·¢¾ò£¬µ±È»Ò²Òª±£Ö¤µÚÈý·½µÄÈí¼þ°²È«¡£
×öÏîÄ¿Ò²ÓÐÒ»¶Îʱ¼äÁË¡£ÔÚ³ÌÐòÖÐÒ²Óöµ½ºÜ¶à°²È«·½ÃæµÄÎÊÌâ¡£Ò²¸Ã×ܽáÒ»ÏÂÁË¡£Õâ¸öÏîÄ¿ÊÇÒ»¸öCMSÏ ......