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

Add several arguments to DataNavigateUrlField / DataNavigateUrlFormatString

Hi!

I'm about to create a datagrid and columns at runtime. The problem I have is
to add additional arguments to the querystring.

The code:

Dim hc1 As New HyperLinkColumn
hc1.DataTextField = "sProduct_Name"

hc1.DataTextFormatString = "Show details for"

hc1.DataNavigateUrlField = "sProduct_ID"

hc1.DataNavigateUrlFormatString = "details.aspx?ID={0}"

hc1.HeaderText = "Show detail"

DataGrid1.Columns.Add(hc1)

This works just fine. BUT, I want to add another argument to the
querystring. The argument will be present in my datasource ( a dataview).

Any help appreciated.

/Fred
Nov 18 '05 #1
1 2352
Hi
alternatively this can be achieved by
<asp:templatecolumn><itemtemplate><a href='details.aspx?Id=<%
DataBinder.Eval(Container.DataItem, "Id")
&name=<% DataBinder.Eval(Container.DataItem, "Name")'>Show Detail</a></itemtemplate></asp:templatecolumn


hope this help
srini
Nov 18 '05 #2

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

Similar topics

5
by: Dave Opstad | last post by:
File this one under "enhancement request" I guess, but it would sure be nice. I wrote this line the other day, thinking it would just work: x = struct.pack(">HhhhhhhHHHL", i, *bounds, *b, *b,...
7
by: b83503104 | last post by:
Previously, when my constructor had no arguments, I used this to declare my objects: MyClass myObject; Now, my constructor has arguments (MyClass::MyClass(int someVariable)), how do I declare...
8
by: s99999999s2003 | last post by:
hi i have a dictionary defined as execfunc = { 'key1' : func1 } to call func1, i simply have to write execfunc . but if i have several arguments to func1 , like execfunc = { 'key1' :...
1
by: David Beers | last post by:
I thought I understood C well enough, but this one has really taken me by surprise. I call a function that has several arguments. The function definition happens to be in a different file...
1
by: Mike P | last post by:
Does anyone know if you can pass multiple column parameters in the DataNavigateUrlFormatString for grids? My current code is like this and works for a single parameter: <asp:HyperLinkColumn...
2
by: TJS | last post by:
how can I dynamically set the value of DataNavigateUrlFormatString in a hyperlink column I have the value to use, I need the correct syntax . "<%= %>" isn't working <asp:HyperLinkColumn...
0
by: RobT | last post by:
Hi, I've been using the DataGrid control in my ASP.NET web page. The page is used to search for records in the database. The control is bound to a DataSource and gets populated ok. I am also...
3
by: msuk | last post by:
All, I am using a datagrid on a 1.1 .aspx page that has a hyperlink column. I am using 'DataNavigateUrlFormatString' to set the URL to browse to once the user clicks on the link i.e. ...
5
by: Francois Grieu | last post by:
One of the C compiler that I use <OT>(Keil's CX51)</OTbarks at #define a(b) b int main(void){return a( #if 0 #endif 0);} More generally, this compiler seems confused by any preprocessing...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.