Using LinkLabel to open a linked project html file

J

Jacore

To all,

Thanks for the help in advance, to what is likely an utterly foolish
question.

I have a form with a linklabel control, that I want to open a web
browser and load a single html page when selected.

The html page I've loaded into the project, set BuildAction=Content,
and CopyToOutputDirectory=Always
I can see that on build it's being copied into the output directory.

What I can't seem to find for the life of me is the syntax to open the
file relative to the output directory.

private void linkA_LinkClicked(object sender,
LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start(_____"ExpectedExcelFormats.htm");
}

Can someone help me fill in the _____ for this?

Thanks again,

Greg
 
H

Hakan Fatih YILDIRIM

Hi Jacore,

you can use iexplore.exe.
System.Diagnostics.Process.Start( iexplore.exe
ExpectedExcelFormats.htm);



}



Best regards,
Hakan Fatih YILDIRIM
MCP
 
J

Jacore

Hi Jacore,

you can use iexplore.exe.
System.Diagnostics.Process.Start( iexplore.exe
ExpectedExcelFormats.htm);

}

Best regards,
Hakan Fatih YILDIRIM
MCP

Hakan, thanks for the reply, but when I run it, I get an error that i
can't find the file. I can't seem to get the directory path correct
for it. What am i missing?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top