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

Include Html File in rad window

5 Answers 150 Views
Window
This is a migrated thread and some comments may be shown as answers.
mohamed
Top achievements
Rank 1
mohamed asked on 07 Sep 2012, 06:30 AM

Include file in RadEditor
<!--#include file = ../Shared/gridHeaderTemplates_Layout.htm-->

Thanks Advance,
Mohamed.

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 07 Sep 2012, 10:00 AM
Hi Mohamed,

I suppose you want to show a RadEditor inside a RadWindow which includes an html file. Here is the sample code that I tried.

Parent Page

ASPX:
<telerik:RadWindow ID="RadWindow1" runat="server" NavigateUrl="~/Editor.aspx" VisibleOnPageLoad="true">
</telerik:RadWindow>

Child Page 

ASPX:
<telerik:RadEditor ID="RadEditor1" runat="server" >
 <Content>
   <!--#include virtual="~/HTMLPage.htm" -->
 </Content>
</telerik:RadEditor>

CSS:
<style type="text/css">
 .reToolCell
 {
  display:none
 }
</style>

Hope this helps.

Thanks,
Princy.
0
mohamed
Top achievements
Rank 1
answered on 07 Sep 2012, 10:50 AM
Thanks for your reply Princy,
i click the email button open rad widow , after that i use as you told like that
i got the Error like the see the attachment image 2

<telerik:RadEditor ID="RadEditorDetails" runat="server">
<Content>
<!--#include virtual = ../Shared/Kbasebody.htm-->
</Content>
</telerik:RadEditor>
</td>

Except RadEditor it bind fine

See the attachment ,

Thanks Advance,
Mohamed.
0
Marin Bratanov
Telerik team
answered on 07 Sep 2012, 11:51 AM
Hi,

I have just answered your support thread on the matter and I am pasting here my reply for other that may be interested in it:

The general logic works fine with me, as you can see in the attached sample and video. The message you get is a server error that you have controls whose IDs are duplicate, which is most likely due to dynamic creation or having set the ClientIDMode to static for some user controls that you include numerous times. What I can advise is that you run your application in debug mode and see where exactly in your code the problem originates in order to resolve it.


Kind regards,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Marin Bratanov
Telerik team
answered on 07 Sep 2012, 01:43 PM
Hi,

After further discussion in the support ticket it turned out that the included HTML file had literal expressions inside which are
1) not supported in static content
2) not supported in the <Content> tag of the RadEditor, because it is not parsed either.

An option is to use a user control and load it dynamically in the code-behind and then to use the server Content property of the RadEditor.

For other people who may be interested in this I am attaching here a small example.


Regards,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
mohamed
Top achievements
Rank 1
answered on 08 Sep 2012, 05:44 AM
How to pass parameter in loadcontrol

UserControl viewControl = (UserControl)pageHolder.LoadControl("~/Kbase/KbaseMail.ascx");

Thanks Advance,
Mohamed.
Tags
Window
Asked by
mohamed
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
mohamed
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or