Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÖÐÉÏ´«Í¼Æ¬²¢Éú³ÉËõÂÔͼµÄC#Ô´Âë

http://www.knowsky.com/5723.html
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls; ......

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

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

ASP.NET ³ÌÐòÔ±µÄÐÞÁ¶Ö®Â·

³õ¼¶µÄ³ÌÐòÔ±»ò¾­Ñé²»×ãµÄ³ÌÐòÔ±ÍùÍùÖ»Òâʶµ½×Ô¼ºµÄ³ÌÐòÊÇд¸ø¼ÆËã»úµÄ£¬¶ø²»»áÔÚÒâ³ÌÐòÆäʵҲÊÇд¸øÈ˵ģ¬»òÔÚÒâµÃ²»¹»¡¢²»È«Ãæ¡£
д¸ø»úÆ÷µÄ³ÌÐò£¬ÍùÍù×·ÇóµÄÊÇÔËÐÐÕýÈ·¡¢Ö´ÐÐЧÂÊÄÜÂú×ãÒªÇó¡£µ«³ÌÐòÔ±µÄÈÎÎñ½ö½ö¾ÍÊÇ°ÑÒµÎñÂß¼­×ª³É»úÆ÷ÄܱàÒëµÄ¼ÆËã»úÓïÑÔÂð?
Æäʵ£¬³ÌÐòÊ×ÏÈ(×¢Ò⣬ÊÇÊ×ÏÈ)ÊÇд¸øÈ˵ġ£µÚÒ»£¬³ÌÐòÊÇд¸ ......

asp.net jquery Èý¼¶Áª¶¯

 var j = jQuery.noConflict();
var prov="";
var city="";
var area="";
j(function(){
    j.get("/Js/Message/address.xml",function(xml){
            j("body").data("xml",xml);
  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ