Controller.PartialView() returns full page

Description

Hello,

i am trying to render a partial view returned by the controller called by jQuey $.ajax. I do get the partial view though, but a few lines below the retuned HTML also contains the full markup of the page where the MVC module resides. The AJAX-Reques-URL is generated by the following statement:

@(base.Url.Action("[ControllerMethod]", "[ControllerName]"))

Calling this URL in a browser also displays the partial view plus the page itself below. I have tested my code in a standalone project so I am nearly sure it must be a bug of DNN.
If you need further informations, please let me know.

Greetings,
Tobias

QA Test Plan

None

Attachments

11

Activity

Show:

Ken GriersonFebruary 19, 2016 at 7:24 PM

Verified fixed in Index.chtsml file in DesktopModules\MVC\Dnn\ContactList\Views\Contact\
using the MVC Sample module from https://github.com/dnnsoftware/Dnn.Platform.Samples.Mvc

amarjit dhunnaFebruary 18, 2016 at 12:08 AM

I have added small demo of returning PartialView and Json in the sample modules.
Please download and install modules from https://github.com/dnnsoftware/Dnn.Platform.Samples.Mvc

Bing WuFebruary 9, 2016 at 9:18 PM

Need to wait for Amarjit back to us, put this back to review for now.

Ash PrasadFebruary 3, 2016 at 11:46 PM

PR processed. is making changes to the sample MVC module to test this. Please speak with him prior to QA.

amarjit dhunnaFebruary 3, 2016 at 1:57 AM

, We have implemented the partial view return support in MVC. It will support the other types also. We are leaving the PR open for today for any comments/feedback from community. We will merge it tomorrow if no changes are required.
Usage Note: All from the controller side works as earlier but in order to return to partial view, you will need to add route mapper (implement IMvcRouteMapper). I have attached sample file here.
Also attached sample cshtml file showing sample call for partial update.

Complete

Details

Assignee

Reporter

Story Size

XL

Documentation Required

No

QA Owner

Dev Owner

Story Points

Original estimate

Time tracking

No time logged

Components

Sprint

Fix versions

Priority

Created July 27, 2015 at 8:05 AM
Updated March 2, 2016 at 10:12 PM
Resolved February 3, 2016 at 11:46 PM