Data Scrambling function
<pre><code>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);
}
</code></pre>

<p>Here I have created <code>ScrambleData()</code> function for scrambling the data. I need to call this function in <code>Button1_Click</code> event. Not able to call this function correctly. Can any one help me please..???</p>