473,406 Members | 2,220 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How to pass multiple hyperlink parameters with datagrid

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
Nov 18 '05 #1
1 4050
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" <Gr**********@discussions.microsoft.com> wrote in message
news:55**********************************@microsof t.com...
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
Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: cksj | last post by:
I have a link on my web app that opens a pop-up window. In the pop-up window, the user can search for policy information. The result is displayed on a datagrid. The datagrid has 1 hyperlink column...
1
by: Amy | last post by:
All, I'd like to use multiple querystring in hyperlink column in Datagrid I want to create a hyperlink column in my datagrid which contains two query strings ex:...
0
by: Ruy Castelli | last post by:
Hello, currently, I've got a datagrid and one of its columns is a hyperlink. I would like to get this link to open a popup window with the details of the selected record. With the old ISAPI...
3
by: Kumar | last post by:
Hi Folks, I have a question regarding conditional hyperlink in datagrid. I want to display Hyperlink if my QID values in (1,4,5,6) other wise i want to display just Qdescription with out...
2
by: Carl Howarth | last post by:
Hi, I need to bind data to a datagrid and have a custom hyperlink column that has multiple elements in the querystring: Page.aspx?1=Hello&2=Goodbye... The query string needs to be populated...
1
by: carlor | last post by:
Hi there, I have a datagrid that is bound to a datasource. The grid has a hyperlink column and I want to generate the URL using the URL Field and URL Format String fields in the Property...
1
by: jeguillo | last post by:
I am trying to retrieve the text within each cell in a datagrid in order to change the color of each cell, depending on the value within that cell. This works fine on the cells that are bound...
1
by: dhanlak | last post by:
I am doing a asp.net Project, in which i need to populate a datagrid using a stored procedure. The stored procedure returns different column names based on the user input, but the no of columns(it...
4
by: hirnis | last post by:
pls anyone tell me that how to pass more parameter into the datagrid with hyperlink column at client side because i required a value of the selected hyperlink cell for fetching another table and also...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.