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

asp.net ͼƬÉÏ´«

 protected void Button1_Click(object sender, EventArgs e)
    {
      
        string fullName = this.File1.PostedFile.FileName;//»ñÈ¡ÉÏ´«ÎļþµÄȫ·¾¶
        string size = this.File1.PostedFile.ContentLength.ToString();//»ñÈ¡ÎļþÉÏ´«µÄ´óС
        string fileName = fullName.Substring(fullName.LastIndexOf("\\")+1);   //»ñÈ¡ÉÏ´«ÎļþµÄÎļþÃû
        string type = fullName.Substring(fullName.LastIndexOf(".")+1);//»ñÈ¡ÎļþÉÏ´«¸ñʽ
        if (type == "jpg" || type == "bmp" || type == "gif" || type == "ico")
        {
            this.File1.PostedFile.SaveAs(Server.MapPath("upload") + "\\" + fileName);//½«Í¼Æ¬ÉÏ´«µ½¸ÃÏîÄ¿ÖеÄuploadÎļþ¼ÐÏÂ
            this.Imp.Visible = true;
            this.Imp.ImageUrl = "upload/" + fileName;//ÏÔʾͼƬ
        }
        else
        {
            Response.Write("<script language='javascript'>alert('ÄãÉÏ´«µÄͼƬ¸ñʽÓдíÎó£¡')</script>");
        }
}


Ïà¹ØÎĵµ£º

ASP.NET

¾Å¡¢ÒÔ±à³Ì·½Ê½Ìí¼Ó ASP.NET ¿Ø¼þ
      ÓÐʱ£¬ÔÚÔËÐÐʱ´´½¨¿Ø¼þ±ÈÔÚÉè¼ÆÊ±´´½¨¿Ø¼þ¸ü¿ÉÐС£ÀýÈ磬¼Ù¶¨ÓÐÒ»¸öËÑË÷½á¹ûÒ³£¬ÄúÒªÔÚÆäÖн«ÒÔ±íµÄÐÎʽÏÔʾ½á¹û¡£ÓÉÓÚ²»ÖªµÀÒª·µ»Ø¶àÉÙÏÒò´ËÄúÐèҪÿ¸ö·µ»ØµÄÏ̬Éú³ÉÒ»¸ö±íÐС£
      ˵Ã÷£º ÏÖÓпؼþͨ³£¿ÉÒÔÌṩ´Ó¶¯ ......

ASP.NET

      BulletedList ¿Ø¼þ´´½¨Ò»¸öÎÞÐò»òÓÐÐò£¨±àºÅµÄ£©µÄÏîÁÐ±í£¬ËüÃÇ·Ö±ð³ÊÏÖΪ HTML ul »ò ol ÔªËØ¡£
 
1¡¢·½°¸
BulletedList ¿Ø¼þÓÃÓÚÖ´ÐÐÒÔϲÙ×÷£º
·Ö¸¶¨ÁбíÖÐÏî¡¢ÏîÄ¿·ûºÅ»ò±àºÅµÄÍâ¹Û¡£
·¾²Ì¬¶¨ÒåÁбíÏî»òͨ¹ý½«¿Ø¼þ°ó¶¨µ½Êý¾ÝÀ´¶¨ÒåÁбíÏî¡£
·ÏìÓ¦Óû ......

asp.net ÑéÖ¤Âë

 ÑéÖ¤ÂëÓ¦Ó㺽«´úÂë¸´ÖÆµ½Ò³Ãæ¼´¿É£¬²¢½«Ò³ÃæµÄ·¾¶Ð´µ½Í¼Æ¬µÄurlÖбã¿ÉʹÓÃ
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebCont ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ