Hello Frds,

I have a doubt regarding Querystring,

Actually my requirement is, I have a report page which contains the print option. If we click the Print then the same data will be visible accoring to the main Page. In the mainpage two textbox and a dropdown is there, after selecting and entering text we will get our grid. And when clicking print the same data will be visible alomg with the selected data in Lable.

The problem is that i have to send the data from main page to print page. When i am using Querystring the same will be visible by the user by viewing the Property.
And if i m using session it will make the application heavier .
What is the possible way to solve this Problem?

you can do a server.transfer and hide all your variables within the viewstate. This only works with server.transfer, and only the first time.

viewstate should be kept however it was during that page. Do a button that says "View Printer Friendly Version" or whatever, then have it post back to the server where under a sub you have:
server.Transfer("/printerpage.aspx")

It will automatically save your viewstate and transfer it along to your printerpage.aspx. Then you can grab what you need out of viewstate and print.

but what are you trying to do.. hide the URL from the printed page that appears at the bottom?

Actually the main page contain a link called Print. When we click the print we got a pop up which contain the same content as mainpage. the Problem is i have to send some data fro m main page to Print Page which will not visible to user. But here one can view by right click & view Property of that page.
Hope u understand wht i need?

why not make that form on the page send to that page? a postbackurl on your print button. And just make sure of the method type so it isn't via querystring.

That's URL rewriting

How about this.. under your link, create a javascript function for onmouseover, and then make the link have a querystring sent to the new page.

Hence:

<a href="printpage.aspx?i=1&e=2&r=3" onmouseover="window.status='';" target="_blank">Print</a>
This article has been dead for over six months. Start a new discussion instead.