using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace LinqSqlEpisodeVProVid
{
    public partial class _Default : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void GridView1_RowUpdated(object sender, GridViewUpdatedEventArgs e)
        {
            if (e.Exception != null)
            {
                if (e.Exception.GetType() == typeof(ArgumentException))
                {
                    ErrorMessage.Text = ((ArgumentException)e.Exception).Message;
                }
                else
                {
                    ErrorMessage.Text = "Error occured while updating this product.";
                }
            }
            e.ExceptionHandled = true;
            e.KeepInEditMode = true;

        }
    }
}