locked
Launching Deep links from a web view control

    Question

  • Hi,

    I have a html text that is being bounded in the web view control. It contains some hyper links, of which there would be some hyperlinks that I want to open in my app. For example consider text below

    <a title="test" href="http://www.msdn.com" target="_blank">test</a>&nbsp;<a title="same window" href="http://www.microsoft.com" target="" on>same</a>

    and I want to open the first link with in my app and hence, I replaced href=http://www.microsoft.com  with href="testapp:navigate?url=http://www.microsoft.com.  When I click on the url in the web browser control , I see a pop-up appearing and indicating switching of apps like below

    This could be well accepted, when the target app and source app are different. But here it is of the same app.

    Could there be a way to over come this and achieve the functionality required.


    Thanks & Regards Tejaswi Chandrapatla


    • Edited by Teja510 Thursday, August 28, 2014 10:59 AM spell mistake
    Thursday, August 28, 2014 10:58 AM

Answers

  • I think you'll be better off removing the "_blank" attribute and opening it directly in the webview.
    This behavior is expected.


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, September 4, 2014 5:14 PM
    Moderator

All replies

  • I don't understand why you would use the protocol when the page is already hosted inside the app.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, August 28, 2014 7:30 PM
    Moderator
  • The content I render in webview is of HTML content, and could have some thing indicating like want to know more, click here, where here could represent one more item in my app, which I need to navigate to.

    Thanks & Regards Tejaswi Chandrapatla

    Monday, September 1, 2014 2:15 PM
  • I think you'll be better off removing the "_blank" attribute and opening it directly in the webview.
    This behavior is expected.


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, September 4, 2014 5:14 PM
    Moderator