M
Mark Norgate
Hi
I have a couple of problems that I've been unable to solve, so I'm asking
once more for help.
The properties that I've added to my own control are being reset just before
the application launches. I've added an InnerHtml property like this:
[Bindable(true), Category("Appearance")]
public string InnerHtml {
get {
object o = ViewState["InnerHtml"];
if( o!=null )
return o.ToString();
else
return "";
}
set {
ViewState["InnerHtml"] = value;
}
}
Trouble is, as I say, any values I added to this in the designer are
immediately set to blank immediately before the application launches in
debug mode. Anyone have any idea why this might be?
Secondly, the TagPrefix I'm setting up is not being used on my pages, but
the default cc1 is being used. My class is called XhtmlControl, and in the
AssemblyInfo.cs of my control assembly I have:
[assembly: TagPrefix("XhtmlControl", "Refresh")]
I've tried rebuilding and resetting the toolbox, but still it gets ignored.
Any ideas why?
Incidentally, when adding controls to the toolbox, do we add the .dll from
the obj or the bin folder?
Cheers, Mark
I have a couple of problems that I've been unable to solve, so I'm asking
once more for help.
The properties that I've added to my own control are being reset just before
the application launches. I've added an InnerHtml property like this:
[Bindable(true), Category("Appearance")]
public string InnerHtml {
get {
object o = ViewState["InnerHtml"];
if( o!=null )
return o.ToString();
else
return "";
}
set {
ViewState["InnerHtml"] = value;
}
}
Trouble is, as I say, any values I added to this in the designer are
immediately set to blank immediately before the application launches in
debug mode. Anyone have any idea why this might be?
Secondly, the TagPrefix I'm setting up is not being used on my pages, but
the default cc1 is being used. My class is called XhtmlControl, and in the
AssemblyInfo.cs of my control assembly I have:
[assembly: TagPrefix("XhtmlControl", "Refresh")]
I've tried rebuilding and resetting the toolbox, but still it gets ignored.
Any ideas why?
Incidentally, when adding controls to the toolbox, do we add the .dll from
the obj or the bin folder?
Cheers, Mark