数据加扰功能

时间:2016-03-28 06:55:41

标签: javascript c#

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事件中调用此函数。无法正确调用此功能。任何人都可以帮助我.. ???

0 个答案:

没有答案