Hi all, good day. I am wondering if its possible to create a radeditor in a class (not in a codebehind) and call the function that holds it in aspx. It will be helpful if I can cut my way through setting up all the editors in different pages when most of them have the same settings. I know I can use user control but I am trying to avoid creating multiple ascx files for different reasons. Consider the following code that works (Unfortunately, this is inside a codebehind not a class ):
how do i do this in a class then call it in ASPX say <%# Class1.createGenericEditor() %>
thanks in advance.
| namespace UserControlTest |
| { |
| public partial class _Default : System.Web.UI.Page |
| { |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| createGenericEditor(); |
| } |
| private void createGenericEditor() |
| { |
| RadEditor loadEditor = new RadEditor(); |
| loadEditor.ID = "RadEditor1"; |
| this.Controls.Add(loadEditor); |
| } |
| } |
| } |
how do i do this in a class then call it in ASPX say <%# Class1.createGenericEditor() %>
thanks in advance.
