Hi I am trying to send post request using WebClient
using (var wb = new WebClient())
{
var data = new NameValueCollection();
data["TextBox1"] = "myUser";
var response = wb.UploadValues("http://localhost:16952/Index.aspx", "POST",data );
}
I am running the ASP.net web forms application on same computer this is load event
protected void Page_Load(object sender, EventArgs e)
{
if(this.IsPostBack)
{
int a = 44;
}
else
{
string b = "avoie";
}
}
so when I try to post the else routine executes why? (the name of input is TextBox1)