473,770 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
+ 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.N avigate(".\summ arypage.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.N avigate("C:\Doc uments and
Settings\carlg\ Desktop\PortHos t\bin\summarypa ge.html")

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 1596
> 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.Applicati on.StartupPath & _
"\summarypage.h tml"
Me.webControl.N avigate(filenam e)
///

--

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

Nov 21 '05 #3
Oenone" <oe****@nowhere .com> wrote in message
news:uN******** ******@tk2msftn gp13.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.Applicati on.StartupPath & _
"\summarypage.h tml"
Me.webControl.N avigate(filenam e)
///

--

(O)enone

Application.Sta rtupPath worked.

Cheers.
Nov 21 '05 #4

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

Similar topics

10
1846
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. One ISP told me this couldn't be done - is IIS really that limited? I want to be able to suggest to my ISP (based on any advice you can give) how they should set the permissions to allow a sensible folder structure -
9
10904
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 the wheel, right? Everything so far is working well with the Active Directory. The problem I am having is with adding File Permissions to a directory. I am currently using some code courtesy of "Willy Denoyette "
7
6588
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 and run the application, it pops up an error dialog as follows: unable to find script library '/aspnet_client/system_web/1_1_4322/WebUIValidation.js'. Try placing this file manually, or reinstall by running 'aspnet_regiis -c' any ideas??...
4
1664
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 ImageURL="images/somepath.jpg"></mns:image> Given i have some server variable Session("AppRoot") which declares the full path to the root of the application, for example Session("AppRoot") = "http://www.someserver.com/myapp/" Now is there any way i can put...
1
6474
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 called myimage.jpg is inside)
2
3855
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 application 1 (has asp.net project here) - site saves and views the pictures Site 2 - web application 2 (has asp.net project here) - just views the pictures SharedPicture - folder with shared pictures
1
1926
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" /> </authentication> In the “Secured” folder web.config is coded as <?xml version="1.0" encoding="utf-8"?> <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
1
1304
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 -image: url(...). I set up images in theme folder and it didn't work. Then I decided to move images to root and it didn't work either (the page in not in root. May be for root pages it would help but I can't put all pages in root anyway). Is...
5
4634
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 } Despite the path exist along with the file name, the code never gets executed.
0
9454
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
10257
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
10099
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
9904
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
8931
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6710
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
5354
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...
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2849
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.