PC Review


Reply
Thread Tools Rating: Thread Rating: 10 votes, 3.00 average.

Passing multiple query string params from datagrid hyperlink column

 
 
bpschmid
Guest
Posts: n/a
 
      4th Aug 2003
Ive got a datagrid with a hyperlink column.
I want to click on that column and go to another page, but
here's the kicker, I need and want to pass not one, but
two different query string parameters and format strings
from 2 different bound columns. I know I could do this
using session variables, but I really want to do it using
query string parameters. Anyone know a way to do this?


 
Reply With Quote
 
 
 
 
Sonali.NET[MVP]
Guest
Posts: n/a
 
      4th Aug 2003
Try
<aspataGrid id="DataGrid1" AutoGenerateColumns="False" style="Z-INDEX: 101; LEFT: 66px; POSITION: absolute; TOP: 79px" runat="server">
<Columns>
<asp:TemplateColumn HeaderText="Order">
<ItemTemplate>
<asp:Hyperlink runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"OrderID")%>' NavigateUrl='<%# "page.aspx?Orderid=" + DataBinder.Eval(Container.DataItem,"Orderid") + "&ProductID=" + DataBinder.Eval(Container.DataItem,"ProductID")%>' ID="Hyperlink1" NAME="Hyperlink1"/>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</aspataGrid>
Use & in case of Vb.NET
HTH
Regards
Sushila
..NET MVP



"bpschmid" <(E-Mail Removed)> wrote in message news:077f01c35a96$4ab620b0$(E-Mail Removed)...
> Ive got a datagrid with a hyperlink column.
> I want to click on that column and go to another page, but
> here's the kicker, I need and want to pass not one, but
> two different query string parameters and format strings
> from 2 different bound columns. I know I could do this
> using session variables, but I really want to do it using
> query string parameters. Anyone know a way to do this?
>
>


 
Reply With Quote
 
 
 
 
bpschmid
Guest
Posts: n/a
 
      4th Aug 2003
Thanks!

Do you have to use a template column?


>-----Original Message-----
> Try
><aspataGrid id="DataGrid1" AutoGenerateColumns="False"

style="Z-INDEX: 101; LEFT: 66px; POSITION: absolute; TOP:
79px" runat="server">
> <Columns>
> <asp:TemplateColumn HeaderText="Order">
> <ItemTemplate>
> <asp:Hyperlink runat="server" Text='<%

#DataBinder.Eval(Container.DataItem,"OrderID")%>'
NavigateUrl='<%# "page.aspx?Orderid=" + DataBinder.Eval
(Container.DataItem,"Orderid") + "&ProductID=" +
DataBinder.Eval(Container.DataItem,"ProductID")%>'
ID="Hyperlink1" NAME="Hyperlink1"/>
> </ItemTemplate>
> </asp:TemplateColumn>
> </Columns>
> </aspataGrid>
>Use & in case of Vb.NET
>HTH
>Regards
>Sushila
>..NET MVP
>
>
>
>"bpschmid" <(E-Mail Removed)> wrote in message

news:077f01c35a96$4ab620b0$(E-Mail Removed)...
>> Ive got a datagrid with a hyperlink column.
>> I want to click on that column and go to another page,

but
>> here's the kicker, I need and want to pass not one, but
>> two different query string parameters and format

strings
>> from 2 different bound columns. I know I could do this
>> using session variables, but I really want to do it

using
>> query string parameters. Anyone know a way to do this?
>>
>>

>

 
Reply With Quote
 
Sonali.NET[MVP]
Guest
Posts: n/a
 
      4th Aug 2003
To pass 2 variable you wud use template column

"bpschmid" <(E-Mail Removed)> wrote in message
news:02c001c35ab3$bd039400$(E-Mail Removed)...
> Thanks!
>
> Do you have to use a template column?
>
>
> >-----Original Message-----
> > Try
> ><aspataGrid id="DataGrid1" AutoGenerateColumns="False"

> style="Z-INDEX: 101; LEFT: 66px; POSITION: absolute; TOP:
> 79px" runat="server">
> > <Columns>
> > <asp:TemplateColumn HeaderText="Order">
> > <ItemTemplate>
> > <asp:Hyperlink runat="server" Text='<%

> #DataBinder.Eval(Container.DataItem,"OrderID")%>'
> NavigateUrl='<%# "page.aspx?Orderid=" + DataBinder.Eval
> (Container.DataItem,"Orderid") + "&ProductID=" +
> DataBinder.Eval(Container.DataItem,"ProductID")%>'
> ID="Hyperlink1" NAME="Hyperlink1"/>
> > </ItemTemplate>
> > </asp:TemplateColumn>
> > </Columns>
> > </aspataGrid>
> >Use & in case of Vb.NET
> >HTH
> >Regards
> >Sushila
> >..NET MVP
> >
> >
> >
> >"bpschmid" <(E-Mail Removed)> wrote in message

> news:077f01c35a96$4ab620b0$(E-Mail Removed)...
> >> Ive got a datagrid with a hyperlink column.
> >> I want to click on that column and go to another page,

> but
> >> here's the kicker, I need and want to pass not one, but
> >> two different query string parameters and format

> strings
> >> from 2 different bound columns. I know I could do this
> >> using session variables, but I really want to do it

> using
> >> query string parameters. Anyone know a way to do this?
> >>
> >>

> >



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
passing params to multiple querydefs and transferspreadsheet Doug Glancy Microsoft Access 8 8th Oct 2008 01:55 AM
passing params to a query from a screen field.. Brad Pears Microsoft Access Form Coding 0 21st Jun 2006 10:15 PM
Passing Params to Embedded query programmatically G Microsoft Excel Programming 1 15th Feb 2005 02:43 PM
Passing Params =?Utf-8?B?S2V2?= Microsoft Access Form Coding 2 23rd Apr 2004 05:16 PM
passing a params-array to another function with params-array Tobias Olbort Microsoft C# .NET 2 14th Jan 2004 05:57 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:28 PM.