开发者

Windows phone WebBrowser.Navigating event form data

I have added a handler to WebBrowser.Navigating event and noticed it's being fired also for POST requests. In this case e.Uri is equal to the current Url of the page but there 开发者_如何学Pythondoesn't seem to be any way to get POST request form data.

    void browser_Navigating(object sender, NavigatingEventArgs e)
    {
        var url = e.Uri;
        // there is not something e.Form available here...
    }

Do you guys have any idea how is this possible?


Based on what I've read recently, access to the Request and Response objects is not possible with WP7 WebBrowser for the same reason as the full framework. Basically it was never implemented.

One technique that can theoretically be used to access the form data is the use of a local proxy to intercept requests. I believe this requires the use of a low level socket server on WP7. This is feasible however I'm not sure on whether it's possible to change the phone proxy address programmatically as I've ever attempted it.

Actually one more option. I just came across this, apparently you can use SaveToString to save the current document (on navigating). This would allow you to parse the form data just before the form is submitted.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜