Posted by & filed under Development, DotNetNuke, Web Development.

In DotNetNuke MVP Module Development: Tip #1 The AutoDataBind Property I suggested to use AutoDatBind to automatically bind up the user control.  However, there are times when no binding should occur.  For example, when a Cancel button is clicked the view should not be bound.  AutoDataBind should be disabled when no model is need.

protected void cmdCancel_Click(object sender, EventArgs e)
{
    try
    {
        AutoDataBind = false;
        OnCancel();
    }
    catch (Exception exc)
    {
        Exceptions.ProcessModuleLoadException(this, exc);
    }
}

Leave a Reply

  • (will not be published)