Actual url:
/product.aspx?type=hats
Rewritten url:
/product/hats
Rewritten url after postback:
/product/hats?type=hats
which is actually equal to /product.aspx?type=hats&type=hats
So the type value is "hats,hats".
To avoid repeat of querystring variables simply check if the url is already rewritten:
protected void Page_Load(object sender, EventArgs e){if ( !String.IsNullOrEmpty(Request.ServerVariables["HTTP_X_ORIGINAL_URL"]) ){form1.Action = Request.ServerVariables["HTTP_X_ORIGINAL_URL"];}}
Detailed description:
No comments:
Post a Comment