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

ͼƬÎļþÉÏ´«, Éú³É¸ßÖÊÁ¿ËõÂÔͼ (asp.net c#)

ºǫ́´úÂ룺
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.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.IO;
public partial class User_UpLoadFile : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void UPbutton_Click(object sender, EventArgs e)
{
if (FileUpload1.HasFile)
{
string fileContentType = FileUpload1.PostedFile.ContentType;
if (fileContentType == "image/bmp" || fileContentType == "image/gif" || fileContentType == "image/pjpeg")
{
string name = FileUpload1.PostedFile.FileName; // ¿Í»§¶ËÎļþ·¾¶
FileInfo file = new FileInfo(name);
string SavePath = "/upload/";
string fileExes = (System.IO.Path.GetExtension(name)).ToString().ToLower();//ÎļþÀ©Õ¹Ãû
Random ran = new Random();
int RandKey = ran.Next(9, 999);//ran.Next(start,end)
string fileName = "P" + System.DateTime.Now.ToString("yyMMddhhmm") + RandKey + fileExes;
string fileName_s = "S" + fileName.Substring(1); // ËõÂÔͼÎļþÃû³Æ
//string fileName_sy = "sy_" + file.Name; // ˮӡͼÎļþÃû³Æ£¨ÎÄ×Ö£©
//string fileName_syp = "syp_" + file.Name; // ˮӡͼÎļþÃû³Æ£¨Í¼Æ¬£©
string webFilePath = Server.MapPath(SavePath + fileName); // ·þÎñÆ÷¶ËÎļþ·¾¶
string webFilePath_s = Server.MapPath(SavePath + fileName_s); // ·þÎñÆ÷¶ËËõÂÔͼ·¾¶
//string webFilePath_sy = Server.MapPath("/upload/" + fileName_sy); // ·þÎñÆ÷¶Ë´øË®Ó¡Í¼Â·¾¶(ÎÄ×Ö)
//string webFilePath_syp = Server.MapPath("/upload/" + fileName_syp); // ·þÎñÆ÷¶Ë´øË®Ó¡Í¼Â·¾¶(ͼƬ)
//string webFilePath_sypf = Server.MapPath("/upload/shuiyin.jpg"); // ·þÎñÆ÷¶Ëˮӡͼ·¾¶(ͼƬ)
if (!File.Exists(webFilePath))
{
try
{
FileUpload1.SaveAs(webFilePath); // ʹÓà SaveAs ·½·¨±£´æÎ


Ïà¹ØÎĵµ£º

ÈçºÎÔÚASP.NETÒ³ÃæÖÐǶÈëWINFORM¿Ø¼þÒ»

Ô­ÎÄ£ºÁõÎä|ÈçºÎÔÚASP.NETÒ³ÃæÖÐǶÈëWINFORM¿Ø¼þÒ»  
ÔÚ.NET֮ǰ£¬ÎÒÃÇÈç¹ûÏë·ÃÎʿͻ§¶ËµÄ×ÊÔ´£¬×î³£¼ûµÄ·½Ê½¾ÍÊÇÔÚÍøÒ³ÀïÃæÇ¶ÈëACTIVEX¿Ø¼þ¡£ÏÖÔÚÓÐÁË.NET£¬ÎÒÃÇ¿ÉÒÔ½«WINFORM¿Ø¼þǶÈëÔÚÍøÒ³ÀïÃæ£¬´Ó¶øÖ±½Ó¿ØÖƿͻ§¶Ë£¬²»¹ýǰÌáÊǿͻ§¶Ë±ØÐë°²×°ÁË.NET¿â¡£ÕâÓеãÏñJAVA µÄAPPLET£¨±ÊÕß¶ÔJAVA²»ÊǺÜÊ죬ÈçÓÐÎÊÌâ ......

Asp.Net ¿Ø¼þ¿ª·¢Ö®¿Ø¼þͼ±êºÍ±ê¼Çǰ׺

¹ØÓڿؼþͼ±êµÄÊ£¬¿ÉûÉÙϹÕÛÌÚ£¬´ÓǰÄêÏëÈëÊÖÕâ·½Ãæ¿ªÊ¼£¬¾Íû¸ã¶¨¹ý¡£N¶à´óϺµÄÌù×Ó¶¼·­ÀÃÁË£¬Ò²Ã»ÕÒ³ö¸öÍ·Ð÷À´¡£Æäʵ×ʼÓдÎÕæ¸øÃɳöÀ´ÁË£¡²»¹ýºóÀ´¸Ä¿Ø¼þ£¬Ò²²»ÖªµÀ¸ÄÄÄÁË¡£Ã»ÁË£¡ÓÚÊÇÂúÊÀ½çµÄCSDN¡¢MSDN¡£¡£¡£¡£NBµÄÈË£¬NBµÄÎÄÕ¿´ÁËÑÛÔΣ¬´òËÀҲûÓÐŪ³öÀ´¡£×òÌìÏîÄ¿ÖÐÓöµ½ÎÊÌ⣬¿´ÁËÒ»¸çÃǵĿؼþ£¨WEBABCD£ºÖÁ½ñ ......

jQuery Ajax ·½·¨µ÷Óà Asp.Net WebService µÄÏêϸÀý×Ó

http://www.cnblogs.com/TerryFeng/archive/2009/02/01/1382123.html
ÕâºÜ³£Óã¬ËÑË÷ÁËһϲ©¿ÍÔ°µÄ“ÕÒÕÒ¿´”ºÍ¹È¸è£¬¿´µ½´ó²¿·Ö¶¼ÊÇ×ªÔØÓÚÒ»Á½ÆªÎÄÕ£¨¶øÇÒÀ´Ô´»¹²»ÊDz©¿ÍÔ°£©£¬ÓеÄÊǼòµ¥µÄ˵һµãÎÞ·¨ÔËÐУ¬¸ø³õѧÕߵĵ÷ÊÔºÍѧϰ´øÀ´²»·½±ã£¬ÎÒÔÚÕâÀォjQuery Ajax µ÷ÓÃAspx.Net WebService µÄ¼¸¸ö³£Óõķ½·¨ ......

ASP.NET Ìá½»±íµ¥·½Ê½·¢ËÍÊÖ»ú¶ÌÐÅ

        string FormURL = "http://10.45.19.80:8080/easysendok.jsp";
        //±íµ¥ÐèÒªÌá½»µÄ²ÎÊý
        //sendobj ²ÎÊýΪ½ÓÊÕ¶ÔÏó£¨ÊÖ»úÓû§£©£»sendTextΪ¶ÌÐÅÄÚÈÝ 
   &n ......

asp.net ÑéÖ¤Âë ʵÏÖ

µÚ1ÖÖ.
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.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Drawing ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ