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

ASP.NETÒ³Ãæ¶ÔÏó

   »ñÈ¡ÇëÇóµÄÒ³µÄ HttpRequest ¶ÔÏó¡£
Ò»¡¢HttpRequest Àà
ʹ ASP.NET Äܹ»¶ÁÈ¡¿Í»§¶ËÔÚ Web ÇëÇóÆÚ¼ä·¢Ë굀 HTTP Öµ¡£
      ÏÂÃæµÄ´úÂëʾÀýʹÓà StreamWriter ÀཫÈô¸É HttpRequest ÀàÊôÐÔÖµµÄֵдÈëÎļþ¡£¶ÔÓÚÊÇ×Ö·û´®ÀàÐ͵ÄÊôÐÔ£¬ÊôÐÔÖµ±»Ð´ÈëÎļþʱ½«±»±àÂëΪ HTML¡£±íʾ¼¯ºÏµÄÊôÐԻᱻÒÀ´Îͨ¹ý£¬¶øÕâЩÊôÐÔ°üº¬µÄ¸÷¸ö¼ü/Öµ¶Ô¶¼»á±»Ð´Èë¸ÃÎļþ¡£
<%@ Page Language="C#" %>
<%@ import Namespace="System.Threading" %>
<%@ import Namespace="System.IO" %>
<script runat="server">
 
    /* NOTE: To use this sample, create a c:\temp\CS folder,
    *  add the ASP.NET account (in IIS 5.x <machinename>\ASPNET,
    *  in IIS 6.x NETWORK SERVICE), and give it write permissions
    *  to the folder.*/
 
    private const string INFO_DIR = @"c:\temp\CS\RequestDetails";
    public static int requestCount;
 
    private void Page_Load(object sender, System.EventArgs e)
    {
 
        // Create a variable to use when iterating
        // through the UserLanguages property.
        int langCount;
 
        int requestNumber = Interlocked.Increment(ref requestCount);
 
        // Create the file to contain information about the request.
        string strFilePath = INFO_DIR + requestNumber.ToString() + @".txt";
 
 
        StreamWriter sw = File.CreateText(strFilePath);
 
        try
        {
            // Write request information to the file with HTML encoding.
&nbs


Ïà¹ØÎĵµ£º

asp.net ToString¸ñʽ´óÈ«

 ×ªÔØÓÚ£ºhttp://hi.baidu.com/juzi119/blog/item/d4bf9a4b7cea7df583025c9e.html
C   »õ±Ò 2.5.ToString("C") £¤2.50
D   Ê®½øÖÆÊý 25.ToString("D5") 00025
E ¿ÆÑ§ÐÍ 25000.ToString("E") 2.500000E+005
F ¹Ì¶¨µã 25.ToString("F2") 25.00
G ³£¹æ 2.5.ToString("G") 2.5
N Êý×Ö 2500000. ......

asp.net ÉèÖûسµµÄĬÈϰ´Å¥

 µ±ÎÒÊäÈëÒ»¸ö¹Ø¼ü×ÖÏë°´»Ø³µ¼ü¾Í¿ÉÒÔËÑË÷£¬µ«ÓÉÓÚÒ³ÃæÉÏ»¹ÓÐÆäËûµÄButton,ËùÒÔĬÈϱ¾²»ÊÇÎÒµÄËÑË÷°´Å¥£¬ÔÚÍøÉÏËÑÁËЩ½â¾ö·½°¸£¬×î¶àµÄÊÇÈçÏÂÕâÖÖ·½Ê½£º
ÔÚasp.netÖУ¬ÈçºÎ»Ø³µ´¥·¢Ö¸¶¨°´Å¥µÄʼþ£¿
¼ÙÉ裺
<asp:TextBox id="tbInput" runat="server" Width="240px"></asp:TextBox>
<asp:Button ......

ASP.NETʹÓÃRequest»ñÈ¡À´Ô´ÍøÖ·URL²ÎÊý

Request¶ÔÏó¹¦ÄÜÊÇ´Ó¿Í»§¶ËµÃµ½Êý¾Ý£¬³£ÓõÄÈýÖÖÈ¡µÃÊý¾ÝµÄ·½·¨ÊÇ£ºRequest.Form¡¢Request.QueryString£¬Request¡£ÆäµÚÈýÖÖÊÇǰÁ½ÖÖµÄÒ»¸öËõд£¬¿ÉÒÔÈ¡´úǰÁ½ÖÖÇé¿ö¡£¶øÇ°Á½ÖÖÖ÷Òª¶ÔÓ¦µÄFormÌύʱµÄÁ½ÖÖ²»Í¬µÄÌá½»·½·¨£º·Ö±ðÊÇPost·½·¨ºÍGet·½·¨¡£
        Request ¶ÔÏóµÄÊôÐԺͷ½·¨± ......

ÓÅÐãASP.NET³ÌÐòÔ±µÄÐÞÁ¶Ö®Â·


<!--
/* Font Definitions */
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@ËÎÌå" ......

ASP.NET¿ç·þÎñÆ÷·ÃÎÊFileSystem

 ÏÖÔÚÄ£ÄâÔÚA·þÎñÆ÷ÉÏ·ÃÎÊB·þÎñÆ÷DÅÌϵÄÒ»¸öÎļþ test.txt
1 ÔÚA·þÎñÆ÷ web.config µÄ<system.web>ϼÓÈë<identity impersonate="true" userName="duzhe123.com" password="boosou.com"/>
2 Á½Ì¨·þÎñÆ÷É϶¼½¨Á¢Ò»¸öÕʺŠduzhe123.com£¬ÃÜÂëΪ boosou.com ¡£ºÇºÇ£¬ÕÊºÅºÍ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ