sabaedge
sabaedge

Reputation: 101

query string length issue in IE

We have an ASP .NET 4.0 application. We transfer data between pages through query strings. In one case we are moving a large data to the next page which is around 7000 characters. We were getting query string length error. Then we tried increasing the maxquerystring length in Web.config. Now it is not throwing any error, but IE reduces the URL to 2k and opens the page. The full query data is not passed to the page. Is there any option to increase IE URL length?

Upvotes: 0

Views: 744

Answers (2)

Manoj Mevada
Manoj Mevada

Reputation: 659

Please try this:

Create a hidden variable and get this hidden variable through Request["Variable Name"]

<input type=hidden name="Test" value="99" /> In ASPX Page
string xyx=Request.Form["test"].ToString(); - Code Behind

Here is example: I have created two pages 1. Default.aspx and WebForm1.aspx. Please refer attached images:

Default.aspx Default.aspx.cs WebForm1.aspx WebForm1.aspx.cs

Upvotes: 3

EdSF
EdSF

Reputation: 12341

Just spitballing - in your comments, you don't want to POST, nor db, nor (server) session, I think it's (been made) clear that querystring approach isn't/wasn't the way to go, then depending on your needs/requirements/audience, perhaps look into DOM/web/local storage...

Hth...

Upvotes: 0

Related Questions