Include file in RadEditor
<!--#include file = ../Shared/gridHeaderTemplates_Layout.htm-->
Thanks Advance,
Mohamed.
5 Answers, 1 is accepted
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:
Child Page
ASPX:
CSS:
Hope this helps.
Thanks,
Princy.
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
Except
See the attachment ,
Thanks Advance,
Mohamed.
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
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
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
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
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
Thanks Advance,
Mohamed.
UserControl viewControl = (UserControl)pageHolder.LoadControl("~/Kbase/KbaseMail.ascx");
Thanks Advance,
Mohamed.