473,395 Members | 1,608 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.

Redirect hyperlink column

jib
How do I redirect a hyperlink column's URL when the URL doesn't exist? Is
it possible to set a default URL for the Hyperlink button?

Thanks,

Jib
Nov 18 '05 #1
5 2190
Hyperlink has a property called NavigateURL... assign the URL you need to go
to there.....
you also have a target property where you can set the target on a particular
frame or a new window etc...

hth

--
Regards,

HD

"jib" <ji***@hotmail.com> wrote in message
news:eN**************@TK2MSFTNGP10.phx.gbl...
How do I redirect a hyperlink column's URL when the URL doesn't exist? Is
it possible to set a default URL for the Hyperlink button?

Thanks,

Jib

Nov 18 '05 #2
jib
"Hermit Dave" <he************@CAPS.AND.DOTS.hotmail.com> wrote in message
news:u1**************@TK2MSFTNGP09.phx.gbl...
Hyperlink has a property called NavigateURL... assign the URL you need to go to there.....
you also have a target property where you can set the target on a particular frame or a new window etc...

hth


Hi Dave,

The object I referred to is not a 'Hyperlink' but a 'Hyperlink column' (as
part of a DataGrid). Assigning the URL, URL field, and URL format string is
quite simple - no problem there. However, what I haven't figured out is how
I customize the response in case the URL points to a non-existent page.

For example, I have a DataGrid that holds information on a large series of
documents. The first column is a hyperlink column that points to the actual
document. The URL is set by the DataGrid automatically based on the URL
field and URL format string. Works perfectly. However, in some cases the
document does not exist and clicking on the hyperlink column button is
followed by a "Page Cannot be Displayed" response. I want to be able to
customize _that_ response page so I can supply a more intelligent error
message.

I guess my original question was somewhat short ... :-)

Jib
Nov 18 '05 #3
Sounds like a custom 404 page is what you are looking for. When a page
is not found, HTTP reports error 404 (page not found - go figure). You
can customize that response page any way you want. It's not any part
of ASP.NET, of course though.

On Sun, 11 Jan 2004 16:20:42 -0800, "jib" <ji***@hotmail.com> wrote:
"Hermit Dave" <he************@CAPS.AND.DOTS.hotmail.com> wrote in message
news:u1**************@TK2MSFTNGP09.phx.gbl...
Hyperlink has a property called NavigateURL... assign the URL you need to

go
to there.....
you also have a target property where you can set the target on a

particular
frame or a new window etc...

hth


Hi Dave,

The object I referred to is not a 'Hyperlink' but a 'Hyperlink column' (as
part of a DataGrid). Assigning the URL, URL field, and URL format string is
quite simple - no problem there. However, what I haven't figured out is how
I customize the response in case the URL points to a non-existent page.

For example, I have a DataGrid that holds information on a large series of
documents. The first column is a hyperlink column that points to the actual
document. The URL is set by the DataGrid automatically based on the URL
field and URL format string. Works perfectly. However, in some cases the
document does not exist and clicking on the hyperlink column button is
followed by a "Page Cannot be Displayed" response. I want to be able to
customize _that_ response page so I can supply a more intelligent error
message.

I guess my original question was somewhat short ... :-)

Jib


Nov 18 '05 #4
if you have the access to the physical files that the formed URL point to
then i would say that do a check on whether they exist or not...
look into System.IO...

File.Exists(path) is your long lost mate...
--
Regards,

HD

"Dan Brussee" <db******@nc.rr.com> wrote in message
news:19********************************@4ax.com...
Sounds like a custom 404 page is what you are looking for. When a page
is not found, HTTP reports error 404 (page not found - go figure). You
can customize that response page any way you want. It's not any part
of ASP.NET, of course though.

On Sun, 11 Jan 2004 16:20:42 -0800, "jib" <ji***@hotmail.com> wrote:
"Hermit Dave" <he************@CAPS.AND.DOTS.hotmail.com> wrote in message
news:u1**************@TK2MSFTNGP09.phx.gbl...
Hyperlink has a property called NavigateURL... assign the URL you need
togo
to there.....
you also have a target property where you can set the target on a

particular
frame or a new window etc...

hth


Hi Dave,

The object I referred to is not a 'Hyperlink' but a 'Hyperlink column' (aspart of a DataGrid). Assigning the URL, URL field, and URL format string isquite simple - no problem there. However, what I haven't figured out is howI customize the response in case the URL points to a non-existent page.

For example, I have a DataGrid that holds information on a large series ofdocuments. The first column is a hyperlink column that points to the actualdocument. The URL is set by the DataGrid automatically based on the URL
field and URL format string. Works perfectly. However, in some cases the
document does not exist and clicking on the hyperlink column button is
followed by a "Page Cannot be Displayed" response. I want to be able to
customize _that_ response page so I can supply a more intelligent error
message.

I guess my original question was somewhat short ... :-)

Jib

Nov 18 '05 #5
jib

"Hermit Dave" <he************@CAPS.AND.DOTS.hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
if you have the access to the physical files that the formed URL point to
then i would say that do a check on whether they exist or not...
look into System.IO...

File.Exists(path) is your long lost mate...
--
Regards,

HD

Hmm, I was afraid that would be the answer. I'll give it a shot - thanks for
helping me think.

Jib
Nov 18 '05 #6

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

Similar topics

2
by: Ravikanth[MVP] | last post by:
Hi asp:DataGrid id="YourID" runat="server" AutoGenerateColumns="False"> <Columns> <asp:TemplateColumn HeaderText="Sample Column"> <ItemTemplate> <asp:Hyperlink runat="server" Text='<%...
2
by: damonf | last post by:
I'm currently trying to add an ASP hyperlink to a template column in a datagrid. The normal hyperlink column doesn't give me the ability to add attributes to the item. In my grid there are four...
8
by: msnews.microsoft.com | last post by:
I want to redirect the user to a url outside of our website but I want it to preserve our application's window by opening a new window. We have a datagrid that has five hyperlink columns containing...
2
by: Alex | last post by:
I would like to have one column in my DataGrid that content acts as a hyperlink. In addition to that I would like that the content is databound to a DataSet source. If I create a hyperlink...
2
by: SStory | last post by:
Is it possible to response.redirect to a new browser window... i.e specifiy a blank target? If not, then when using the data and a hyperlink column, can I use more than one URL field? thanks,...
9
by: Paul | last post by:
Hi I have a data grid with a hyperlink column. the colum has numbers like 00001,000002, ect. Just wondering how to get the text value of the cell as tempstring =...
2
by: Jason | last post by:
I have a data grid with a hyperlink column. The hyperlink is created by a class that extracts the link from an XML Document. How can I populate the hyperlink column in the data grid with the...
10
by: david | last post by:
Hi, all: I need a help from you about DataGrid control. I created a DataGrid, dg, in design view of .NET visual Stadio and use the builder to add a Hyperlink column to dg. I want to try to assign...
3
by: TPhelps | last post by:
I have a sample of an unbound (autogeneratecolumns is true) sortable/pagable datagrid that works. I want to change one of the columns to a hyperlink. The examples I find use a bound column. I...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
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.