Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to pass multiple hyperlink parameters with datagrid

Reply
Thread Tools

How to pass multiple hyperlink parameters with datagrid

 
 
=?Utf-8?B?R3JlZyBSZXlub2xkcw==?=
Guest
Posts: n/a
 
      10-20-2004
Hi,

I need to create datagrid hyperlink columns with multiple parameters in the
URL.
In my research on how to do this, it is recommended to create a template
column which I have done. The code I am using is creating the following error

BC30203: Identifier expected.

Source Error:

Line 36: <asp:TemplateColumn HeaderText="VIN">
Line 37: <ItemTemplate>
Line 38: <asp:HyperLink Runat="server"
Line 39: NavigateUrl='<%# _
Line 40: "Details.aspx?VINSeq=" &

Here is the code I have added for the template column
<asp:TemplateColumn HeaderText="VIN">
<ItemTemplate>
<asp:HyperLink Runat="server"
NavigateUrl='<%# _
"Details.aspx?VINSeq=" &
Container.DataItem("VINSeq") & _
"&VIN=" &
Container.DataItem("VIN") %>' />
</ItemTemplate>
</asp:TemplateColumn>

Any Ideas on a better way to pass multiple parameters with a data grid?

--
greynolds
 
Reply With Quote
 
 
 
 
Shiva
Guest
Posts: n/a
 
      10-20-2004
I believe for that you have to use a template column:

<asp:TemplateColumn HeaderText="Order">
<ItemTemplate>
<asp:Hyperlink RunAt="server" NavigateUrl='<%# "Target.aspx?Id1=" +
DataBinder.Eval (Container.DataItem,"Id1") & "&Id2="+
DataBinder.Eval(Container.DataItem,"Id2")%>' ID="Category" Text='<%#
DataBinder.Eval(Container.DataItem,"Title")%>' />
</ItemTemplate>
</asp:TemplateColumn>

HTH

"Greg Reynolds" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
Hi,

I need to create datagrid hyperlink columns with multiple parameters in the
URL.
In my research on how to do this, it is recommended to create a template
column which I have done. The code I am using is creating the following
error

BC30203: Identifier expected.

Source Error:

Line 36: <asp:TemplateColumn HeaderText="VIN">
Line 37: <ItemTemplate>
Line 38: <asp:HyperLink Runat="server"
Line 39: NavigateUrl='<%# _
Line 40: "Details.aspx?VINSeq=" &

Here is the code I have added for the template column
<asp:TemplateColumn HeaderText="VIN">
<ItemTemplate>
<asp:HyperLink Runat="server"
NavigateUrl='<%# _
"Details.aspx?VINSeq=" &
Container.DataItem("VINSeq") & _
"&VIN=" &
Container.DataItem("VIN") %>' />
</ItemTemplate>
</asp:TemplateColumn>

Any Ideas on a better way to pass multiple parameters with a data grid?

--
greynolds


 
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
multiple parameters for a datagrid url hyperlink LB ASP .Net 1 04-01-2005 02:07 PM
multiple parameters for a datagrid url hyperlink LB ASP .Net Web Controls 0 03-30-2005 11:37 PM
pass 2 parameters using HyperLink column? Joriz ASP .Net Building Controls 1 07-02-2004 11:40 AM
Multiple Parameters With Hyperlink in DataGrid eRic ASP .Net Building Controls 5 07-19-2003 09:19 PM
Multiple Parameters With Hyperlink in DataGrid eRic ASP .Net Web Controls 0 07-10-2003 10:55 PM



Advertisments