Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 AJAX ʹÓÿͻ§¶Ëµ÷Ó÷þÎñÆ÷¶ËµÄ·½·¨

  Microsoft ASP.NET AJAX¿ÉÒԺܷ½±ãµÄÈÃÎÒÃÇÔÚ¿Í»§¶ËʹÓýű¾µ÷ÓÃASP.NET Web
Services(.asmx),ÒªÆôÓÃÕâÒ»ÌØÐÔ£¬ÏñÇ°ÃæÌáµ½µÄÒ»Ñù£¬±ØÐëÒªÅäÖÃWeb.Config£¬¿ÉÒÔ²ÎÕÕMicrosoft ASP.NET
AJAX°²×°Ä¿Â¼ÏµÄWeb.Config£¬Èç¹ûÊÇͨ¹ýASP.NET AJAX-enabled Web
siteÄ£°æ½¨Á¢µÄÕ¾µã£¬Ôò²»ÐèÒªÔÙ½øÐÐÉèÖÃÁË¡£ÅäÖýڵãÈçÏ ......

C#ÀïµÄtreeview¿Ø¼þÈçºÎÄÜ°ó¶¨Êý¾Ý¿âÀïµÄÊý¾Ý

Ó¦ÓóÌÐò£¬´°ÌåÀïÍÏ·ÅÒ»¸öTreeView¿Ø¼þ£¬Ïë°ÑÊý¾Ý¿âÀïµÄÊý¾ÝÔÚÕâ¸ö¿Ø¼þÀïÏÔʾ³öÀ´
  TREEVIEW¿Ø¼þÊÇWinfrom´°ÌåÀïµÄ ²»ÊÇASP£®NETÀïµÄTREEVIEW
´úÂëÈçÏ£º
CREATE TABLE CateTable (
      [ID] [int] IDENTITY (1, 1) NOT NULL ,
       [CateName] [nv ......

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

Ajax with ASP.NET ·´É任ȡÈËÔÂ

Ô­ÎÄ http://www.886s.com/blog/?p=96
Ëæ×ÅAjaxµÄÊ¢ÐУ¬´ó¼Ò¶¼È¥´ÕÈÈÄÖ£¬ÎÒÃǵÄÏîÄ¿Ò²²»ÀýÍâ¡£
¿´ÁËÒ»ÏÂÏÖÓеĴúÂ룬¶ÔÓÚÒ»¸ö²Ù×÷³éÈ¡Ò»¸öµÄÒ³Ã棬°Ñ²ÎÊý½ÓÊÕ£¬µ÷ÓÃÂß¼­²ãµÄÏà¹Øº¯Êý²¢·µ»ØÏàÓ¦µÄJson»òÕßXml£¬ËÑË÷ÁËһϣ¬¹¤³ÌÖо¹È»ÓÐÁË360+¸öÕâÖÖÒ³Ã棬ÕâÕæÊÇÒ»ÖÖÀË·Ñ£¡Èç¹ûÓ÷´É䣬һ¸öÒ³Ãæ¾Í¿ÉÒԸ㶨£¡½ÚÊ¡Á˶àÉ ......

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ºÅ