Calling UserControl function from AppCode
<p>I have the following code in aspx.cs page. I have moved the function PageSizeSelectedIndexChanged to a common class in APP_Code.I want to move the exception handling to the common class too. How do I pass or access the usercontrol (Message) in the app_code file?</p>

<pre><code> protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
    {
        try
        {
            DropDownList ddlPageSize = (DropDownList)sender;
            PageSizeSelectedIndexChanged(ddlPageSize,this.gvDocMaster, e);
        }
        catch (Exception ex)
        {
            log.Error("Error changing page index of Document Master List", ex);
            Message.ClearMessage();
            Message.ShowMessage(ex.Message.ToString(), AppMessages.MessageType.Error);
        }

    }
</code></pre>
