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

ASP.NET post·ÃÎÊÍâÍø½Ó¿Ú»ñÈ¡Êý¾Ý

·½·¨Ò»£º
 string postData = string.Format("a=1&b=2");   //post´«µÝ²ÎÊý
        Stream outstream = null;
        Stream instream = null;
        StreamReader sr = null;
        HttpWebResponse response = null;
        HttpWebRequest request = null;
        Encoding encoding = Encoding.Default;
        byte[] data = encoding.GetBytes(postData);
        // ×¼±¸ÇëÇó
       
            // ÉèÖòÎÊý
            request = WebRequest.Create("http://www.baidu.com") as HttpWebRequest;
            CookieContainer cookieContainer = new CookieContainer();
            request.CookieContainer = cookieContainer;
            request.AllowAutoRedirect = true;
            request.Method = "POST";
            request.ContentType = "application/x-www-form-urlencoded";
            request.ContentLength = data.Length;
            outstream = request.GetRequestStream();
            outstream.Write(data, 0, data.Length);
            outstream.Close();
            //·¢ËÍÇëÇó²¢»ñÈ¡ÏàÓ¦»ØÓ¦Êý¾Ý


Ïà¹ØÎĵµ£º

ASP.net 130µÀÃæÊÔÓÃÌâ

1. ¼òÊö private¡¢ protected¡¢ public¡¢ internal ÐÞÊηûµÄ·ÃÎÊȨÏÞ¡£
´ð . private : ˽ÓгÉÔ±, ÔÚÀàµÄÄÚ²¿²Å¿ÉÒÔ·ÃÎÊ¡£
protected : ±£»¤³ÉÔ±£¬¸ÃÀàÄÚ²¿ºÍ¼Ì³ÐÀàÖпÉÒÔ·ÃÎÊ¡£
public : ¹«¹²³ÉÔ±£¬ÍêÈ«¹«¿ª£¬Ã»ÓзÃÎÊÏÞÖÆ¡£
internal: ÔÚͬһÃüÃû¿Õ¼äÄÚ¿ÉÒÔ·ÃÎÊ¡£
 
2 .ÁоÙASP.NET Ò³ÃæÖ®¼ä´«µÝÖµµÄ¼¸ÖÖ·½ ......

asp.netÐÔÄÜÓÅ»¯µÄ¼¸¸ö·½Ãæ

c#£¨»òvb.net£©³ÌÐò¸Ä½ø
1¡¢Ê¹ÓÃÖµÀàÐ͵ÄToString·½·¨
¡¡¡¡ÔÚÁ¬½Ó×Ö·û´®Ê±£¬¾­³£Ê¹ÓÃ"+"ºÅÖ±½Ó½«Êý×ÖÌí¼Óµ½×Ö·û´®ÖС£ÕâÖÖ·½·¨ËäÈ»¼òµ¥£¬Ò²¿ÉÒԵõ½ÕýÈ·½á¹û£¬µ«ÊÇÓÉÓÚÉæ¼°µ½²»Í¬µÄÊý¾ÝÀàÐÍ£¬Êý×ÖÐèҪͨ¹ý×°Ïä²Ù×÷ת»¯ÎªÒýÓÃÀàÐͲſÉÒÔÌí¼Óµ½×Ö·û´®ÖС£µ«ÊÇ×°Ïä²Ù×÷¶ÔÐÔÄÜÓ°Ïì½Ï´ó£¬ÒòΪÔÚ½øÐÐÕâÀà´¦Àíʱ£¬½«ÔÚÍйܶÑÖÐ ......

asp.net ÍøÒ³´«²ÎµÄ¼¸ÖÖ³£Ó÷½Ê½

asp.net ÍøÒ³´«²ÎµÄ¼¸ÖÖ³£Ó÷½Ê½
µÚÒ»ÖÖ£ºQueryString
//½«Ô´Ò³Ãæstart.aspxÖеÄlable ºÍtextboxÖеÄÄÚÈÝ´«µ½end.aspxÒ³ÃæÖР ²¢ÔÚÆälable ºÍtextboxÖÐÏÔʾ´«¹ýÀ´µÄÄÚÈÝ
   Ô´Ò³Ãæ´úÂ룺
protected void Button1_Click(object sender, EventArgs e)
    {
    & ......

´ÓASP.NETÓ¦ÓóÌÐòÉú´æÖÜÆÚ̸Æð

  ²»Öª²»¾õ¹¤×÷ÒѾ­Á½Äê¶àÁË£¬Ò»Ö±Ïë°Ñ¹ýÈ¥µÄµãµãµÎµÎ»ýÀ۵ľ­ÑéдÏÂÀ´£¬µ«ÊÇÒ»Ö±ÄÑÒÔÍê³É£¬Ò»ÊÇʱ¼äµÄÏÞÖÆ£¬ÔÙÊÇËùÒԵö«Î÷»¹ÊDZȽÏÔÓÂÒ£¬Ò»Ê±ÄÑÒÔÕûÀí¡£ÏÂÃæ¾Í´ÓASP.NETÓ¦ÓóÌÐòÉú´æÖÜÆÚ¿ªÊ¼Ì¸Æð£¬Ö÷ÒªÊÇÒÔ´ËΪһ¸ö¿ªÍ·£¬ÀϲûÊö¸öÈ˵ÄһЩ¾­Ñé¾­Ñé̸֮ºÍ¶Ô²Î¿¼Ò»Ð©×ÊÁϵÄÀí½â¡£
  Ê×ÏÈ£¬ÎÊÌâÒ»£ºÎÒÃÇ´ò¿ªÒ»¸öÍ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ