I have a hidden value field on a page. On submit I post to a different page. On the page I've posted to I do a Request.Form but I do not get the value just a null value.
This is the initial page
The javascript ViewCancellation function is set to a hyperlink in the code behind. The function will have a value like this,cancel
On the page I'm posting to I'm doing this
string sResID = "";
protected void Page_Load(object sender, EventArgs e)
{
HttpContext context = HttpContext.Current;
sResID = context.Request.Form["ResID"] != null ? context.Request.Form["ResID"] : "";
sResID = Regex.Replace(sResID, "/[^A-Z]\\d-/g", "");
context.Response.Write(sResID);
}
sResID gets no value because context.Request.Form["ResID"] is null. How can I get the value to this page. I've enabledviewstate
Manish Kumar ChoudharyPosted Feb 18, 2015, 4:44 AM
Peter CottlePosted Feb 18, 2015, 4:36 AM
Riddhi ValechaPosted Feb 18, 2015, 4:27 AM
Use Session Variables instead of Hidden Field Values .
That will be easier...