Search Results

Search found 2 results on 1 pages for 'daviedave'.

Page 1/1 | 1 

  • How do I post to a webservice and display the returned Response in MVC3 Razor Application?

    - by DavieDave
    I have need to call a webservice from an HTML helper extension I created (combinbation of Action and Image) and placed in the view as follows @Html.ActionImage("CallService", new { number = ViewBag.number, code = ViewBag.code, account = ViewBag.account, amount = ViewBag.amount }, "~/Content/sb_200x61.png", "Start the Process") I am making the action call and it calls the service and returns a string of the html response, but it doesn't look right. I am using the typical HttpWebRequest to do the POST Action in C# code. Here is the controller action code: public MvcHtmlString CallService(string number, string code, string account, decimal? amount) { string response = MyService.ServiceLayer.ClassName.callService(number, code, account, Convert.ToDecimal(amount); MvcHtmlString mstring = new MvcHtmlString(response); return mstring; } When it returns the string back it's looking like the all styling and js is removed. It that due to MvcHtmlString? Is there a better way to do this? Redirect somehow ?

    Read the article

  • MVC3 application I want javascript methods to fire on passed in route values

    - by DavieDave
    I have an MVC3 application in Visual Studio 2010. I have a view with several dropdowns that do javascript calls to populate dropdowns based on the selected value, some of which are disabled initially. That all works great with the initial state of nothing. If I however pass routevalues to the dropdowns from a redirect to this action, I do get the value set correctly but it's not enabled like it should be on the dropdown for example and when I post the form, the ones that are greyed out are not passed back on the form. How can I correct this?

    Read the article

1