I'm using an html file like below (tv.html):
<form action="myaspx.aspx?appid=5018" method="post" id="formSubscription" name="formSubscription">
<input type="checkbox" id="chckIsConfirm" name="chckIsConfirm"/> I Confirm
<input type="submit" value="Ok" />
</form>
And trying to get it from "myaspx.aspx". And the code behind is:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
var r = HttpContext.Current.Request["chckIsConfirm"];
//Or
NameValueCollection nvc = Request.Form;
//Or
var a = Request.Form.AllKeys;
}
}
But I cannot pass the value of "chckIsConfirm". All keys comes empty.. What am I doing wrong?
UPDATE: Only when I check the checkbox it comes as "ON" other times just NULL.
Thanks in advance