WebUserControl IsPostBack == true, always
Hello.
I'm writing this small web app that uses a web control I wrote inside of the "EditItemTemplate" portion of an ItemTemplate in a DetailsView. I got all the data binding working correctly. The web control I wrote depends on its own Page_Load to do the initialisation code, which must be run once (and only once) so it is wrapped in the usual "if !Ispostback ..." clause, the control's Page_Load is called by way of AutoEventWireup="true" property in the control.
My problem is the control never evaluates the code, because IsPostBack is always true, even the first time the control is loaded into the DetailsView.
I have tested the control outside of the detailsview and it works beautifully. Even on the same page, I have an instance of my control that does execute the page_load code, yet the one inside the EditItemTemplate in the DetailsView has this weird behaviour.
Does anybody know what's going on? am I missing something here?
Thanks in advance
|