0

.Net Framework v4.5 Ext.Net v2.2 I use UserControlLoader and works fine, but I need passing properties to my UserControl and then render it. my usercontrol markup

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EditPost.ascx.cs" Inherits="SepanoCMS.Views.EditPost" %>

<ext:Panel RTL="true" ID="pnlEditPost" ClientIDMode="Static" runat="server" Padding="5" Layout="FormLayout" AutoWidth="true"
AutoHeight="true" AnchorHorizontal="100%" Border="false">
<Items>
    <ext:TextField ID="txtTitle" ClientIDMode="Static" runat="server" AnchorHorizontal="100%" />
    <ext:HtmlEditor ID="HtmlEditor1" ClientIDMode="Static" runat="server" MinHeight="150" MaxHeight="600" AnchorHorizontal="100%" />
</Items>
</ext:Panel>

I want the value for filling txtTitle and HtmlEditor1 in Page_Load

1 Answers1

0

Create two public property using get set method in user control. pass the value in the property in page load of page where u added the control. then assign that value in control inuser control page load.

Raghubar
  • 2,768
  • 1
  • 21
  • 31