D
dcassar
I am working on a complex server control that dynamically creates an
HtmlInputHidden control that stores its value. As far as the postback
process is concerned, this hidden input acts as the control itself. So
when I render, I generate a proxy HtmlInputHidden like so:
protected virtual void Render(HtmlTextWriter writer)
{
HtmlInputHidden hiddenInput = new HtmlInputHidden();
hiddenInput.ID = ClientID;
hiddenInput.Name = UniqueID;
hiddenInput.Value = SelectedScopeID.ToString();
hiddenInput.RenderControl(writer);
}
When I look at the value of UniqueID inside the Render method, it has
colons in it, but for some reason, the name is being rendered to the
page using underscores instead. This, of course, causes my
LoadPostData method to fail, since the postDataKey has colons, not
underscores. Anyone have any idea why this could be happening?
HtmlInputHidden control that stores its value. As far as the postback
process is concerned, this hidden input acts as the control itself. So
when I render, I generate a proxy HtmlInputHidden like so:
protected virtual void Render(HtmlTextWriter writer)
{
HtmlInputHidden hiddenInput = new HtmlInputHidden();
hiddenInput.ID = ClientID;
hiddenInput.Name = UniqueID;
hiddenInput.Value = SelectedScopeID.ToString();
hiddenInput.RenderControl(writer);
}
When I look at the value of UniqueID inside the Render method, it has
colons in it, but for some reason, the name is being rendered to the
page using underscores instead. This, of course, causes my
LoadPostData method to fail, since the postDataKey has colons, not
underscores. Anyone have any idea why this could be happening?