Microsoft
Software
Hardware
Network
Question : Create a hyperlink in a C# 2005 project to a html page contained in the project
Hi there
I've written a Window application in Visual C# 2005 which displays a form. This form contains a WebBrowser control. I have also in the solution a html page called HTMLPage3.htm
I'd like to fill the web browser with an image having a hyperlink to HTMLPage3.htm
How can I do that ?
The line below doesn't work.
Thanks in advance
Code Snippet:
1:
webBrowser1.DocumentText = "
";
Open in New Window
Select All
Answer : Create a hyperlink in a C# 2005 project to a html page contained in the project
>>I have also in the solution a html page called HTMLPage3.htm
Where is this file? you have to provide a full path to the file, if not, the browser will not know where to locate the file. Since, once installed, the file will be located in different folders, you will have to provide the correct path, something like:
webBrowser1.DocumentText = string.Format("
age3.htm\"
>
http://.../image.gif
\
" />", theFolder);
where theFolder variable is some folder where the file is located once installed, it can be obtained like:
string theFolder = Application.StartupPath;
Random Solutions
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI<wbr />_AS" and "Latin1_General_CI_AS" in the equal to operation
The SQL Server cannot obtain a LOCK resource at this time
Autodiscover
Vista file sharing across an Access Point / Network merging, etc.
vfp 9.0 line spacing
Timers in CWinthread derived classes
DHCP Server Service won't start
Finding Duplicate rows in a datatable to mark as duplicate and have to append the duplicate row in new datatable
SQL Query
Tools to replicate from SQL server 2000 to SQL server 2008