473,804 Members | 2,184 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2215
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******** ******@TK2MSFTN GP10.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******** ******@TK2MSFTN GP09.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******* *******@TK2MSFT NGP09.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(pat h) is your long lost mate...
--
Regards,

HD

"Dan Brussee" <db******@nc.rr .com> wrote in message
news:19******** *************** *********@4ax.c om...
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******* *******@TK2MSFT NGP09.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******** ********@TK2MSF TNGP10.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(pat h) 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
3154
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='<% #Container.DataItem("TextVal")%>' NavigateUrl='<% # "page.aspx?Param1=" & Server.UrlEncode
2
2632
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 columns. Three are databound to a dataset and one is a template column. I need to be able to access each item in the template column (getting access to the hyperlink) then adding an attribute to call some client side code. Does anyone know...
8
3863
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 links to external sites. The hyperlink columns have the target="_blank" attribute so they preserve the existing window. This works OK except that the NavigateURL's are quite long due to the size of the query string and this makes the page slow. ...
2
2670
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 column in VS.NET I loose the databinding feature for that column. If I choose a data bound column I don't get the hyperlink formatting and actions.
2
1678
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, Shane
9
15032
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 = datagrid.Items(rownumber).Cells.Item(column number).Text returns a blank string. It seems to work ok for the other columns that are just regular datagrid columns, not hyperlink types. Thanks. -- Paul G Software engineer.
2
2261
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 value (link) returned from my class method? I have to send the company ticker to the class in order to get the correct link. I tried embedding the method into the NavigateURL property of the data grid (i.e. NavigateUrl="GetCompanyLink(Ticker)")...
10
1947
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 a column of URLs to this hyperlink column in programming way (ie., dynamically assignment). However, I can not find a way to continue doing it. Do you have ideas about it? Thanks.
3
3552
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 can get this to work; however, the column header on the datagrid is not a link/sortable. What am I missing? Thanks in advance.
0
9594
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10595
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10343
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10089
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5530
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4308
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.