protected void OnProductNameClick(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "ViewProduct")
     {
         int         index     = Convert.ToInt32(e.CommandArgument);
         GridViewRow row       = gvProductsResult.Rows[index];
         long        productId = Convert.ToInt32(row.Cells[4].Text);
         Model.ProductDao.ProductDetails product = SessionManager.ProductService.FindProduct(productId);
         String url;
         if (product is Model.ProductDao.MovieDetails)
         {
             url = String.Format("~/Pages/Product/MovieDetails.aspx?productId={0}", productId);
         }
         else if (product is Model.ProductDao.BookDetails)
         {
             url = String.Format("~/Pages/Product/BookDetails.aspx?productId={0}", productId);
         }
         else if (product is Model.ProductDao.CDDetails)
         {
             url = String.Format("~/Pages/Product/CDDetails.aspx?productId={0}", productId);
         }
         else
         {
             url = String.Format("~/Pages/Product/ProductDetail.aspx?productId={0}", productId);
         }
         Response.Redirect(Response.ApplyAppPathModifier(url));
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            Int32 productId = Convert.ToInt32(Request.Params.Get("productId"));

            Model.ProductDao.ProductDetails product = SessionManager.ProductService.FindProduct(productId);
            SetProductInfo(product);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Int32 productId = Convert.ToInt32(Request.Params.Get("productId"));

            Model.ProductDao.ProductDetails product = SessionManager.ProductService.FindProduct(productId);
            if (product is Model.ProductDao.MovieDetails)
            {
                Model.ProductDao.MovieDetails mov = product as Model.ProductDao.MovieDetails;
                SetMovieInfo(mov);
            }
        }
 private void SetProductInfo(Model.ProductDao.ProductDetails prod)
 {
     lclNameValue.Text     = prod.name;
     lclCategoryValue.Text = prod.category;
 }