Loosing property values; and design time rendering

M

Mark Norgate

Hi

I'm having a couple of problems with a control I'm developing.

Firstly, I have a custom property called InnerHtml. Whenever I populate this
in the properties window, the value is immediately deleted when the
application in run. Why would this be? Here's the code for the property
accessors:

public string InnerHtml {
get {
object o = ViewState["InnerHtml"];
if( o!=null )
return o.ToString();
else
return "";
}
set {
ViewState["InnerHtml"] = value;
}
}

Secondly, my control designer does not seem to render at all in the
designer. I'm using a very simple GetDesignTimeHtml() implementation:

public override string GetDesignTimeHtml() {
return CreatePlaceHolderDesignTimeHtml( "XhtmlControl" );
}

....and I think I'm connecting it properly in the control:

Designer("Refresh.WebControls.XhtmlControlDesigner", "XhtmlControl")

Why is nothing appearing? All I see are the resizing handles all bunched
together.

Thanks, Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top