473,480 Members | 1,711 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Find html file in root folder using web control

Hi

I have a Windows WebControl on my form and I plan to burn the application to
a CD. The applcation has to navigate to a page that I am keeping in the
root of the CD. I have put the page I want to navigate to in the bin folder
along with the exe.

I then put the following line in the load of my application:
Me.webControl.Navigate(".\summarypage.html")

This doesn't work though, it just says it can't load the page (Action
Cancelled). However if I put the full address of the file then it loads
correctly.
Something like:
Me.webControl.Navigate("C:\Documents and
Settings\carlg\Desktop\PortHost\bin\summarypage.ht ml")

Does anyone know how I can navigate to a file in the same folder as the exe?

Note: The exe and the default page will be on the root of the CD.

Regards, Carl Gilbert
Nov 21 '05 #1
3 1573
> Does anyone know how I can navigate to a file in the same folder as
the exe?


You could try this:

\\\
Dim filename As String
filename = System.Windows.Forms.Application.StartupPath & _
"\summarypage.html"
Me.webControl.Navigate(filename)
///

--

(O)enone
Nov 21 '05 #2
If the exe and default page on the same folder, then just use this.
Me.webControl.Navigate("summ*arypage.html")

Nov 21 '05 #3
Oenone" <oe****@nowhere.com> wrote in message
news:uN**************@tk2msftngp13.phx.gbl...
Does anyone know how I can navigate to a file in the same folder as
the exe?


You could try this:

\\\
Dim filename As String
filename = System.Windows.Forms.Application.StartupPath & _
"\summarypage.html"
Me.webControl.Navigate(filename)
///

--

(O)enone

Application.StartupPath worked.

Cheers.
Nov 21 '05 #4

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

Similar topics

10
1812
by: Kenny Ashton | last post by:
Hi all Can anyone tell me the best way to set permissions to allow an ASP program to write new Html pages to my site's root folder, without chancing users also being able to write to the root....
9
10854
by: Ben Dewey | last post by:
Project: ---------------------------- I am creating a HTTPS File Transfer App using ASP.NET and C#. I am utilizing ActiveDirectory and windows security to manage the permissions. Why reinvent...
7
6570
by: Matthew Louden | last post by:
I created an ASP.NET web application. I added a TextBox and a RequiredFieldValidator control, and set the ControlToValidate property of RequiredFieldValidator control to be TextBox1. After I built...
4
1648
by: A Traveler | last post by:
Given i have some control which has an "ImageURL" property. If this property is set, then the HTML code for the web control looks something like: <mns:image id=MyImg runat=server...
1
6447
by: Joel Leong | last post by:
I wonder how I can refer or get my web app root directory without using code behind. Here is my scenario. I created the folders below --WebAppRoot ----common ----img (assume a file...
2
3840
by: Shimon Sim | last post by:
I have web project that includes few sits that must share some pictures. The project has following structure Root - just a folder with solution files - this is on IIS regular folder Site 1 - web...
1
1895
by: Arun | last post by:
I have a folder “Secured” under the root folder of the project In the project root web.config authentication is given as <authentication mode="Forms"> <forms loginUrl="Login.aspx" timeout="15"...
1
1291
by: Shimon Sim | last post by:
I have a master page that has a table. The table represents a banner. I need to change background images for the cells depending on the page theme. I set up css and defined styles with background...
5
4619
by: Eugene Anthony | last post by:
ds1.Tables.Rows.ItemArray.GetValue(0).ToString() contains the string path: images/5/Video1/qbert.flv if (File.Exists(ds1.Tables.Rows.ItemArray.GetValue(0).ToString())) { //code to execute } ...
0
7044
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
6908
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...
0
7045
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,...
1
6741
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
6944
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...
0
4483
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...
0
2995
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...
0
1300
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 ...
0
182
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...

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.