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? 3 44912
Try
<asp:DataGrid 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,"Order ID")%>' NavigateUrl='<%# "page.aspx?Orderid=" + DataBinder.Eval(Container.DataItem,"Orderid") + "&ProductID=" + DataBinder.Eval(Container.DataItem,"ProductID")%>' ID="Hyperlink1" NAME="Hyperlink1"/>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>
Use & in case of Vb.NET
HTH
Regards
Sushila
..NET MVP
"bpschmid" <bp******@hotmail.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?
Thanks!
Do you have to use a template column? -----Original Message----- Try <asp:DataGrid 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> </asp:DataGrid> Use & in case of Vb.NET HTH Regards Sushila ..NET MVP "bpschmid" <bp******@hotmail.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?
To pass 2 variable you wud use template column
"bpschmid" <bp******@hotmail.com> wrote in message
news:02****************************@phx.gbl... Thanks!
Do you have to use a template column?
-----Original Message----- Try <asp:DataGrid 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> </asp:DataGrid> Use & in case of Vb.NET HTH Regards Sushila ..NET MVP "bpschmid" <bp******@hotmail.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?
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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:...
|
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 :...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: WisdomUfot |
last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
|
by: Carina712 |
last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
|
by: BLUEPANDA |
last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
|
by: Rahul1995seven |
last post by:
Introduction:
In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
|
by: Ricardo de Mila |
last post by:
Dear people, good afternoon...
I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control.
Than I need to discover what...
|
by: Johno34 |
last post by:
I have this click event on my form. It speaks to a Datasheet Subform
Private Sub Command260_Click()
Dim r As DAO.Recordset
Set r = Form_frmABCD.Form.RecordsetClone
r.MoveFirst
Do
If...
|
by: ezappsrUS |
last post by:
Hi,
I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
|
by: DizelArs |
last post by:
Hi all)
Faced with a problem, element.click() event doesn't work in Safari browser.
Tried various tricks like emulating touch event through a function:
let clickEvent = new Event('click', {...
|
by: F22F35 |
last post by:
I am a newbie to Access (most programming for that matter). I need help in creating an Access database that keeps the history of each user in a database. For example, a user might have lesson 1 sent...
| |