Skip to main content
Home Forums Silverlight Programming Silverlight Controls and Silverlight Toolkit Where is anchor tag in silverlight 3
7 replies. Latest Post by Dhev on November 5, 2009.
(0)
Dhev
Member
12 points
38 Posts
10-31-2009 5:14 AM |
Hello Experts,
I'm new to silverlight and creating a website. I need to insert a external URL. In asp.net, I go with anchor tag and did my process. What will I in Silverlight?
Thanks in Advance
ken tucker
All-Star
16356 points
2,499 Posts
10-31-2009 5:21 AM |
http://msdn.microsoft.com/en-us/library/system.windows.controls.hyperlinkbutton(VS.95).aspx
10-31-2009 5:35 AM |
Thank You for your quick reply.
I don't want hyperlink button. It means , I clik and open a particular page.
I want to show current stock exchange position. Just like www.nseindia.com .
tanmoy.r
Contributor
3594 points
710 Posts
10-31-2009 5:56 AM |
Hi Dhev, Do you want something that looks like a hyperlink but function like a button? You still can use HyperlinkButton class and handle the logic in clicked event as you want. Silverlight does not support html elements directly so you can not use "a" tag directly.
10-31-2009 6:45 AM |
Thanks Tanmoy....
I couldn't do it. Can you send me any samples
Min-Hong...
3619 points
412 Posts
11-04-2009 4:10 AM |
Hi,
Em, based on my understanding, you are trying to get the hyperlink look and feel , but you do not want to navigate, is that right?
Then seems to me a hyperlinkbutton will do your trick.
xaml:
<HyperlinkButton Click="HyperlinkButton_Click" Content="www.microsoft.com"></HyperlinkButton>
CodeBehind:
private void HyperlinkButton_Click(object sender, RoutedEventArgs e) {
// do your staff
}
You just simply do not tell the button where to . It will not navigate or open a new page.
And for further informations you can check the link Ken provided you.
Best Regards
hsampat
8 points
4 Posts
11-04-2009 7:09 AM |
If you want to navigate to external URL, you can to do it as :
<HyperlinkButton Content="Silverlight Home Page" NavigateUri="http://www.silverlight.net" TargetName="_blank"/>
This will open external web page in a new blank window.
11-05-2009 1:53 AM |
Thanks for your contribution for my question.
I got an answer from http://www.divil.co.uk/silverlight/tools.aspx .
It helps me a lot
Thanks who are all posted for my question.