Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > postbackUrl querystring

Reply
Thread Tools

postbackUrl querystring

 
 
James Page
Guest
Posts: n/a
 
      07-16-2009
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

 
Reply With Quote
 
 
 
 
Gregory A. Beamer
Guest
Posts: n/a
 
      07-16-2009
=?Utf-8?B?SmFtZXMgUGFnZQ==?= <(E-Mail Removed)> wrote
in news:(E-Mail Removed):

> 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! |
******************************************
 
Reply With Quote
 
 
 
 
James Page
Guest
Posts: n/a
 
      07-16-2009
Thanks again Gregory - just what I needed to get going

"Gregory A. Beamer" wrote:

> =?Utf-8?B?SmFtZXMgUGFnZQ==?= <(E-Mail Removed)> wrote
> in news:(E-Mail Removed):
>
> > 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! |
> ******************************************
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enable a button via javascript with PostBackUrl set -> the postbackurl doesn't work Fabio Mastria ASP .Net 2 03-04-2008 09:23 AM
How to get value of QueryString inside QueryString Mehdi ASP .Net 6 04-06-2006 03:41 PM
Passing QueryString URL as a paremeter in QueryString Adeel Ahmad ASP General 1 03-07-2006 02:05 PM
ImageButon: PostBackURL Rob Meade ASP .Net 1 12-04-2005 11:43 AM
PostBackUrl cannot work for file link. ABC ASP .Net 6 10-07-2005 06:05 PM



Advertisments