|
Rank: Member Groups: Member
Joined: 8/25/2009 Posts: 10
|
Hello,
I have added demo.ascx in my website. I dragged this into my design view page. I get following code: <%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %> ... <uc2:Demo ID="ProbPed" runat="server" />
Now I want to save the content in my server side event. I see the ID but the html property is not there.
If you can help me out, I will buy the suite. Kind regards, Bert
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, Do you mean you have an eo:Editor control inside your uc2:Demo user control and you want to be able to set/get the editor's Html property directly on uc2:Demo user control? If that's the case, the cleanest way is for you to expose a new property on your user control:
Code: C#
public class Demo: System.Web.UI.UserControl
{
//Define a new property "Whatever" on your Demo user control.
//As you can see, this property is merely a wrapper for Editor.Html
public string Whatever
{
get { return Editor1.Html; }
set { Editor1.Html = value; }
}
}
Once you have the new property on your UserControl, you can use it in your .aspx or code behind:
Code: HTML/ASPX
<uc2:Demo ID="ProbPed" runat="server" Whatever="Editor Content" />
Or:
Code: C#
ProbPed.Whatever = "Some html";
Hope this helps. Thanks
|
|
Rank: Member Groups: Member
Joined: 8/25/2009 Posts: 10
|
yes, this is it!
Is html the right property? I cannot find text-property? ...
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Great! So ready to buy the suite now? :)
Please feel free to let us know if you have any other questions.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 8/25/2009 Posts: 10
|
Almost ready for buying (just one more topic :) ) ! Great support!
Is html the right property? I cannot find text-property? ...
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
No problem. We are working on the other topic and we are waiting for more information from you.
Yes. Html is the right property. I don't think there is a Text property on the Editor.
|
|
Rank: Member Groups: Member
Joined: 8/25/2009 Posts: 10
|
Hi,
While you tell me how to do this for width and heigth (type = unit), I get my credit card!
Great support! Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, I believe it's the same, you simply replace "Html" with "Width" or "Height". Please let us know this works for you:
Code: C#
public Unit EditorWidth
{
get { return Editor1.Width; }
set { Editor1.Width = value; }
}
public Unit EditorHeight
{
get { return Editor1.Height; }
set { Editor1.Height = value; }
}
Thanks!
|
|