Silverlight中的回发

编程入门 行业动态 更新时间:2024-10-27 17:11:25
本文介绍了Silverlight中的回发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

嗨 我正在开发Silverlight 3集成网站.我有一个问题,如下所述. 1.在我的ASP主页上,我有一个标头,它在标签中显示日期.标头在表格中格式化. 2.表由表组成,该表包含作为< object>传递的"Silverlight UserControl".在另一个表中,有一个contentplaceholder1,其中需要显示所有.aspx页.所有这些表都在UpdatePanel中. 上面的表本身在UpdatePanel中. 现在的问题是,表2中的Silverlight控件具有一个超链接,该超链接会敲击后面的代码以执行其绑定的click事件,该事件在中导航.aspx页 contentplaceholder1.就像

Hi I''m developing a silverlight 3 Integrated Website. I have a issue herewith as explained below. 1. In my ASP masterpage, I have a header which shows date in a label. The header is formatted in a table. 2. Beneath that a table consists of a table which contains a "Silverlight UserControl" passed as <object> and in another table there is a contentplaceholder1 where all the .aspx pages need to be shown. All these tables are in a UpdatePanel. And the tables above are in a UpdatePanel themselves. Now the issue is, the Silverlight control in Table 2 has a hyperlink which hits the code behind to execute its bound click event which navigates a .aspx page in contentplaceholder1. like

System.Windows.Browser.HtmlPage.Window.Navigate(new Uri(toNavigate, riKind.Relative));

发生这种情况时,总是会执行mainpage.xaml的"public MainPage()". 如何避免这种重新加载. 请帮助我.

When this occurs, the mainpage.xaml''s "public MainPage()" is always getting executed. How to avoid this reloading. Please help me.

推荐答案

我会向toNavigate添加一个查询字符串元素,页面可能会说嘿,这是来自silverlight模块,所以我需要做些不同的事情." I would add a query string element to toNavigate that the page could use to say "hey, this is coming from the silverlight module, so I need to do something a little differently".

更多推荐

Silverlight中的回发

本文发布于:2023-11-25 01:11:07,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1627704.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Silverlight

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!