how do you....

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

pass some sql onto another page?

I have a query that I have a datagrid on, that has controls on it. I'm
trying to export it to excel, and I am unable to make the export work on the
page. I know I have controls on the web page (sorting, filtering, etc), and
am wanting to try to monitor my radio button onclick event and go to another
page, this one with a datagrid on it that is static, with no controls.

My sql is in a property value within the vb code behind the page, and what
I'm wanting to do is do a response.redirect to the new page, and pass on the
sql code as it last was.

How do you do this, without stringing it up on the address bar?

In my new page, I'll have the same old datagrid on it, but the controls will
be static, and the column names unsortable.

SC
 
You can go a couple of ways: First you could just use the same DataGrid for
both on the same page and just hide the columns you don't want showing.
(i.e. ones with radiobuttons or linkbuttons).
The second way is to pass your filter/sort parameters as parameters and
write the same SQL statement in the other page.

Of course then there is the long way which would be to create a Business
Layer that had the data stored as an object that could be put in a session
variable while having your parameters stored with it as well.

There are probably even more ways to accomplish this but this is off the top
of my head. My preferable way is the last and long way. It is only longer
because you have to re-write some of your logic.

-Stanley
 
Back
Top