Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Loading a HTML Page
5 replies. Latest Post by Leonid Andruhin on May 13, 2008.
(0)
Arun Sol...
Member
39 points
36 Posts
05-12-2008 10:28 AM |
Hi,I'm working on SL2. How do i load/open a html page from SL, page needs to open in the same browser window. I want to write the action on a rectangle graphic, what are the options & what is the syntax to trigger this action.Any help is really appreciated.
sladapter
All-Star
17439 points
3,172 Posts
05-12-2008 11:35 AM |
1) you can use HyperlinkButton:
<HyperlinkButton Content="SomeText" NavigateUri="somepage.html"></HyperlinkButton>
<HyperlinkButton Content="SomeText" NavigateUri="somepage.html" TargetName="_blank"></HyperlinkButton> // will open in a new window or tab
2) In the code:
HtmlPage.Window.Navigate(new Uri(newpageurl));
HtmlPage.Window.Navigate(new Uri(newpageurl), "_blank"); // will open in a new window or tab
mchlsync
Star
14606 points
2,730 Posts
05-12-2008 11:51 AM |
Arun Solomon:I want to write the action on a rectangle graphic, what are the options & what is the syntax to trigger this action.
Yes. you can write HtmlPage.Navigate() in the MouseRightButtonDown or up event of Rectangle.
05-13-2008 2:46 AM |
Hi, Thanks for the help.The command is working for a web url, i want to call an html file in my project, i am not able to call/load a html file in my project.
Do have you know how to call/load an html file inside a project.
05-13-2008 3:03 AM |
You need to put HTML file in ASP.NET project.
Leonid A...
632 points
135 Posts
05-13-2008 10:07 AM |
May be something like this (e.Result is a text of your HtmlPage):
DS.Id =
DS.SetProperty(
{
sb.Append(
}