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

C# post±íµ¥

2010Õâ¸öÔªµ©Ì«ÎÞÁÄÁË£¬ÓÚÊÇÕÒÁ˸öÆæ¼£ÓÎϷ˽·þË££¬ÔÚÍæµÄ¹ý³ÌÖз¢ÏÖ×ÜÊÇÒªµÇ¼µ½ÍøÕ¾ÉÏȥתÉú¼ÓµãÖ®ÀàµÄ²Ù×÷£¬1´Î2´Î»¹ºÃ£¬100´ÎÄã¾ÍÓôÃÆÁË£¬ÓÚÊÇ×Ô¼ºÏëд¸ö¼òµ¥µÄ³ÌÐòÀ´×ö¡£
ÒÔϾÍÊÇ´úÂ벿·ÖÀ²£º
£¨ÐèҪעÒâµÄÊÇWebClientµÄCookie²¿·Ö£©
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.IO;
using System.Collections.Specialized;
using System.Diagnostics;
using System.Text.RegularExpressions;
namespace ZSMU
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
WebClient client = new WebClient();
client.Headers.Add("Accept", "*/*");
client.Headers.Add("Accept-Encoding", "gzip, deflate");
client.Headers.Add("Accept-Language", "zh-cn");
client.Headers.Add("Cache-Control", "no-cache");
client.Headers.Add("Content-Type", "application/x-www-form-urlencoded");//±ØÌîÏîÄ¿
//myWebClient.Headers.Add("Connection", "Keep-Alive");
client.Headers.Add("Referer", "http://www53.292mu.com/usezs.asp");
byte[] byteArray = Encoding.Default.GetBytes("mfkuserchr=%C2%BD%C9%CF%B5%C4%D3%E3&mfkusername=admin&mfkpassword=123456");//½«Ìá½»µÄÊý¾Ýת»¯ÎªbyteÊý×é
string resposeData = Encoding.Default.GetString(client.UploadData("http://www53.292mu.com/usezs.asp", "post", byteArray));
resposeData=resposeData.Remove(0, resposeData.IndexOf("alert('") + 7);
resposeData=resposeData.Remove(resposeData.IndexOf(")") - 1);
resposeData=resposeData.Replace("\\n", "");
client.Dispose();
MessageBox.Show(resposeData);
}
priv


Ïà¹ØÎĵµ£º

C# ¼ÓÃÜ£­Managed Óë Provider

ÔÚ System.Security.Cryptography ÖУ¬ÎÒÃÇ¿ÉÒÔ¿´µ½ÓÐÐí¶àÀ࣬ÓÐЩÀ໹ºÜÏàËÆ£¬±ÈÈ磺
System.Security.Cryptography.SHA1
System.Security.Cryptography.SHA1Managed
System.Security.Cryptography.SHA1CryptoServiceProvider
ÕâÈý¸öÀàÓÐʲô¹ØÏµÄØ£¿
SHA1
ÊdzéÏóÀà
£¬SHA1Managed
ºÍ SHA1CryptoServiceProvider ......

c# ÑéÖ¤Âë×é¼þ ¿Évb£¬asp£¬netµ÷ÓÃ

      ½ñÌ칫˾ҪÇóÓÃC#д¸öÑéÖ¤Âë×é¼þ£¬ÈÃasp¿ÉÒÔµ÷Óã¬ÔÚÍøÉÏÕÒÁËÒ»¶Ñ×ÊÁÏ£¬ÖÕÓÚ¸øÎÒ¸ø¸ã³öÀ´ÁË£¬ÒòΪ±¾È˵ÚÒ»´Îд×é¼þ£¬Ò²ÊǵÚÒ»´Î·¢±íÎÄÕ£¬ËùÓпÉÄÜ˵µÄ²»ÊǺܺ㬴ó¼ÒÇë¼ûÁ¡£
      csdnÉÏÓÐÕâôƪÎÄÕ£¬Ïëѧϰд×é¼þµÄ¿ÉÒÔÈ¥¿´¿´£ºhttp://blog.csdn.net/KimmKi ......

C# Éú³ÉXMLʱµÄÌØÊâ×Ö·û³öÏÖÒì³£´¦Àí

Éú³É¶Ë´¦Àí
½«ÒªÐ´ÈëµÄÖµµÄǰºóдÉÏÈç:"<![CDATA[" + string+ "]]>";
XmlNode xnformchild = doc.CreateNode(XmlNodeType.Element, dc.ColumnName.ToUpper(), "");
try
{
xnformchild.InnerXml = drform[dc.ColumnName].ToString( ......

asp.net c# js·þÎñÆ÷¶Ë³£ÓÃ

using System;
using System.Web;
namespace pub.mo
{
public class js
{
private js() { }
private static string scr_j1 = "<mce:script type=\"text/javascript\"><!--
";
private static string scr_j2 = "
// --></mce:script>";
/// <summa ......

C# µ¥ÊµÀýÉè¼ÆÄ£Ê½

SingletonģʽµÄʵÏÖ
SingletonģʽµÄʵÏÖ»ùÓÚÁ½¸öÒªµã£º
1£©²»Ö±½ÓÓÃÀàµÄ¹¹Ô캯Êý£¬¶øÁíÍâÌṩһ¸öPublicµÄ¾²Ì¬·½·¨À´¹¹ÔìÀàµÄʵÀý¡£Í¨³£Õâ¸ö·½·¨È¡ÃûΪInstance¡£Public±£Ö¤ÁËËüµÄÈ«¾Ö¿É¼ûÐÔ£¬¾²Ì¬·½·¨±£Ö¤Á˲»»á´´½¨³ö¶àÓàµÄʵÀý¡£
2£©½«ÀàµÄ¹¹Ô캯ÊýÉèΪPrivate£¬¼´½«¹¹Ô캯Êý"Òþ²Ø"ÆðÀ´£¬ÈÎºÎÆóͼʹÓù¹Ô캯Êý´´½¨Ê ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ