IE中的查询字符串长度问题

时间:2022-01-07 14:38:03

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?

我们有一个ASP .NET 4.0应用程序。我们通过查询字符串在页面间传输数据。在一种情况下,我们将大数据移动到下一页,大约7000个字符。我们得到了查询字符串长度错误。然后我们尝试在Web.config中增加maxquerystring长度。现在它没有抛出任何错误,但IE将URL减少到2k并打开页面。完整的查询数据不会传递给页面。有没有增加IE URL长度的选项?

2 个解决方案

#1


2  

Please try this:

请试试这个:

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

创建隐藏变量并通过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:

这是一个例子:我创建了两个页面1. Default.aspx和WebForm1.aspx。请参考附图:

IE中的查询字符串长度问题IE中的查询字符串长度问题IE中的查询字符串长度问题IE中的查询字符串长度问题

#2


0  

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...

只是spitballing - 在你的评论中,你不想POST,也不想db,也不想(服务器)会话,我认为已经(已经做出)明确了querystring方法不是/不是要走的路,然后依赖于您的需求/要求/受众,或许可以查看DOM / web /本地存储...

Hth...

心连心...

#1


2  

Please try this:

请试试这个:

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

创建隐藏变量并通过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:

这是一个例子:我创建了两个页面1. Default.aspx和WebForm1.aspx。请参考附图:

IE中的查询字符串长度问题IE中的查询字符串长度问题IE中的查询字符串长度问题IE中的查询字符串长度问题

#2


0  

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...

只是spitballing - 在你的评论中,你不想POST,也不想db,也不想(服务器)会话,我认为已经(已经做出)明确了querystring方法不是/不是要走的路,然后依赖于您的需求/要求/受众,或许可以查看DOM / web /本地存储...

Hth...

心连心...