/// <summary>
    /// Add error web part to collection.
    /// </summary>
    /// <param name="tittle">Tittle of webpart</param>
    public void AddErrorWebPart(string tittle, Exception ex)
    {
        WebPartError err = new WebPartError();
        //If ex is defined, let ex.message show the error type
        err.ErrorTitle = GetString(tittle);
        if (ex != null)
        {
            err.InnerException = ex;
        }
        Controls.Add(err);

        // Load webpart content
        err.OnContentLoaded();
    }
Ejemplo n.º 2
0
    /// <summary>
    /// Add error web part to collection.
    /// </summary>
    /// <param name="tittle">Tittle of webpart</param>
    public void AddErrorWebPart(string tittle, Exception ex)
    {
        WebPartError err = new WebPartError();

        //If ex is defined, let ex.message show the error type
        err.ErrorTitle = GetString(tittle);
        if (ex != null)
        {
            err.InnerException = ex;
        }
        Controls.Add(err);

        // Load webpart content
        err.OnContentLoaded();
    }