ASP.NET(C#)·µ»ØÉÏÒ»Ò³(ºóÍË)´úÂë
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ViewState["BackUrl"] = Request.UrlReferrer.ToString();
}
}
/// <summary>
/// ·µ»Ø°´Å¥µã»÷ʼþ
/// </summary>
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect(ViewState["BackUrl"].ToString());
}
ÁíÒ»ÖÖ·½·¨
ÔÚC# Web³ÌÐòÖУ¬ÈçΪҳÃ水ťд·µ»ØÉÏÒ»Ò³´úÂë
this.RegisterClientScriptBlock("E", "<script language=javascript>history.go(-2);</script>");
ÆäÖУ¬history.go(-2)£¬ÒªÐ´Îª-2£¬ÒòÔÚ°´Å¥Ê¼þ´¥·¢Ç°£¬ÒÑË¢ÐÂÒ»´ÎÒ³Ã棬ËùÒÔÓ¦ÊÇ-2¡£
Response.Write("<script language=javascript>history.go(-2);</script>");
´Ë´¦Ò²ÒªÐ´Îª“-2”¡£¸úÖ±½Óд½Å±¾µÄÓÐËù²»Í¬¡£
Ïà¹ØÎĵµ£º
¿´Á˺ܶà.°´ÕÕ ×Ô¼ºÃ÷°×½âÊÍһϠ.NET RefºÍOut¹Ø¼ü×Ö ¶ÔÓÚÖµÀàÐÍ¡£ Èç¹û²»Ê¹ÓÃref /outÔò´«µÝµÄÖ»ÊÇÕâЩֵµÄCOPY, ʹÓÃÁËRefºÍOutµÄЧ¹û¾Í¼¸ºõºÍCÖÐʹÓÃÁËÖ¸Õë±äÁ¿Ò»Ñù¡£(´«µÝµÄ¾ÍÊÇÔÖµ),ËüÄܹ»ÈÃÄãÖ±½Ó¶ÔÔÊý½øÐвÙ×÷£¬¶ø²»ÊǶÔÄǸöÔÊýµÄCopy½øÐвÙ×÷ ¶ÔÓÚÒýÓÃÀàÐÍ: Èç¹û²»Ê¹ÓÃref /out,ÒòΪ´«µÝµÄÊÇÒýÓÃÀàÐ͵ĵØÖ·Öµ,Ô ......
C#¸ñʽ»¯ÊýÖµ½á¹û±í
×Ö·û
˵Ã÷
ʾÀý
Êä³ö
C
»õ±Ò
string.Format("{0:C3}", 2)
¡ç2.000
D
Ê®½øÖÆ
string.Format("{0:D3}", 2)
002
E
¿Æѧ¼ÆÊý·¨
1.20E+001
1.20E+001
G
³£¹æ
string.Format("{0:G}", 2)
2
N
Ó÷ֺŸô¿ªµÄÊý×Ö
string.Format("{0:N}", 250000)
250,000.00
X
Ê®Áù½øÖÆ
string.Forma ......
Ò»¡¢²åͼµÄÀࣨº¬2·½·¨£©
1using System;
2using System.Collections.Generic;
3using System.Text;
4//using Excel = Microsoft.Office.Interop.Excel;
5using Excel;
6using System.Windows.Forms;
7
8
9namespace ExcelReport
10{
11 class InsertPicToExcel
12 {
13 / ......
using System;
using System.Web;
using System.Data;
using System.Text;
using System.Xml;
using System.IO;
namespace Baolee.GeneralMethod
{
/// <summary>
/// WriteXml µÄժҪ˵Ã÷¡£
/// </summary>
public class WriteXml
{
/// <summary>
......
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.IO;
using System.Text;
names ......