F
Fernando A. Gómez F.
Hello all.
I'm building a WebPart. In the CreateChildControls override, the webpart
creates a Calendar control in the following way:
_productCaducityDateCalendar = new Calendar();
_productCaducityDateCalendar.ID = "_productCaducityCalendar";
Controls.Add(_productCaducityDateCalendar);
However, when a postback is generated, it throws an exception with a
"fail to load viewstate" message.
I've been googling and this behaviour seems to happen whenever the
control's ID changes in a postback. However, the creation logic is
simple and I already ensured that the ID is the same.
Does anybody have an idea on what I'm doing wrong here? Any clue will be
really appreciated.
Best regards.
I'm building a WebPart. In the CreateChildControls override, the webpart
creates a Calendar control in the following way:
_productCaducityDateCalendar = new Calendar();
_productCaducityDateCalendar.ID = "_productCaducityCalendar";
Controls.Add(_productCaducityDateCalendar);
However, when a postback is generated, it throws an exception with a
"fail to load viewstate" message.
I've been googling and this behaviour seems to happen whenever the
control's ID changes in a postback. However, the creation logic is
simple and I already ensured that the ID is the same.
Does anybody have an idea on what I'm doing wrong here? Any clue will be
really appreciated.
Best regards.