asp.netʵÏÖÎļþÏÂÔØ(wapÊÖ»úÏÂÔØ)
Õâ¸öÎÊÌâÀ§ÈÅÁËÎÒÁ½Ì죬ÊÖ»úÏÂÔØ
protected void Page_Load(object sender, EventArgs e)
{
string filename = Server.UrlDecode(Request["upload"]);
string filePath = Server.MapPath("upload/" + filename);//·¾¶
FileDownload(filePath);
}
/// <summary>
/// ÎļþÏÂÔØ
/// </summary>
/// <param name="FullFileName"> </param>
private void FileDownload(string FullFileName)
{
try
{
FileInfo DownloadFile = new FileInfo(FullFileName);
if (DownloadFile.Exists)
{
Response.Clear();
Response.ClearHeaders();
Response.Buffer = false;
//Response.ContentType = "application/octet-stream";//֪ͨä¯ÀÀÆ÷ÏÂÔØÎļþ¶ø²»ÊÇ´ò¿ª
Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(DownloadFile.FullName, System.Text.Encoding.UTF8));
Response.AppendHeader("Content-Length", DownloadFile.Length.ToString());
&nb
Ïà¹ØÎĵµ£º
Asp.net DataListǶÌ×DataListµÄʵÏÖ
[ 2006-05-31 01:26:24 | ×÷Õß: Admin ]
×ÖÌå´óС: ´ó | ÖÐ | С
Êý¾Ý·þÎñ¿Ø¼þµÄǶÌ××îÖ÷ÒªµÄÊÇÊÇÄÚ²ã¿Ø¼þÊý¾ÝµÄ¼ÓÔØºÍʼþµÄ´¥·¢¡£ DataListǶÌ×µÄÖØµãÊÇÒªÔÚÍâ²ãDataListµÄItemDataBoundʼþÖÐÓÃe.Item.FindControl·½·¨À´ÕÒµ½Ç¶ÌײãDataListµÄid,±àдǶÌײãDataListµÄ°ó¶¨Êý¾Ý ......
{0:d} YY-MM-DD
{0:p} °Ù·Ö±È00.00%
{0:N2} 12.68
{0:N0} 13
{0:c2} $12.68
{0:d} 3/23/2003
{0:T} 12:00:00 AM
{0:ÄÐ;;Å®}
DataGrid-Êý¾Ý¸ñʽÉèÖñí´ïʽ
Êý¾Ý¸ñʽÉèÖñí´ïʽ
.NET Framework ¸ñʽÉèÖñí´ïʽ£¬ËüÔÚÊý¾ÝÏÔʾÔÚÁÐÖÐ֮ǰÏÈÓ¦ÓÃÓÚÊý¾Ý¡£´Ë±í´ïʽÓÉ¿ÉÑ¡¾²Ì¬Îı¾ºÍÓÃÒÔϸñʽ± ......
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;
using System.Xml;
private XmlDo ......
ÄãÖ»ÒªÔÚWeb,configÎļþµÄ system.web ÅäÖýÚÏÂÌí¼ÓÒÔÏÂÅäÖãº
<globalization requestEncoding="GB2312" responseEncoding="GB2312"/>
µ±È»£¬ÄãÒ²¿ÉÒÔ½«“GB2312”¸ÄΪϵͳĬÈϵēUTF-8”£¬Ö»Òª¼ÓÉÏÕâÒ»ÅäÖã¬Ò³Ãæ¼ä´«ÖµµÄÂÒÂëÎÊÌâ¾Í½â¾öÁË¡£ ......