How to makeuse of IsPostPack Method inside UserControl?
How to makeuse of IsPostPack Method inside UserControl?
IsPostBack method will always be true inside user control. You can use following alternate method to by pass this isse
protected override void OnLoad(EventArgs e) {
base.OnLoad(e);
if (!IsUserControlPostBack)
{
///Write your code
}
}
get
{
return this.ViewState["IsUserControlPostBack"] != null;
}
Hope this help..
Suresh Behera