public static string ScrambleData(string data)
{
//string BaseAddress = "http://localhost/";
string CompleteRequestURL = "http://abcd:8090/Scrambler?value=" + data;
HttpWebRequest webrequest = (HttpWebRequest)WebRequest.Create(CompleteRequestURL);
//webrequest.Method = "GET";
webrequest.ContentType = "application/json";
string result;
using (WebResponse response = webrequest.GetResponse())
{
using (StreamReader reader = new StreamReader(response.GetResponseStream()))
{
result = reader.ReadToEnd();
return result;
}
}
}
protected void Button1_Click(object sender, EventArgs e)
{
// ScrambleData(result);
}
这里我创建了ScrambleData()
函数来加扰数据。我需要在Button1_Click
事件中调用此函数。无法正确调用此功能。任何人都可以帮助我.. ???