Copied to clipboard

Flag this post as spam?

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


  • Jipson Thomas 8 posts 88 karma points
    Nov 11, 2019 @ 15:36
    Jipson Thomas
    0

    How to get querystring values into surface controller action method

    Dear friends, I am in development of my first umbraco project. My payment gateway returns a url to my umbraco page with query string values. In this page I have a surface controller action to process the order based on payment response, but I dont know, how can I get the query string parameters in my surface controller action. My URL and action methods are as following. http://localhost:56147/my-shopping-cart/checkout-here/paymentprocess?dts_reference=4600204532338837&pm=1

    Paymentprocess.cshtml is following

    @inherits Umbraco.Web.Mvc.UmbracoViewPage @{ Layout = "master.cshtml"; }

    @* the fun starts here *@

    @{ Html.RenderAction("Process", "PaymentSurface");}

    Surface controller action method is:

    public ActionResult Process(int dtsReference,int pm) { var test = dtsReference; return PartialView(PartialViewFolder + "process.cshtml"); }

    Thanks in advance for your helps. Regards, Jipson

  • Jipson Thomas 8 posts 88 karma points
    Nov 27, 2019 @ 13:08
    Jipson Thomas
    0

    Hi, I got a fix for this as to accept strings in my controller action method. eg: public ActionResult Process(string reference,string name) {}

Please Sign in or register to post replies

Write your reply to:

Draft