-
Best way to handle this?
I have two datagrids on the page with lots of different buttons
And for each of these buttons I want to open a new window with size 200x200 to display some information depending on the button selected (I don't want to display much text info in the grid)
I handle the clicks like this:
for each button in the grid I specify a CommandName
I write an eventhandler for the ItemCommand event and parse along the commandname as an eventargument. In the handler I have a select-case that perform action depending on which argument was chosen.
The problem I have is how to design the opening of the button.
The first thing that came into mind was the
Response.Redirect("window.asp?ID=3&option=3")
To open as a _blank
That means I have to put db logic in the new smaller page based on the querystring values...
Can this be done with client side scripts? like adding attributes to the commandbuttons when I am designing the page?
kind regards
Henrik
-
Not entirely sure if i understand your question, so forgive me if I reiterate something you already know.
Normally, I always put a simple a-href tag on the aspx front side...
Code:
<a href='<%# String.Conat("\window.aspx?ID=",Databinder.eval(Container,"someparameter"), "&option=",Databinder.eval(Container,"secondparameter")) %>' target=_blank>Click here</a>