使用Javascript发送压缩的Querystring

时间:2014-02-26 06:01:31

标签: javascript asp.net compression query-string

到目前为止,我一直在谷歌搜索并没有找到任何解决方案。 有两个问题:

我有一个非常大的查询字符串,我需要使用java脚本中的任何算法压缩它,然后打开一个新窗口。

我需要在querystring中发送数据并打开一个新标签,我无法在会话中添加数据,因为会话将在服务器端转移我如果我将尝试从服务器端打开一个新选项卡,它将以新的方式打开窗口(而不是标签)。

我在Javascript中的代码:

  window.parent.open('../ReportWebForm.aspx?ReportType=BasicFundedReport&P1=' + fromdate + '&P2=' + toDate + '&P3=' + InstitutionId + '&P4=' + BranchId + '&P5=' + ContactId + '&P6=' + ProvinceId + '&P7=Applicant Ascending'+ '&P9=' + Text + '&P10=' + Q + '&P11=' + SelectedId + '&P12=' + SubTotalChk + '&P13=' + GroupSubtotalField + '&P14=' + GroupSubtotalOrder + '&P15=' + LenderSelection +'&P16=' + TeamLevel); 

这会产生很多查询字符串: 所以在会话中添加这些参数并尝试从服务器端启动: 我在服务器端的代码:

 Page.ClientScript.RegisterStartupScript(typeof(string), "", "window.parent.open('../ReportWebForm.aspx?ReportType=FundedReport','Funded Report','height=750,width=1400,left=0px,top=0px,resizable=yes,scrollbars=yes,toolbar=yes,status=yes);</script>");

这将打开一个新窗口。 那么如何压缩查询字符串呢? 我一直在使用 encodeURIComponent 但不压缩它。

0 个答案:

没有答案