I have been Googling and have not come to any solution, till now. There are two problems:
I have a query string which is quite large, and I need to compress the same using any algorithm in java script and then open a new window.
I need to send data in querystring and open a new tab, I cannot add data in session, as session will shift me on server side and If I will try to open a new tab from server side, it opens in a new window (instead of tab).
My code in 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);
This makes a lot of querystring: So add these parameters in session and try to launch from server side: My code in server side:
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>");
This opens a new window. So how can I compress querystring? I have been using encodeURIComponent but that doesnt compress it.