使用超链接导航到网页 [英] Navigate to a web page using a hyperlink

查看:74
本文介绍了使用超链接导航到网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我已使用此代码导航到网页:

Hi,

I''ve used this code to navigate to a webpage:

<hyperlinkbutton content="Bear" grid.row="2" height="48" horizontalalignment="Left" margin="25,27,0,0" name="hlinkBear" verticalalignment="Top" width="64" navigateuri="http://cespage.com/bear.wmv" />


但它不起作用.
然后我像这样使用WebBrowserTask:


but it''s not working.
Then I used WebBrowserTask like:

Uri url = new Uri("http://cespage.com/bear.wmv", UriKind.Absolute);
wbt.URL = url.ToString();
wbt.Show();


(wbt是WebBrowserTask)
但同样,它不适用于所有视频.
它播放一个而不播放另一个.

我也使用了mediaelement,但是这里也有同样的问题.它正在播放视频,而不是其他(都是.wmv).

如何通过超链接导航到网页.
如果该链接包含视频,则可以像在浏览器中一样直接在手机的媒体播放器上播放.

在此先感谢


(wbt is WebBrowserTask)
but again, it''s not working for all videos.
It plays one and not the other.

I''ve used mediaelement too, but here also same problem. It is playing a video and not the others (all are .wmv).

How can I navigate to a webpage through a hyperlink.
If that link contains a video, would it be played directly on phone''s media player, just like we do on our explorers.

Thanks in advance

推荐答案

对于初学者,您的navigationuri应该写为"http://www.",而不是"http://".否则,控制可能会出现问题.在大多数浏览器中,我们可以不用它而逃脱,因为如果缺少它,它们只是将其放在那里,但是通过代码的应用程序可能不会这样做.如果那没有帮助,我不确定您的代码是什么问题.
For starters, your navigateuri should be written as "http://www.", not "http://". Without that the control could potentially be problematic. We can get away without this in most browsers because they simply put it there if it is missing, but your app via code is likely not doing that. If that doesn''t help, I''m not sure what the problem with your code is.


这篇关于使用超链接导航到网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆