|
-
Oct 14th, 2003, 02:17 PM
#1
Thread Starter
Junior Member
is it possible in .NET
Hi Guys, Windows 2000, IIS 5.0 ASP.NET
I am using DataGrid with HyperLinkColumn, it works O.K,
Problem is: I need to send to my link page two values, (salesId and productNo) sofar I can send only one. Thanks!!
- The value of the Clicked cell
- The value of the First cell at the same row
Sql Table
productNo orderNo salesId
2500 025 MC02
<asp:HyperlinkColumn runat="server"
DataNavigateUrlField="productNo"
DataNavigateUrlFormatString="report4.aspx?id={0}"
DataTextField="salesId"
</asp:HyperLinkColumn>
-
Oct 14th, 2003, 05:23 PM
#2
Frenzied Member
What do you mean by on one?
You can do this DataNavigateUrlFormatString="report4.aspx?id={0}&no={1}"
-
Oct 14th, 2003, 10:43 PM
#3
PowerPoster
Here is how I do it in my forums:
Code:
NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.salesId", "report4.aspx?id={0}") + DataBinder.Eval(Container, "DataItem.productNo", "&prodnum={0}") %>'
I am just basically adding some more information to the first string. If you are using VB.Net, then you will probably have to change the '+' to an & like so:
Code:
NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.salesId", "report4.aspx?id={0}") & DataBinder.Eval(Container, "DataItem.productNo", "&prodnum={0}") %>'
Works pretty well for me, you can see it at my forums when you click a thread link:
http://www.variantx.com/VXForums/Posts.aspx?CatID=3
-
Oct 15th, 2003, 03:24 PM
#4
Thread Starter
Junior Member
Thnak you for your quick response, however I can not make it to work for me.
Following is the structure I have
<asp:TemplateColumn HeaderText="Product Number">
<ItemTemplate>
NavigateUrl='<%# DataBinder.Eval
(Container, "DataItem.salesId", "report4.aspx?id={0}") &
DataBinder.Eval(Container, "DataItem.productNo",
"&prodnum={0}") %>'
</ItemTemplate>
</asp:TemplateColumn>
Appreciate any further help,
-
Oct 15th, 2003, 08:15 PM
#5
PowerPoster
Try this:
<asp:TemplateColumn HeaderText="Product Number">
<ItemTemplate>
<asp:HyperlinkColumn runat="server" NavigateUrl=
'<%# DataBinder.Eval(Container, "DataItem.salesId", "report4.aspx?id={0}") & DataBinder.Eval(Container, "DataItem.productNo",
"&prodnum={0}") %>' DataTextField="salesId">
</asp:HyperLinkColumn>
</ItemTemplate>
</asp:TemplateColumn>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|