Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÖÐcookieµÄ´¦Àí

Ô­ÎÄ£ºÁõÎä|asp.netÖÐcookieµÄ´¦Àí  
ʹÓÃÖз¢ÏÖÓÃRequest.Cookies.Remove()ÎÞ·¨É¾³ýcookie,googleÁËһϷ¢ÏÖÒ»°ãÊÇͨ¹ý½«¹ýÆÚʱ¼äÉèÖóɹýÈ¥µÄʱ¼äÀ´Íê³Éɾ³ýµÄ¡£Ë³±ãÕûÀíÏÂcookieµÄ²Ù×÷£º
Ò» ´´½¨
1 µ¥ÖµµÄ´´½¨
C#-Code:
HttpCookie hc = new HttpCookie("Value");
hc.Value = "value";
Response.Appe ......

ASP.net µ¯³ö´°Ìå

Respose.Write("<script     language='javascript'>window.open('"+     url     +"');</script>"); 
£¨´ò¿ª¼ò½à´°¿Ú£©£º
Respose.Write("<script     language='javascript'>window.open('"  &nbs ......

¿ª·¢ÊÓƵÍøÕ¾£¬asp.netÊÓƵÎļþת»».flv¸ñʽ

×î½ü¹«Ë¾ÓÐÒ»¸öСÏîÄ¿ÐèÒª°ÑÊÓƵת»»³ÉFLASHÎļþ£¬Ð§¹û¾ÍÊÇÏñÓû§×¢²áyoukuÍøÒ»Ñù£¬×Ô¼º¿ÉÒÔÊÓƵÉÏ´«£¬×ª»»³Éflash¸ñʽ²¥·Å¡£
¿àÓÚÒÔǰûÓÐ×ö¹ý£¬ÓÚÊÇÂíÉÏËÑË÷ÁËÏà¹ØµÄÎÄÕ£¬¿´ÁËhttp://www.cnblogs.com/xiucai/ ºÍ http://www.cnblogs.com/seebook/¹ØÓÚÕâ·½ÃæµÄÎÄÕ£¬¶ÔÎÒ°ïÖúºÜ´ó¡£½ñÌìµÚÒ»Ì쿪²©£¬ÎҾͼǼÏÂËüÃÇ¡£
ÏÖ ......

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 ......

asp.netʱ¼ä¸ñʽ

DateTime dt = DateTime.Now;
//    Label1.Text = dt.ToString();//2005-11-5 13:21:25
//    Label2.Text = dt.ToFileTime().ToString();//127756416859912816
//    Label3.Text = dt.ToFileTimeUtc().ToString();//127756704859912816
//    Labe ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ