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

asp.netÓÃurlÖØдURLReWriterʵÏÖÈÎÒâ¶þ¼¶ÓòÃû

Asp.net ÓÃurlÖØд(URLReWriter)ʵÏÖÈÎÒâ¶þ¼¶ÓòÃû
ºÃ¾ÃûÓÐд¼¼ÊõÎÄÕÂ,Èç¹û´ó¼Ò¿´²»Ã÷°×,¾Í¶à¿´¼¸Æª,º¹,»òÕß,ÔÚÎÄÕµĺóÃæ»Ø¸´(ÕâÊÇ×îÓÐЧµÄ°ì·¨),ÎһᾡÁ¦°ïÖú´ó¼Ò½â´ðÒÉ»ó.
À´ÕÒÕâƪÎÄÕµÄ,Ó¦¸Ã¶¼ÖªµÀʲô½Ð¶þ¼¶ÓòÃû°É,·Ï»°¾Í²»ËµÁË.µ«ÊÇÌÖÂÛÇ°,ÏÈÒªÃ÷°×Ò»¸ö˼ÏëÎÊÌâ.
ºÜ¶àÅóÓÑÒ»Ö±¿¼ÂDz»Çå(ÎÒÇ°¼¸ÌìÒ²Ò»Ö±¸ã
²»Ã÷°×)µÄÎÊÌâÊÇ,ÎÒ¼üÈëÒ»¸öµØÖ·ºó,ÔõôÕâ¸öurl¾Í±»ÖØдÁË?
µÚÒ»²½:ÔÚä¯ÀÀÆ÷¼üÈëÁËÒ»¸öµØÖ·,±ÈÈçhttp://love.kerry.com
,
µã»Ø³µºó,¶¼·¢ÉúÁËʲô?
ΪÁË°ÑÎÊÌâ¼òµ¥»¯,ÎÒÀ´ÕâÑù½âÊÍ:
µÚ¶þ²½:Ê×ÏÈ,¼üÈëµÄµØÖ·±»½âÎö,×îÖÕÀ´µ½ÁËһ̨web·þÎñÆ÷.½»¸øIIS´¦
Àí.ÔÚ.netµÄÊÀ½çÖÐ,IIS»á°ÑÕâÑùµÄÇëÇóÔÙ½»¸øÒ»¸öweb´¦ÀíÆ÷ ´¦Àí,×îºó,¸Ã web´¦ÀíÆ÷ °Ñ´¦ÀíµÄ½á¹û·µ»Ø¸øä¯ÀÀÆ÷,ÏÔʾ¸øÓû§¿´.
Çë
²»ÓúöÂÔÕâÑùÒ»¸öÎÊÌâ,µÚ¶þ²½µÄËùÓÐÊÂÇ鶼ÊÇÔÚ·þÎñÆ÷¶Ë×öµÄ.ÔÚÕâЩÊÂÇé½øÐеÄʱºò,Óû§¶ËµÄä¯ÀÀÆ÷ÉÏÃæµÄµØÖ·²»»á¸Ä±ä.¼´Ê¹×îºó web´¦ÀíÆ÷
°Ñ´¦Àí½á¹û·µ»ØÀ´µÄʱºò,ÉÏÃæµÄµØÖ·Ò²²»»á¸Ä±ä.
Ò»¿ªÊ¼¼üÈëµÄurl,Ö»ÊÇÆðÒ»¸öÇÃÃŵÄ×÷ÓÃ,ÃÅÇÃÍêÁË,×÷ÓþÍËã½áÊøÁË,Ö»ÓÐÄãµÄÑÛ¾¦¿ÉÒÔ¿´µ½ÄÇ
¸öµØÖ·,ä¯ÀÀÆ÷,·þÎñÆ÷µÈ¶¼²»ÖªµÀÕâ¸öµØÖ·.
È»ºóÒªÃ÷°×µÄÎÊÌâÊÇ,ËùνurlÖØд,Ò²Ö»ÊÇweb¿ª·¢ÈËÔ±ÖªµÀµÄÄÚÄ»Çé¿ö,Óû§¸ù±¾²»ÖªµÀ·¢ÉúÁËʲ
ô,ËûÈÏΪ×Ô¼º¼üÈëµÄµØÖ·¾ÍÊÇÓ¦¸Ã³öÀ´ÆÁÄ»ÉÏÏÔʾµÄ½á¹û.Ò²¾ÍÊÇ˵,ÎÒÃÇÔÚÄ»ºó¿ØÖÆÒªÏÔʾµÄÄÚÈÝ.
½ÓÏÂÀ´Òª¿¼ÂǵÄÊÇ,ÔõôÑù¿ØÖÆÏÔʾµÄÄÚÈÝ?
´Ó
ÉÏÃæ˵µÄ¹ý³Ì,ºÜÃ÷ÏÔÒªÔÚ web´¦ÀíÆ÷ µÄ¹¤×÷ÕâÒ»²½¶¯ÊÖ½Å.
Ò»¸ö×î¼òµ¥µÄ¿¼ÂÇÊÇ,Óû§ÇÃÈëÁËÒ»¸ö¼òµ¥µÄ²»´øÈκβÎÊýµØÖ·, http://love.kerry.com
È»ºóÎÒÃÇ°ÑÕâ¸öµØÖ·¸Ä³ÉÒ»¸ö·ûºÏ³ÌÐòÐèÒªµÄ´ø²ÎÊýµÄ
µØÖ·, http://kerry.com?lover=notus
,
×îºó´¦ÀíÖ®.
ËùνµÄurlÖØд,¾ÍÊÇÔÚÕâÒ»²½.
ÓÃ.netµÄÊõÓïÀ´Ëµ,ÎÒÃÇÐèÒª¸øÓ¦ÓóÌÐò×¢²áÒ»¸öhttpmodule,ÓÃÀ´´¦ÀíÌض¨µÄ
url
×¢²áhttpmodule,ÔÚweb.config,
´¦Àíurl,ÔÚÎÒÃÇÌṩµÄhttpmodule³ÌÐòÖÐ
´óÌåÏ൱ÓÚÕâÑùµÄÒ»¶Î³ÌÐò
//ÓÃÎÒÃǵÄhttpmodule³ÌÐò½Ø»ñԭʼurl
String OriginalUrl=” http://love.kerry.com
”;
//
´¦Àíԭʼurl,µÃµ½×îºóÐèÒªµÄurl,ֵΪhttp://kerry.com?lover=notus
String
FinalUrl=Rewrite(OriginalUrl);
// contextÖØн«urlÔÚÄÚ²¿·¢Ë͸øIIS´¦Àí
context.RewritePath(FinalUrl);
½ÓÏÂÀ´,ÎÒÃÇÀ´ÊµÏÖurlÖØд.
µÚÒ»²½:È·¶¨Òª¶ÔÄÄЩurlÖ´ÐÐÖØд,¼´Öƶ¨ÖØд¹æÔò
µÚ¶þ²½:±àдhttpmodule´¦Àí³ÌÐò
µÚ
Èý


Ïà¹ØÎĵµ£º

ASP.NET 2.0µÄ»º´æ¼¼Êõ¼ò½é

¡¡¡¡ÓÉÊý¾Ý¿âÇý¶¯µÄWebÓ¦ÓóÌÐò£¬Èç¹ûÐèÒª¸ÄÉÆÆäÐÔÄÜ£¬×îºÃµÄ·½·¨ÊÇʹÓûº´æ¹¦ÄÜ¡£Óû§´ÓÊý¾Ý¿âÖмìË÷Êý¾Ý£¬¿ÉÄÜÊÇWebÓ¦ÓóÌÐòÖÐÖ´ÐÐ×îÂýµÄ²Ù×÷Ö®Ò»¡£ÒòΪÆäÖÐÉæ¼°¶à¸ö»·½Ú£¬ÀýÈ磬Web·þÎñÆ÷¡¢Êý¾Ý¿â·þÎñÆ÷µÈ¡£ÓÈÆäÊÇÔÚÓû§±È½Ï¶à£¬¼ìË÷µÄÊý¾ÝÁ¿±È½Ï´óµÄÇé¿öÏ£¬»á¸ø°üÀ¨Óû§ÔÚÄڵĸ÷¸ö·½ÃæÔì³É²»Ð¡µÄÀ§ÄÑ¡£Èç¹ûÄܹ»½«Êý¾Ý¿ ......

Asp.Net ButtonµÄUseSubmitBehaviorÊôÐÔ

ÔÚijҳÃæÉÏÓÐÈçÏÂÐÅÏ¢£¬
Html£¬
<asp:Button ID="btn" runat="server" Text="Click me" OnClick="ButtonClicked" />
<script language="javascript">
function javascriptMethod() {
alert(1);
}

</script>
C#£¬
protected void ButtonClic ......

asp.netÖÐÓÃsoapheader×÷ÑéÖ¤µÄʹÓò½Ö裺 ºÜ¼òµ¥

Asp.netÒ³ÃæÖе÷ÓÃÒÔSOAPÍ·×÷ÑéÖ¤µÄweb services²Ù×÷²½Ö裺
µÚÒ»²½£ºÓÃÀ´×÷SOAPÑéÖ¤µÄÀà±ØÐë´ÓSoapHeaderÀàÅÉÉú£¬ÀàÖÐPublicµÄÊôÐÔ½«³öÏÖÔÚ×Ô¶¯²úÉúXML½ÚµãÖУ¬¼´£º
<soap:Header>
    <UserSoapHeader xmlns="http://tempuri.org/">
      <UserName>strin ......

asp.net½áºÏhtml£¬javascriptʵÏÖÎÞˢпçÓòÊý¾ÝÌá½»

ÐèÇó£º
AÓòÓÐÒ³Ãæa.html£¬ÆäÖÐÓÐiframe°üº¬BÓòµÄÒ³Ãæb.html£¬ÏÖÔÚҪͨ¹ýa.htmlÉϵÄÒ»¸ö°´Å¥£¬À´°Ña.htmlÒ³ÃæÉÏÒ»¸öÎı¾¿òµÄÖµ´«µÝµ½b.htmlÒ³ÃæµÄÎı¾¿ò¡£
×¢£ºÕâÀïb.htmlÊÇhtmlÍøÒ³£¬²»ÄܽÓÊÕÆäËûÍøÕ¾post¹ýÀ´µÄÖµ£¬ËùÒÔ²»ÄÜÓÃÖ±½ÓpostµÄ·½·¨À´´«Öµ£¬µ«ÊÇ£¬Èç¹û½ÓÊÕÒ³ÃæÊÇb.aspx»òÕßb.asp ÄØ£¬ÄDz»ÊÇ¿ÉÒÔÖ±½ÓpostÁËô£¿´ð ......

Ò»¸öasp.netµÄÉú³ÉÇúÏßͼµÄ¹ý³Ì

ÕâÀïÊÇ´ÓDatasetÀïµÄÊý¾ÝÉú³ÉÇúÏßͼ.
ÎÒµÄDatasetÊÇ´Ó±íSendrecÀï¶ÁÈ¡µÄÊý¾Ý,·Ö±ðÓÐId,Sendid(¶©µ¥ºÅ),Sendtime(¼Ç¼ʱ¼ä),Sendnum(µ¥Î»Ê±¼ä·¢ËÍÁ¿/ÎÒÕâÀïÊÇÎå·ÖÖÓ)¼¸¸ö×Ö¶Î
¹ý³ÌÈçÏÂ:
public void draw(Page page,DataSet ds,int Tnum){}
ÆäÖÐpageÊÇÓÃÀ´´«µÝÒýÓÃÕâ¸ö¹ý³ÌµÄÒ³Ãæ,ÕâÑùÈÃÒ³ÃæÊÇJPG·½Ê½Ö±½ÓÏò¿Í»§¶ËÊä³öÉú ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ