postbackUrl querystring

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
 
G

Gregory A. Beamer

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top