Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Properties loosing their values, and TagPrefix

Thread Tools

Properties loosing their values, and TagPrefix

Mark Norgate
Posts: n/a

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();
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

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Control loosing their status... c_shah ASP .Net 0 06-20-2007 08:43 PM
CompositeControl is loosing Properties when using Template Shimon Sim ASP .Net Web Controls 0 03-27-2007 10:25 PM
Micro$soft is loosing their marble with this product Mutlley NZ Computing 28 10-08-2005 11:27 AM
Retrieving Namespace and TagPrefix for a usercontrol manso ASP .Net Building Controls 0 07-13-2004 11:41 AM
What the pros use to power their flashes... and their digital cameras. Dan Sullivan Digital Photography 21 01-04-2004 04:40 PM