English 中文(简体)
纽约总部 4 OOB 申请进入WebBrowser控制网页的超文本DOM
原标题:Silverlight 4 OOB application access HTML DOM of the page in WebBrowser control

是否有任何人知道是否有可能进入和操纵银星4号网络浏览器控制的html网页上的一个内容。

情况也是如此。 用户利用更高的信任发射银星号。 用户操纵应用中的某些数据,但必须将部分数据提交外部网站。 如果我在网上浏览器控制下开放外部网站,我是否可以通过方案进入OM系统,在外部网站网上填写一些信息,以此协助用户?

最佳回答

www.un.org/Depts/DGACM/index_spanish.htm 快速反应:第号

Long Answer: The original intent for the OOTB + WebBrowserControl was to help customers bake in both Rich Text Format displays (Email, RSS etc) and at the same time provide the ability for printing support for large documents to occur (reports etc).

同样的规则适用于与你一样的控制范围(就我所知,没有任何更改计划)。

你刚才提到的情况使我感到有些麻烦,因为我可以看到银光小组上的一些gu,引起围绕安全问题——这可以用来使监督事务司对网站等网站的攻击自动化,作为不预想的有效载荷(即使有高望的用户经常被篡改成像这种事情——其现实令人不安)。

- Scott Barnes / Former Silverlight Product Manager.

问题回答

您可在网上浏览器控制范围内使用Invoke式。 请注意,你可以发出交叉电话。

例:

www.un.org/Depts/DGACM/index_spanish.htm Html page

<html ><head>
    <script type="text/javascript">
        function SetValues(val) {
            document.getElementById("q").value = val;
        }
    </script>
</head><body>
<input type="text" id="q" />
</body></html>

<>Xaml

 <Grid x:Name="LayoutRoot" Background="White">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="268*" />
            <ColumnDefinition Width="132*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="60" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <WebBrowser Name="webBrowser1" Grid.Row="1" Grid.ColumnSpan="2" />
        <Button Content="Search" Name="button1" Click="button1_Click" 
                Grid.Column="1" />
        <TextBox Name="textBox1" />
    </Grid>

<

public MainPage()
{
  InitializeComponent();
  webBrowser1.Navigate(new Uri("http://localhost:58976/HTMLPage1.htm"));        
}

private void button1_Click(object sender, RoutedEventArgs e)
{         
  webBrowser1.InvokeScript("SetValues",textBox1.Text);
}




相关问题
Silverlight Rich text box control

Our team decided that we need our own custom Rich text box control for Silverlight app we are developing. We looked at existing controls mentioned at A good rich text control for Silverlight but ...

Silverlight ImageBrush not rendering (with Bing Map Control)

I m trying to add an image to a Pushpin instance from the Silverlight Bing Map Control, but I can t seem to get it to render (the pushpin renders fine). This is probably a general WPF question rather ...

Silverlight OpenFileDialog DoEvents equivalent

I m processing large files after they are selected by the user. My code looks like the following: if (FileDialog.ShowDialog() == true) { // process really big file } This freezes up the UI so ...

list of controls with templates in silverlight

Does anyone know where to find a list of controls that you can set the template on in Silverlight? I ve wasted several hours now trying to create control templates only to find that the control doesn ...

Silverlight, Updating the UI during processing

I have a simple silverlight multifile upload application, and i want to provide the user with some feedback, right now its only in a test phase and i dont have the webservice. Somehow i cant get the ...

Silverlight 3 - FindName returns null

This looks a bug to me.. Using Silverlight 3 and i have a user control defined in XAML and trying to access the object during runtime returns a null. <Grid> <common:CommonGridEditPanel x:...

silverlight 3 collection binding

Someone please help me understand why this binding does not work... I have a class called SelectionManager with a property called dates which is populated by a WCF service. The property is an ...

热门标签