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

Test Link Page Exists?


I have a NavigateUrl property on a page that is this:

MyLink.NavigateUrl = "~/testpage.aspx";

I want to programmatically load testpage.aspx so I can tell if it is
really there. This will be a test I run from one page on the web site
for another page. It's not called all the time, just as a debug test.
WebClient namespace?

ASP.NET 2.0.

Thanks.
Feb 14 '06 #1
1 1076
I would use this:
Dim web As New System.Net.WebClient
Dim download As Byte()
Dim ASCII As New System.Text.ASCIIEncoding
download = web.DownloadData("http://url.com")
Dim page as String = ASCII.GetString(download)

Then you have the page stored to test whatever you want.

"xenophon" <xe******@online.nospam> wrote in message
news:10********************************@4ax.com...

I have a NavigateUrl property on a page that is this:

MyLink.NavigateUrl = "~/testpage.aspx";

I want to programmatically load testpage.aspx so I can tell if it is
really there. This will be a test I run from one page on the web site
for another page. It's not called all the time, just as a debug test.
WebClient namespace?

ASP.NET 2.0.

Thanks.

Feb 14 '06 #2

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

Similar topics

2
by: Dirk McCormick | last post by:
I need to transform something that looks like this <!-- %%%%%%%%%%%%%%%%%%%%%%% --> <MyStructure> <Packages> <Package> <PkgBenefitCode>1</PkgBenefitCode> <PkgBenefitCode>2</PkgBenefitCode>...
0
by: bjam | last post by:
Hi, basically I am trying to create the following logic in an xsl style sheet, which is: if a similar node with the same key name exists in the another section of the file, I will use that data...
36
by: randau | last post by:
I would like to use the Link Target attribute, but am inhibited by the likelihood of a newly opened browser window completely hiding the Parent browser window. Thus offering the illusion that...
2
by: Colleyville Alan | last post by:
I could not find this in the help file, so here goes... I have some code that opens a word doc which is then set to a variable called Target. Then a FollowHyperlink opens another word doc that...
13
by: DC Gringo | last post by:
How do I test for existence of a file in the file system: If FileExists(myVariable & ".pdf") = True pnlMyPanel.Visible = True End If -- _____ DC G
7
by: joey.powell | last post by:
I have a home page with username and password textboxes and a login button for purposes of users being able to log in (forms authentication) directly on the site home page. I also have a dedicated...
15
by: ezmiller | last post by:
Does anybody know how to use javascript to test whether or not an internet connection exists? Is this possible even?
2
by: Giles | last post by:
I have a left menu that is accessed and displayed via XMLHTTP (it resides on the same server). Some sections of the web site don't have a "menu.asp", so a "Page Not Found" page is returned, which...
2
by: tshad | last post by:
I have an object that may or may not exist on a page. Therefore, I test for it. But it doesn't seem to work if I do the following: if not HomeLink is nothing then...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...

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.