473,543 Members | 2,311 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Passing multiple query string params from datagrid hyperlink column

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?
Jul 19 '05 #1
3 45042
Try
<asp:DataGrid id="DataGrid1" AutoGenerateCol umns="False" style="Z-INDEX: 101; LEFT: 66px; POSITION: absolute; TOP: 79px" runat="server">
<Columns>
<asp:TemplateCo lumn HeaderText="Ord er">
<ItemTemplate >
<asp:Hyperlin k runat="server" Text='<%#DataBi nder.Eval(Conta iner.DataItem," OrderID")%>' NavigateUrl='<% # "page.aspx?Orde rid=" + DataBinder.Eval (Container.Data Item,"Orderid") + "&ProductID =" + DataBinder.Eval (Container.Data Item,"ProductID ")%>' ID="Hyperlink1 " NAME="Hyperlink 1"/>
</ItemTemplate>
</asp:TemplateCol umn>
</Columns>
</asp:DataGrid>
Use & in case of Vb.NET
HTH
Regards
Sushila
..NET MVP

"bpschmid" <bp******@hotma il.com> wrote in message news:07******** *************** *****@phx.gbl.. .
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?



Jul 19 '05 #2
Thanks!

Do you have to use a template column?

-----Original Message-----
Try
<asp:DataGri d id="DataGrid1" AutoGenerateCol umns="False" style="Z-INDEX: 101; LEFT: 66px; POSITION: absolute; TOP:
79px" runat="server"> <Columns>
<asp:TemplateCo lumn HeaderText="Ord er">
<ItemTemplate >
<asp:Hyperlin k runat="server" Text='<% #DataBinder.Eva l(Container.Dat aItem,"OrderID" )%>'
NavigateUrl='<% # "page.aspx?Orde rid=" + DataBinder.Eval
(Container.Data Item,"Orderid") + "&ProductID =" +
DataBinder.Eval (Container.Data Item,"ProductID ")%>'
ID="Hyperlink1 " NAME="Hyperlink 1"/> </ItemTemplate>
</asp:TemplateCol umn>
</Columns>
</asp:DataGrid>
Use & in case of Vb.NET
HTH
Regards
Sushila
..NET MVP

"bpschmid" <bp******@hotma il.com> wrote in message

news:07******** *************** *****@phx.gbl.. .
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?

Jul 19 '05 #3
To pass 2 variable you wud use template column

"bpschmid" <bp******@hotma il.com> wrote in message
news:02******** *************** *****@phx.gbl.. .
Thanks!

Do you have to use a template column?

-----Original Message-----
Try
<asp:DataGri d id="DataGrid1" AutoGenerateCol umns="False"

style="Z-INDEX: 101; LEFT: 66px; POSITION: absolute; TOP:
79px" runat="server">
<Columns>
<asp:TemplateCo lumn HeaderText="Ord er">
<ItemTemplate >
<asp:Hyperlin k runat="server" Text='<%

#DataBinder.Eva l(Container.Dat aItem,"OrderID" )%>'
NavigateUrl='<% # "page.aspx?Orde rid=" + DataBinder.Eval
(Container.Data Item,"Orderid") + "&ProductID =" +
DataBinder.Eval (Container.Data Item,"ProductID ")%>'
ID="Hyperlink1 " NAME="Hyperlink 1"/>
</ItemTemplate>
</asp:TemplateCol umn>
</Columns>
</asp:DataGrid>
Use & in case of Vb.NET
HTH
Regards
Sushila
..NET MVP

"bpschmid" <bp******@hotma il.com> wrote in message

news:07******** *************** *****@phx.gbl.. .
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?

Jul 19 '05 #4

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

Similar topics

1
2048
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: nextpage.aspx?id=11&name=somename for one querystring i would use nextpage.aspx?id={0} when i trying nextpage.aspx?id={0}&name={1} its raising errors Thanks,
10
125428
by: Resant | last post by:
I have a query : Exec 'Select * From Receiving Where Code In (' + @pCode + ')' @pCode will contain more than one string parameter, eg : A1, A2, A3 How can i write that parameters, I try use : set @pCode='A1','A2','A3' but get an error : Incorrect syntax near ','
1
7570
by: Coder Coder | last post by:
Hi I want the DataNavigateUrlFormatString value to be of a couple of different variables such as: DataNavigateUrlFormatString="mypage?val={0}&val2={1} where now I have the following working DataNavigateUrlFormatString="mypage?val="{0}
2
6885
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 from different values in the database. How can I therefore allow for this in the template rather than having to create a custom field in my stored...
1
4069
by: Greg Reynolds | last post by:
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:
1
2624
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 Builder. The problem I'm running into is trying to generate the URL with more than one URL Field entry. I need to have more than field but I can't figure...
1
2813
by: Roy | last post by:
I'm assuming this is amazingly simple and I'm just missing the boat. On the html side of an asp.net page I have a datagrid, a "search" button, and 8 text boxes for search criteria. A user enters in varying search criteria, hits "search", info is passed to a stored proc, results return and displayed in the datagrid. Every field in the...
3
386
by: bpschmid | last post by:
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...
1
2311
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 returns 3 columns) returned is the same. I have bound these columns dynamically by retrieving the column names like this. Dim bc1 As New...
0
7582
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7726
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7675
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5877
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4884
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3384
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3385
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1809
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
948
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.