473,326 Members | 2,114 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,326 software developers and data experts.

datagrid HyperLinkColumn base

I have a datagrid with a couple of columns. Right now, I'm setting assigning
the dataview to the datasource. For the HyperLinkColumn....
<asp:HyperLinkColumn DataNavigateUrlField="ATTACHMENTDOWNLOADURL"
Text="Download" HeaderText="Quick Links" SortExpression="FILEPATH"/>

The field in the dataview is something like: "/mypath/tomyfile/hello.txt"
the link gets set to http://localhost/mypath/tomyfile/hello.txt"

I want the base of the url to be something other than "http://localhost", is
there a way to set this to something other than "http://localhost" ?

Nov 19 '05 #1
1 1453
I used the DataNavigateUrlFormatString field to solve this....

<asp:HyperLinkColumn HeaderText="ID" DataNavigateUrlField="ID"
DataNavigateUrlFormatString="link.aspx?id={0}"
DataTextField="ID"></asp:HyperLinkColumn>
thanks to...
http://www.c-sharpcorner.com/Code/20...LinkColumn.asp
"Craig" wrote:
I have a datagrid with a couple of columns. Right now, I'm setting assigning
the dataview to the datasource. For the HyperLinkColumn....
<asp:HyperLinkColumn DataNavigateUrlField="ATTACHMENTDOWNLOADURL"
Text="Download" HeaderText="Quick Links" SortExpression="FILEPATH"/>

The field in the dataview is something like: "/mypath/tomyfile/hello.txt"
the link gets set to http://localhost/mypath/tomyfile/hello.txt"

I want the base of the url to be something other than "http://localhost", is
there a way to set this to something other than "http://localhost" ?

Nov 19 '05 #2

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

Similar topics

0
by: Jongmin | last post by:
Hi! I am making HyperLinkColumn in datagrid. It is simple to make the hyerlinkcolumn with one datafield. <asp:HyperLinkColumn Text="NAME" DataNavigateUrlField="NAME"...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
4
by: cooltech77 | last post by:
hi all, I am a newbie and i need some help.I have datagrid on my asp.net page which has hyperlink columns. the datagrid configuration in the aspx page is as follows <asp:DataGrid...
2
by: ltt19 | last post by:
Hi. I have a DataGrid control that has one HyperLinkColumn, and this page has a "default.css" loaded, so, the link Style of the DataGrid is the same of the css document... but I want to change it,...
2
by: Tim::.. | last post by:
Hi Can someone please tell me why my datagrid doesn't populate with data properly... For some reason the DataNavigateUrlFormatString populates ok but Text doesn't??? E.G:...
1
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...
4
by: sakieboy | last post by:
I currently have a datagrid with several columns. The first column in the DataGrid is a HyperLinkColumn. When I select a row, I would like for this HyperlinkColumn to fire. I have the mouseover...
0
by: virendra.chandra | last post by:
in datagrid cellpadding is not working. can u suggest what could be the possible error. this is my code <asp:datagrid id="test1" Runat="server" Width="700" Enabled="True"...
2
by: tshad | last post by:
I am having a problem with my Datagrid that displays my Files via GetFiles() If I use a HyperLinkColumn - I can use the column name "Name" which is what the result from GetFiles(). ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.