Hi,
Im developing a RibbonBar Control in asp.net 1.1 by converting already
done in asp.net 2.0.
My problem is that theres no compositecontro l in 1.1. Correct me if im
wrong, heres what i want to achieve.
My RibbonButton control is a regular webcontrol. RibbonButton
instantiates a hiddenfield inside by creating new instance. So we have
simple situation here wheres RibbonControl that contains hiddenfield
control inside.
Note that aps.net 1.1 does not have hidden fields so i created my own
listed below:
public class SharedStateHidd enField : WebControl, IPostBackDataHa ndler
{
public string Value
{
get { return ViewState["Value"] != null ? (string)ViewSta te["Value"]
: string.Empty; }
set { ViewState["Value"] = value; }
}
protected override void AddAttributesTo Render(HtmlText Writer writer)
{
writer.AddAttri bute(HtmlTextWr iterAttribute.I d, ClientID);
writer.AddAttri bute(HtmlTextWr iterAttribute.N ame, ClientID);
writer.AddAttri bute(HtmlTextWr iterAttribute.V alue, Value);
writer.AddAttri bute(HtmlTextWr iterAttribute.T ype, "hidden");
}
protected override HtmlTextWriterT ag TagKey
{
get
{
return HtmlTextWriterT ag.Input;
}
}
#region IPostBackDataHa ndler Members
public void RaisePostDataCh angedEvent()
{
}
bool IPostBackDataHa ndler.LoadPostD ata(string postDataKey,
System.Collecti ons.Specialized .NameValueColle ction values)
{
return LoadPostData(po stDataKey, values);
}
protected virtual bool LoadPostData(st ring postDataKey,
System.Collecti ons.Specialized .NameValueColle ction values)
{
string val = values[this.ClientID];
bool changed = false;
if (val != Value)
{
Value = val;
changed = true;
}
return changed;
}
#endregion
}
}
So, when i do postback on whatever control on my page, this
IPostBackDataHa ndler in my hidden field is not fired !
i want it to be fired and thats my question, why ?
Do you possibly know what is wrong ?
regards, Peter