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

ͨ¹ýASP.NET»ñÈ¡URLµØÖ·

Èç¹û²âÊÔµÄurlµØÖ·ÊÇhttp : //www.test.com/testweb/default.aspx, ½á¹ûÈçÏ£º
Request.ApplicationPath: /testweb
Request.CurrentExecutionFilePath: /testweb/default.aspx
Request.FilePath: /testweb/default.aspx
Request.Path: /testweb/default.aspx
Request.PhysicalApplicationPath: E:\WWW\testwebRequest.PhysicalPath:
Request.PhysicalPath: E:\WWW\testweb\default.aspx
Request.RawUrl: /testweb/default.aspx
Request.Url.AbsolutePath: /testweb/default.aspx
Request.Url.AbsoluteUrl: http://www.test.com/testweb/default.aspx
Request.Url.Host: www.test.com
Request.Url.LocalPath: /testweb/default.aspx
網Ö·£ºhttp://localhost:1897/News/Press/Content.aspx/123?id=1#toc
Request.ApplicationPath
/
Request.PhysicalPath
D:\Projects\Solution\web\News\Press\Content.aspx
System.IO.Path.GetDirectoryName(Request.PhysicalPath)
D:\Projects\Solution\web\News\Press
Request.PhysicalApplicationPath
D:\Projects\Solution\web\
System.IO.Path.GetFileName(Request.PhysicalPath)
Content.aspx
Request.CurrentExecutionFilePath
/News/Press/Content.aspx
Request.FilePath
/News/Press/Content.aspx
Request.Path
/News/Press/Content.aspx/123
Request.RawUrl
/News/Press/Content.aspx/123?id=1
Request.Url.AbsolutePath
/News/Press/Content.aspx/123
Request.Url.AbsoluteUri
http://localhost:1897/News/Press/Content.aspx/123?id=1
Request.Url.Scheme
http
Request.Url.Host
localhost
Request.Url.Port
1897
Request.Url.Authority
localhost:1897
Request.Url.LocalPath
/News/Press/Content.aspx/123
Request.PathInfo
/123
Request.Url.PathAndQuery
/News/Press/Content.aspx/123?id=1
Request.Url.Query
?id=1
Request.Url.Fragment
 
Request.Url.Segments
/
News/
Press/
Content.aspx/
123


Ïà¹ØÎĵµ£º

asp.netÖÐÓ÷¨×ܽᗗ¸öÈË

1£ºÔÚ.aspxÒ³Ã棬<% %>±êÇ©Ï൱ÓÚÔÚ.csÒ³ÃæµÄ´úÂ룬Ҳ¾ÍÊÇ˵ÄãÔÚ.csÎļþÀïÃæÔõÑùд£¬¾Í¿ÉÒÔÔÚ.aspxÎļþÀïÃæµÄ<% %>±êÇ©ÀïÃæÔõÑùд¡£
2£ºÔÚ.aspxÒ³Ã棬<%= %>±êÇ©¿ÉÒÔµ÷ÓÃÄãµÄºǫ́µÄ±äÁ¿»òÕß·½·¨µÈ£¬²»¹ý±»µ÷Óõķ½·¨±ØÐëÊÇpublicµÄ¡£
Èç¹ûÄãµÄDefault.csÎļþÀïÃæÓУº
public string str = "µ÷Óúǫ́·½ ......

ASP.NET¶¯Ì¬¼ÓÔØÓû§¿Ø¼þµÄÒ³ÃæÉú³É¹ý³Ì

  MainPageÎļþ£ºWebForm1.aspx
    <%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="TestMasterPage.WebForm1" enableViewState="False"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <HTML> ......

Asp.Netǰ̨µ÷Óúǫ́±äÁ¿

ASP.NET   2009-08-15 13:45   ÔĶÁ459   ÆÀÂÛ3   ×ֺţº ´ó´ó ÖÐÖРСС 1.Asp.NetÖм¸ÖÖÏàËƵıê¼Ç·ûºÅ:
< %=...%>< %#... %>< % %>< %@ %>½âÊͼ°Ó÷¨
´ð: < %#... %>: ÊÇÔڰ󶨿ؼþDataBind()·½·¨Ö´ÐÐʱ±»Ö´ÐУ¬ÓÃÓÚÊý¾Ý°ó¶¨
Èç: < %# Co ......

˼·ÇåÎúµØ¿ª·¢Ð¡µÄasp.net webÓ¦ÓóÌÐò

   ×÷Ϊ¸öÈËÍøÕ¾»òСÐÍÍøÕ¾µÄ±àдÕߣ¬Ê®°Ë°ãÎäÒÕ¶¼µÃͨÏþÒ»µã£¬±ÈÈç˵ javascript¡¢CSS/DIV¡¢HTML¡¢±à³ÌÓïÑÔ¡¢Êý¾Ý¿â֪ʶµÈ¡£µ±ÎÒÃDZàдһ¸öСÐÍÓ¦ÓóÌÐòʱ£¬ÈçºÎ×öµ½¸ßЧ¡¢Ë¼Â·ÇåÎúÄØ£¿ÒÔÏÂÊÇÎÒµÄÒ»µã¾­Ñé×ܽᡣÓ×ÖÉÓë²»×ãÖ®´¦»¹ÍûµÃµ½Í¬ÐеÄÖ¸µã¡£
Ò»Ìõ×ܵÄ˼Ï룺ÔÚÓ¦ÓóÌÐò±àÒë·¢²¼ºó£¬aspxÎļþ¡¢dllÎļ ......

Asp.NetÓëSEO ViewstateÓÅ»¯ÖÕ¼«½â¾ö·½°¸

Õâ¶Îʱ¼ä,ÀÏ´óÔÚ¿´ÁËÍøÕ¾ºó,·¢ÏÖviewstateËù²úÉúµÄÒ»¶ÑÂÒÂ룬ÑÏÖØÓ°ÏìÁËÎÒÃÇÍøÕ¾http://www.xbcar.net Î÷²¿Æû³µÍøµÄ´ò¿ªËٶȺÍËÑË÷ÒýÇæµÄץȡ£®¾Í¸øÎÒÏÂÁ˵ÀÌúÁÈýÌìÄÚ±ØÐë½â¾ö£®ÕâϸÃÂÖµ½ÎÒÍ·´óÁË£¬ 
 
ÀýÈ磺
input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="dEV4cHJlc3Npb247UmVhZE9ub ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ