Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Abdullah Anwar 36 posts 56 karma points
    Jun 02, 2015 @ 10:01
    Abdullah Anwar
    0

    Call Webservice On Form Submit

    Hi

    Could you please guide me to call wb service on form submit.

    I have to post data to external database so i am using web service.

  • Alex Skrypnyk 6182 posts 24283 karma points MVP 8x admin c-trib
    Jun 02, 2015 @ 11:40
    Alex Skrypnyk
    0

    Hi Abdullah,

    Did you try to use action attribute of form tag ?

    Thanks

  • Abdullah Anwar 36 posts 56 karma points
    Jun 02, 2015 @ 11:45
    Abdullah Anwar
    0

    Hi Alex,

     

    I do not want to change the existing functionality since data is being store on form submit,apart from this i want same data should send to web service so that my client can see the data in their database as well.

  • Alex Skrypnyk 6182 posts 24283 karma points MVP 8x admin c-trib
    Jun 02, 2015 @ 11:47
    Alex Skrypnyk
    0

    You have only one way - just make 2 requests.

  • Abdullah Anwar 36 posts 56 karma points
    Jun 02, 2015 @ 11:50
    Abdullah Anwar
    0

    can you please elaborate how can i post form data to asmx web service url.

  • Alex Skrypnyk 6182 posts 24283 karma points MVP 8x admin c-trib
    Jun 02, 2015 @ 11:58
    Alex Skrypnyk
    0

    You can make it from the server, when you accept your request from the web page, in the controller you can make request to the .asmx server with c# methods -

    http://stackoverflow.com/questions/4015324/http-request-with-post

  • Abdullah Anwar 36 posts 56 karma points
    Jun 02, 2015 @ 12:01
    Abdullah Anwar
    0

    Thanks for your revert.

    I know how to call web service and how to make web request , i just want to know how can i attach controller to the umbraco form so that i can do all the code there.

    I am beginner in umbraco but have good knowledge of .Net.

  • Alex Skrypnyk 6182 posts 24283 karma points MVP 8x admin c-trib
    Jun 02, 2015 @ 12:09
    Alex Skrypnyk
    0

    Abdullah, look at example of creating login form :

    http://24days.in/umbraco/2012/creating-a-login-form-with-umbraco-mvc-surfacecontroller/

    Form attached to Umbraco controller by URL.

    Thanks

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Jun 03, 2015 @ 16:24
    Tim
    1

    You could use a PreValue source? You can set that to the web service and it will build the form for you and wire it into the web service.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies