This is a migrated thread and some comments may be shown as answers.

PartialView being rendered as text?

1 Answer 60 Views
Window
This is a migrated thread and some comments may be shown as answers.
Software
Top achievements
Rank 1
Software asked on 28 Aug 2019, 01:17 AM

I have a partial view that contains a TabStrip and each that contains a grid. The view works, it's currently in a different page and I'd like to move it to a kendo window.

I've moved it to a kendo window and the window displays great.

Here's the code that generates my window (please note the variable names have been changed for this).

var window = $("#window").kendoWindow({
                content: {
                    url: "/Case/CaseDetail",
                    data: {
                        Daid: Daid,
                        CaseID: CaseID,
                        RecordID: RecordID,
                        CanUserView: cuv,
                        OffenseCount: OffenseCount,
                        CoDefendantCount: CoDefendantCount,
                        VWCount: VWCount,
                        InternalProcessCount: InternalProcessCount,
                        ChargeDispositionCount: ChargeDispositionCount,
                        SentenceCount: SentenceCount,
                        OtherCaseCount: OtherCaseCount
                    }
                },
                actions: [
                    "Pin",
                    "Minimize",
                    "Maximize",
                    "Close"
                ],
//                close: onClose
            });
 
            window.kendoWindow().data("kendoWindow").center().open()

 

The window appears and the tabs are visible, the content of the 1st tab is loaded via an AJAX call that is never executed (so no content) and none of the tabs are functional when I click on it.

When I look at the page source I can see that the window was rendered as text and all associated javascript is actual text and not, all the scripts related seem to be escaped, here's an example of some rendered content:

<script type="text/javascript">
    function ProcessErrorO(args) {
        ProcessError(args, 'O_grid_' + '#= RecordID #');
    }
<\/script>

 

Any help would be appreciated.

Thanks

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 29 Aug 2019, 01:37 PM
Hello Craig,

Thank you for the provided code snippet. Attached you will find a sample project which demonstrates a Window with TabStrip as PartialView. The tabs' content are loaded via AJAX call, as requested. Could you please modify the project to reproduce the issue you are experiencing and send it back to me? I will test it locally and provide you with the most appropriate solution.

I am afraid I did not understand the part about the page source rendered as text. Could you please provide some additional information what did you have in mind?

I am looking forward to your reply.

Regards,
Martin
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Window
Asked by
Software
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or