asp.net mvc 3 - MVC 3 Ajax returning partial view of area -


I am trying to return a partial view through Ajax. My code likes below and it works fine when partial visualization is not in one area

  [http post] Public Action Search Search peopleAgex (String Search Paraj) {// Some Return Returns Partualview ("logproofs", search results); }   

Partial view is provided when I open the page for the first time. The problem occurs when I press the Search button which makes an AJAX call in the action meth. If this administration is in the area then I get a classic view not found error.

  Partial view 'logarusselt' was not found or no visual engine supported places searched. Searched at the following places: ~ / views / logs / logartsult.aspx ~ / views / logs / logscult.xx ~ / views / shared / logartsalt.aspx / view / share / logaransult Cassax / /view / log / cshtml ~ / views / log / logResults.vbhtml ~ / views / shared / logResults.cshtml ~ / views / shared / logResults.vbhtml   

Why is not the current area visible? Do I have a way to specify the name of a region, such as new {area = "admin"}

On the other side when I see the name in partial code, the reciever Shows me the scene that I expect.

Enter image details here

< Div class = "post-text" itemprop = "text">

You can specify the name of the suggested area, by using the RouteValuesDictionary parameter and syntax,

  new {area = "Admin"}   

But the intriguing part for me get the proper method signature (meaning my intention is to use the signature) because there are some options and Get wrong signature It is easy to do and still the syntax is correct.

In this case, I think you want a signature: Public Static MvcHtmlString ActionLink (This Ajax Helper Ajax Helper, String Link Text, String Action Name, Root Value Dictory Route value, ajax option, ajaxOptions)

Ajax Modify the ActionLink which you currently have (which you have not posted) Something like this:

  @Ajax External Link ("Link Text", "Your Action", "Your Controller" ", New {region =" you have "}, new ajaxoption () {* AXXPoption *} being used by you)   

Hope that helps.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -