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

ʹÓÃWebClient×Ô¶¯Ìîд²¢Ìá½»ASP.NETÒ³Ãæ±íµ¥


ʹÓÃWebClient×Ô¶¯Ìîд²¢Ìá½»ASP.NETÒ³Ãæ±íµ¥
      ÔÚ.NETÖÐͨ¹ý³ÌÐòÌîдºÍÌá½»±íµ¥»¹ÊDZȽϼòµ¥¡£±ÈÈ磬ҪÌá½»Ò»¸öÈçÏÂͼËùʾµÄµÇ¼±íµ¥£º
           
ÌîдºÍÌá½»ÒÔÉÏ±íµ¥µÄ´úÂëÈçÏ£º
       // ÒªÌá½»±íµ¥µÄURI×Ö·û´®¡£
       string uriString = "http://www.xxx.com/Login.aspx";
       // ÒªÌá½»µÄ×Ö·û´®Êý¾Ý¡£
       string postString = "userName=user1&password=password1";
       // ³õʼ»¯WebClient
       WebClient webClient = new WebClient();
       webClient.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
       // ½«×Ö·û´®×ª»»³É×Ö½ÚÊý×é
       byte[] postData = Encoding.ASCII.GetBytes(postString);
       // ÉÏ´«Êý¾Ý£¬·µ»ØÒ³ÃæµÄ×Ö½ÚÊý×é
       byte[] responseData = webClient.UploadData(uriString, "POST", postData);
       // ·µ»ØµÄ½«×Ö½ÚÊý×éת»»³É×Ö·û´®(HTML)
       string srcString = Encoding.UTF8.GetString(responseData);
srcStrinig ¾ÍÊÇÌá½»±íµ¥ºóËù·µ»ØÒ³ÃæµÄHTML¡£ÔõôÑù£¬ºÜ¼òµ¥°É¡£
      µ«ÊÇ£¬ÒÔÉÏ´úÂë¿ÉÒÔÌá½»ASP»òJSPÉú³ÉµÄ±íµ¥£¬È´²»ÄÜÌá½»ASP.NET±íµ¥¡£ÒòΪÌá½»ASP.NET±íµ¥Ê±£¬±ØÐë¸ø“__VIEWSTATE”ºÍ“__EVENTVALIDATION”¸³Öµ¡£“__VIEWSTATE”ºÍ“__EVENTVALIDATION”µÄÖµ¿ÉÒÔͨ¹ýÔÚÒªÌá½»µÄÒ³ÃæÉÏ°´ÓÒ¼ü“²é¿´Ô´Îļþ”ÖÐÕÒµ½¡£ÈçÏ£º
        id="__VIEWSTATE" value="/wEPDwUKM


Ïà¹ØÎĵµ£º

ASP.NET MVC 2µÄ´úÂëÒÔMS PLЭÒ鿪Դ·¢²¼

΢ÈíÒѾ­Ðû²¼ASP.NET MVC 2µÄ´úÂëÒÔMS-PLЭÒé·¢²¼,MS-PLÊÇÒ»¸öµÃµ½OSIÈÏÖ¤µÄ¿ªÔ´Ð­Ò飬ASP.NET MVC»ùÓÚMS-PL·¢²¼£¬ÊÇÒ»¸öÕæÕýµÄ¿ªÔ´¿ò¼ÜÇÒûÓÐÈκÎƽ̨ÏÞÖÆ£¬Ò²¾ÍÊÇ˵£¬Äú¿ÉÒÔÔÚmonoÏÂʹÓûò¿ª·¢ASP.NET MVCµÄÏà¹ØÏîÄ¿¡£ ¿ÉÒÔµ½ASP.NET MVC 2 RTM Download Details page»ñÈ¡Ô´´úÂë,»òÕßµ½CodePlexÉÏ»ñÈ¡£¬Õâ¸öÒ³ÃæÊÇ΢Èí¹Ù ......

C# asp.netÈçºÎʹÓÃMD5¼ÓÃÜ£¬½âÃÜ

using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;namespace md5
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(UserMd5("8"));
Console.WriteLine(GetMd5Str("8"));
}
/**//// <summary>
/// MD5 16λ¼ÓÃÜ ......

ASP.NET³£ÓÃÓï¾ä1 20Ìõ ·Ç³£ÊµÓÃ

1.//µ¯³ö¶Ô»°¿ò.µã»÷תÏòÖ¸¶¨Ò³Ãæ
Response.Write(&quot; <script>window.alert('¸Ã»áԱûÓÐÌá½»ÉêÇë,ÇëÖØÐÂÌá½»£¡')
</script>&quot;);
Response.Write(&quot; <script>window.location
='http://www.51aspx.com/bizpulic/upmeb.aspx' </script>&quot;);
2.//µ¯³ö¶Ô»°¿ ......

Mix 10 ÉϵÄasp.net mvc 2µÄÏà¹ØSession

Beyond File | New Company: from Cheesy Sample to Social Platform Scott Hanselman in Lagoon L on Monday at 11:30 AM The web has changed and there's a new way of thinking about your applications. You can't just write some HTML and CSS anymore and expect to be the next Twitter. Hear h ......

ASP.NETÖÐ×Ö·û´®½øÐÐMD5¼ÓÃÜ

×î½üÔÚ¿´¡¶asp.netͨÓÃÄ£¿é¼°µäÐÍϵͳ¿ª·¢ÊµÀýµ¼º½¡·£¬ÆäÖÐÓõ½ÁËMD5¼ÓÃÜ£¬´úÂëÈçÏ£º /// <summary>
/// ×Ö·û´®¼ÓÃܺ¯Êý
/// </summary>
/// <param name="strInput">ÊäÈë±»¼ÓÃܵÄ×Ö·û´®</param>
/// <returns>¼ÓÃܺóµÄ×Ö·û´®</return ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ