Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

asp.net(c#) ·µ»ØÉÏÒ»Ò³

Õª³­Ç°±²ÃǵÄ
ÆäʵҪʵÏÖÕâ¸ö¹¦ÄÜÖ÷Òª»¹ÊÇÒªÓõ½javascript
·½·¨Ò»£º
ÔÚasp.netµÄaspxÀïÃæµÄÔ´´úÂëÖÐ
<input type="button onclick="javascript:window.history.go(-1);"value="·µ»ØÉÏÒ»Ò³">
dzÎö£ºÕâ¸öÊÇÓÃÁËHTML¿Ø¼þ£¬Í¨¹ýÒ»¸öonclickµÄʼþ£¬µ÷ÓÃÁËjavascriptÖеÄÒ»¸ö·½·¨¾Í¿ÉÒÔÁË¡£Õâ¸öÊÇ×î¼òµ¥µÄÁË£¬Ò²Í¬ÑùÊÊÓÃÓÚ¾²Ì¬Ò³Ãæ,ASPÒ³ÃæµÈ¡£
·½·¨¶þ:
ÀûÓÃReponse.write
Èç¹ûÄã¶ÔASPÓÐÒ»¶¨µÄÁ˽⣬ÄÇô¶ÔResponse.writeÕâ¸ö¶«¶«¾Í²»»áÄ°ÉúÁË£¬·½·¨Ò»ÊÇÖ±½ÓÓÐHTMLÒ³ÃæÖÐʵÏÖ£¬ÔòÕâ¸öÔòÊÇÔÚºǫ́»·¾³ÖÐʵÏÖ£¨Õâ¸ö˵·¨ºÃÏñ²»ÊǺܹ淶£¬ºÇºÇ)
Response.write("<script language=javascript>history.go(-2);</script>");
<a    href="#"    onclick="javascript:history.back();">·µ»ØÇ°Ò»Ò³</a>
ÕâÀïΪ»áôҪ²ÉÓÃ-2µÄÖµÄØ£¬ÎÒ¸öÈËÈÏΪÊÇÕâÑùµÄ£ºÒòΪÔÚasp.netÖеÄÒ³Ã棬µ±Äã°´ÏÂÒ»¸öbuttonºó£¬ÓÉÓÚÒ³ÃæÖлáʵÏÖpage.postbackµÄÔµ¹Ê£¬Êµ¼ÊÉÏÔÚÕâÆäÖÐÊÇË¢ÐÂÁËÁ½´ÎÒ³Ã棬ÎÒÃÇÒªµÄÊǵÚÒ»´ÎµÄ£¬ËùÒÔ¾Í......
·½·¨Èý
ÀûÓÃResponse.Redirect() »ò server.transfer()
ÔÚpage_loadÖмÓÈë
if(!IsPostBack)   
         ViewState["retu"]=Request.UrlReferrer.ToString();   
    
¶øÔÚÔÚ·µ»Ø°´Å¥Ê¼þÖР  
   Response.Redirect(ViewState["retu"].ToString());   
   »òServer.Transfer    (ViewState["retu"].ToString());   
dzÎö£º
Request.UrlReferrer¿ÉÒÔ»ñÈ¡¿Í»§¶ËÉÏ´ÎÇëÇóµÄurlµÄÓйØÐÅÏ¢£¬ÎÒÃÇÔÚʹÓÃÕâ¸öµÄʱºò×îºÃ¶ÔÆä½øÐÐÒ»¸öÅжÏ
if(ViewState["UrlReferrer"]!=null)
         Response.Redirect(ViewState["UrlReferrer"].ToString();
else
{
Response.write("¶Ô²»Æ𣬵±Ç°ÊÇ×îÇ°Ò³Âë“£©£»
ÕâÑù²ÅºÃʹһµãµãà¸
}
ÔÚʹÓÃRequest.UrlReferrerʱ»¹Òª×¢Ò⣺
1.   Èç¹ûÉÏÒ»Ò³ÃæʹÓÃdocument.location·½·¨µ¼º½µ½µ±Ç°Ò³Ã棬Request.UrlReferrer·µ»Ø¿ÕÖµ
2.   Èç¹ûÓÐA,BÁ½¸öÒ³Ã棬ÔÚä¯ÀÀÆ÷ÖÐÖ±½ÓÇëÇóAÒ³Ã棬ÔÚAÒ³ÃæµÄÖÐPage_LoadʼþÖе¼º½µ½B Ò³Ã棬Ôò     Request.UrlReferrer·µ»Ø¿Õ¡£Ò


Ïà¹ØÎĵµ£º

C#ÖÐÓÃSYSTEM.XML¶ÁдXML˵Ã÷Óë´úÂë

<?xml version="1.0" encoding="utf-8"?>
<LinkLibrary xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Link Cat="aa" Url="aa" Desc="aa" />
<Link Cat="bb" Url="aa" Desc="aa" />
<Link Cat="cc" Url="aa" Desc="aa" />
&l ......

asp.netÔÊÐíÉÏ´«µÄÎļþµÄ×î´óΪ4M

asp.netÔÊÐíÉÏ´«µÄÎļþµÄ×î´óΪ4M
Èç¹ûÏëÒª´«¸ü´óµÄÐèÒª¸ü¸Äweb.configÎļþ
<system.web>
    <httpRuntime   maxRequestLength="1048576"   executionTimeout="3600"   />
</ststem.web> ......

asp.net GridView Ó¦ÓÃ

1£ºGridView Ìí¼ÓÊôÐÔ£¨ÊÇ·ñɾ³ý£¬Êó±ê¾­¹ý±³¾°£©
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
  & ......

asp.netĸ°åÒ³ÒýÓÃÎļþµÄ·¾¶ÎÊÌâ

1. ͼƬÎÊÌâ
·Ç³£ºÃ½â¾ö
<img runat="server" src="~/images/ad468x60.gif" alt="" />
¼ÓÉÏrunat="server" £¬Â·¾¶Ê¹Óþø¶Ô·¾¶~/»ù±¾ÉϾÍOKÁË¡£
2. CSSÎļþÒýÓÃ
<link rel="stylesheet" type="text/css" href="style.css" />
ÕâÀïÉñÆæµÄ¾ÍÊÇlinkµÄÎļþµÄhrefÊÇËæ×ű»·ÃÎÊÎļþµÄĿ¼½á¹¹×Ô¶¯µ÷Õû£¬Ëµ°×Á˾ ......

΢Èí¹Ù·½ ASP.NET URL ÖØд

ʵÏÖ URL ÖØд
¿ÉÒÔʹÓà ISAPI ɸѡÆ÷ÔÚ IIS Web ·þÎñÆ÷¼¶±ðʵÏÖ URL ÖØд£¬Ò²¿ÉÒÔʹÓà HTTP Ä£¿é»ò HTTP ´¦Àí³ÌÐòÔÚ ASP.NET ¼¶±ðʵÏÖ URL ÖØд¡£±¾ÎÄÖصã½éÉÜÈçºÎʹÓà ASP.NET ʵÏÖ URL ÖØд£¬Òò´ËÎÒÃǽ«²»¶ÔʹÓà ISAPI ɸѡÆ÷ʵÏÖ URL ÖØдµÄϸ½Ú½øÐÐÉîÈë̽ÌÖ¡£µ«ÊÇ£¬ÓдóÁ¿µÄµÚÈý·½ ISAPI ɸѡÆ÷¿ÉÓÃÓÚ URL ÖØд£¬ÀýÈ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ