Properties loosing their values, and TagPrefix

Discussion in 'ASP .Net Web Controls' started by Mark Norgate, Sep 1, 2003.

  1. Mark Norgate

    Mark Norgate Guest

    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
    Mark Norgate, Sep 1, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?V2luZGphbW1lcg==?=

    Loosing Session values across Applications

    =?Utf-8?B?V2luZGphbW1lcg==?=, Feb 17, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    381
    =?Utf-8?B?QW51cmFkaGE=?=
    Feb 17, 2004
  2. Ziyad Makki
    Replies:
    0
    Views:
    314
    Ziyad Makki
    Aug 2, 2004
  3. c_shah

    Control loosing their status...

    c_shah, Jun 20, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    297
    c_shah
    Jun 20, 2007
  4. Mark Norgate

    Loosing property values; and design time rendering

    Mark Norgate, Aug 24, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    108
    Mark Norgate
    Aug 24, 2003
  5. Shimon Sim

    CompositeControl is loosing Properties when using Template

    Shimon Sim, Mar 27, 2007, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    100
    Shimon Sim
    Mar 27, 2007
Loading...

Share This Page