Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 25th, 2005, 09:04 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 218
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multiple Arguments for Hyperlink

In my datagrid's hyperlink column, I need to have two values from my datasource in the DataNavigateUrlFormatString. However, I'm having trouble declaring the two values to use.

I have two values I want to have in the DataNavigateUrlField; id1 and id2.

The DataNavigateUrlFormatString should look like this:
Code:
DetailsPage.aspx?id1={0}&id2={1}
I tried using "id1,id2" for the value of DataNavigateUrlField but to no avail. Any ideas on the syntax?

Thanks in advance for your comments.

- - - - - - - - - - - - - - - - - - - - - - -
In God we trust, everything else we test.
 
Old July 25th, 2005, 09:20 AM
Authorized User
 
Join Date: Nov 2004
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to avanishp
Default

Hi
You can not do it with hyperlinkcolumn, you can use TemplateColumn for this.
Here is one example how you can use TemplateColumn for hyperlink column:

<asp:DataGrid CellPadding="3" GridLines="None" Width="100%" AutoGenerateColumns="False" Runat="server">
                                            <Columns>
                                                <asp:TemplateColumn>
                                                <HeaderTemplate>Documents</HeaderTemplate>
                                                                                    <ItemTemplate ><a href="ViewandEdit.aspx?&filename=<%#DataBinder.Eva l(Container.DataItem,"DocumentLocation")%>&Documen tID=<%#DataBinder.Eval(Container.DataItem,"Documen tID")%>&CategoryName=<%=request.querystring("Categ oryName")%"><%#DataBinder.Eval(Container.DataItem, "DocumentName")%> </a></ItemTemplate>
                                                </asp:TemplateColumn>
                                            </Columns>
                                        </asp:DataGrid>

Avanish Pandey
Set your heart upon your work, but never on its reward
 
Old July 25th, 2005, 09:36 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 218
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks!

- - - - - - - - - - - - - - - - - - - - - - -
In God we trust, everything else we test.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Doesn't work properly for multiple file arguments. sbubendorf VBScript 7 September 20th, 2007 08:52 AM
multiple arguments MunishBhatia C# 2 December 8th, 2006 07:34 AM
Passing multiple arguments to function zarikiane XSLT 2 July 18th, 2006 09:35 AM
Problem passing multiple arguments to php script method PHP How-To 0 February 8th, 2006 09:03 AM
Getting the data out with multiple arguments toni_montana PHP Databases 2 September 12th, 2004 06:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.