postbackUrl querystring

  • Thread starter Thread starter James Page
  • Start date Start date
J

James Page

Hi all

I have a gridview linked to a sql database. When send querystring parameters
to the details page I usually use the following format:

Eval("id", "~/detailspage.aspx?id={0}")

which works perfectly. However..
I need to pass two parameters to a particular details page:

"~/detailspage.aspx?id={0}&dt={0}

Having problems in trying to write the appropriate "Eval" statement.

Can anyone point me in the right direction?

Thanks
 
Hi all

I have a gridview linked to a sql database. When send querystring
parameters to the details page I usually use the following format:

Eval("id", "~/detailspage.aspx?id={0}")

which works perfectly. However..
I need to pass two parameters to a particular details page:

"~/detailspage.aspx?id={0}&dt={0}

Having problems in trying to write the appropriate "Eval" statement.

Can anyone point me in the right direction?

Just off the top of my head (although I am not sure the tilde will work
like this:

<%# string.Format("~/detailspage/aspx?id={0}&id2={1}", DataBinder.Eval
(Container.DataItem, "id"), DataBinder.Eval(Container.DataItem,"id2") %>

It can also be solved by using the row data binding event, but that is
coding, not just tags.

You can alter the above slightly to fit other formats.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

******************************************
| Think outside the box! |
******************************************
 
Back
Top