473,395 Members | 1,474 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,395 software developers and data experts.

URL format string based on 2 data columns?

jib
Hiya,

I have a data grid with one column being a "hyperlink column". I want to use
this column to jump to another aspx page based on two different column
values from the underlying dataset. Setting up a hyperlink based on a single
column is simple:

URL field: VariableA
URL format string: MyPage.aspx?VariableA={0}

Now how would I do this with two variables? The following doesnt work:

URL field: VariableA, VariableB
URL format string: MyPage.aspx?VariableA={0}?VariableB={1}
Ideas anyone?

Jib
Nov 17 '05 #1
1 3188
Try something like this:

<asp:TemplateColumn HeaderText="Edit">
<ItemStyle Width="180px" />
<ItemTemplate>
<asp:HyperLink ID=hlEdit Runat=server NavigateUrl='<%#
"MyPage.aspx?VariableA=
+ DataBinder.Eval(Container.DataItem, VariableA")
+ "&VariableB="
+ DataBinder.Eval(Container.DataItem, VariableB")
%>'>Edit</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>

Scott

"jib" <ji***@hotmail.com> wrote in message
news:O5**************@tk2msftngp13.phx.gbl...
Hiya,

I have a data grid with one column being a "hyperlink column". I want to use this column to jump to another aspx page based on two different column
values from the underlying dataset. Setting up a hyperlink based on a single column is simple:

URL field: VariableA
URL format string: MyPage.aspx?VariableA={0}

Now how would I do this with two variables? The following doesnt work:

URL field: VariableA, VariableB
URL format string: MyPage.aspx?VariableA={0}?VariableB={1}
Ideas anyone?

Jib

Nov 17 '05 #2

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

Similar topics

5
by: Rich | last post by:
I have to read data from an external source, massage the data, concatenate it to one long string, then write it to a textfile. So I am experimenting with the StringBuilder object. I append the...
5
by: nimdez | last post by:
Hi, I am working on an existing code base in which a lot of data displayed to the user is formatted in tables. Most tables are printed row-by-row using printf() with "%s" print conversion...
3
by: Daniel M. | last post by:
I have a query that gets a string column containing a date, ex. 20040825. If I use the property builder to format the string to 08/25/2004 it does not work because it only accepts datetime columns....
1
by: J.B | last post by:
I have a datagrid that will display different datasets, (it runs different sprocs based on a value in the querystring) but it will always return 6 columns. The 5th and 6th columns are always Date...
6
by: Hutty | last post by:
I've looked around and have yet to find anything that would answer my question regarding formating a column in a datagrid. My grid looks like this as far as data" AMHQCON|51300.01|-3147 The...
4
by: yer darn tootin | last post by:
Does anyone know the sort expression for a column that's data has been returned in the format, eg '07 Jul 05'?? The sort expression {..:"dd mmm yy"} doesn't work ( if the column was returned as...
9
by: seep | last post by:
hi i m finding following error on the code that i wants to use to get all record from table via store procedure with paging. the error is : Input string was not in a correct...
8
by: joemacbusiness | last post by:
Hi All, How do I format printed data in python? I could not find this in the Python Reference Manual: http://docs.python.org/ref/print.html Nor could I find it in Matloff's great tutorial:...
1
by: Jonathan Wood | last post by:
I have a GridView control that displays the data in a List<object; My GridView contains the following in its definition: <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
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,...
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...

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.