locked
How to launch URI that use post method to the default browser in c#?

    Question

  • Hello,

    I'm writing a Windows  store application and I need to open the system's default browser and post data to Web, how can I do it?

    Thanks in advance.

    Thursday, May 29, 2014 12:05 PM

Answers

  • Why do you want to do this with the browser?

    You cannot automate the browser. You can only launch a URI into it.

    If you want to post data then use the HttpClient class to talk directly to the service.

    --Rob

    Friday, May 30, 2014 5:53 AM
    Owner
  • If you want to display the page within your app then use a WebView control. You should be able to write HTML to inject your post.

    --Rob

    Monday, June 02, 2014 7:54 PM
    Owner

All replies

  • Hi Tanvi,

    You can refer the following link for your requirement,

    http://msdn.microsoft.com/en-us/library/windows/apps/windows.system.launcher.launchuriasync

    Regards,

    Riyaj Ahamed I

    Thursday, May 29, 2014 3:04 PM
  • Hello,

    Thanks for reply  but i want to post some data on uri how to do that?

    Friday, May 30, 2014 5:02 AM
  • Why do you want to do this with the browser?

    You cannot automate the browser. You can only launch a URI into it.

    If you want to post data then use the HttpClient class to talk directly to the service.

    --Rob

    Friday, May 30, 2014 5:53 AM
    Owner
  • Hi Rob Caplan,

    Thanks for your reply.

    I am not doing this to commuinicate with any service (so cant use HttpClient class).

    What I want to do is to POST some data to a webpage (URI) and that webpage will use this POSTed data to act accordingly and show me the UI based on those POSTed data.

    But I believe there is no way to do this and I need to use the GET method to do what I am looking for.

    Please let me know if there is any other way to do this.

    Thanks.
    Friday, May 30, 2014 6:54 AM
  • If you want to display the page within your app then use a WebView control. You should be able to write HTML to inject your post.

    --Rob

    Monday, June 02, 2014 7:54 PM
    Owner