protected void Page_Load(object sender, EventArgs e)
    {
        //Instantiate object
        Utility Util = new Utility();

        //Instantiate database field
        RecipeDetails Recipe = new RecipeDetails();

        Recipe.WhatPageID = constant.intRecipeDetails; //1 = we are dealing with print.aspx use the same as recipedetails.
        Recipe.ID = (int)Util.Val(Request.QueryString["id"]);

        //Fill up database fields
        Recipe.fillup();

        lblingredientsdis.Text = "Ingredients:";
        lblinstructionsdis.Text = "Instructions:";
        lblname.Text = Recipe.RecipeName;
        lblIngredients.Text = Util.FormatText(Recipe.Ingredients);
        lblInstructions.Text = Util.FormatText(Recipe.Instructions);

        strRName = "Printing" + Recipe.RecipeName + " Recipe";

        //Release allocated memory
        Util = null;
        Recipe = null;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //Validate admin session username and password by comparing them to the admin user database record.
            UserNameVal.ValidateAdminUserNameandPass();

            //Instantiate database field
            RecipeDetails Recipe = new RecipeDetails();

            Recipe.ID = (int)Util.Val(Request.QueryString["id"]);

            strRecipeImage = GetRecipeImage.GetImage(Recipe.ID);

            Recipe.WhatPageID = constant.intRecipeAdminViewing; //Parameter 2 = we are pulling database field for Admin/viewing.aspx

            //Fill up database fields
            Recipe.fillup();

            if (Recipe.HitDate.ToString() == "1/1/0001 12:00:00 AM")
            {
                lblastviewed.Text = "This Recipe Has not been view by anyone";
            }
            else
            {
                lblastviewed.Text = Recipe.HitDate.ToString();
            }

            lblname.Text = Recipe.RecipeName;
            lblauthor.Text = Recipe.Author;
            lbldate.Text = Recipe.Date.ToShortDateString();
            lblCatName.Text = Recipe.Category;
            Ingredients.Text = Recipe.Ingredients;
            Instructions.Text = Recipe.Instructions;

            if (Recipe.Approved == 1)
            {
                approvebutton.Visible = false;
                lblapprovalstatus.Text = "Viewing Recipe";
            }
            else
            {
                lblapprovalstatus.Text = "Unapprove - This recipe is waiting for approval";
            }

            if (Recipe.Hits == 0)
            {
                lblhits.Text = "0";
            }
            else
            {
                lblhits.Text = string.Format("{0:#,###}", Recipe.Hits);
            }

            strRecipename = Recipe.RecipeName;

            //Release allocated memory.
            Util = null;
            Recipe = null;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //Validate admin session username and password by comparing them to the admin user database record.
            UserNameVal.ValidateAdminUserNameandPass();

            GetDropdownCategoryID();

            lblusername.Text = "Welcome Admin: " + UserNameVal.AdminUsername;

            //Instantiate database field
            RecipeDetails Recipe = new RecipeDetails();

            Recipe.ID = (int)Util.Val(Request.QueryString["id"]);

            strRecipeImage = GetRecipeImage.GetImage(Recipe.ID);

            Recipe.WhatPageID = constant.intRecipeAdminEditing; //Parameter 3 = we are pulling database field for Admin/editing.aspx

            //Fill up database fields
            Recipe.fillup();

            Name.Text = Recipe.RecipeName;
            Author.Text = Recipe.Author;
            Hits.Text = Recipe.Hits.ToString();
            Ingredients.Text = Recipe.Ingredients;
            Instructions.Text = Recipe.Instructions;

            //Release allocated memory
            Recipe = null;
            myBL = null;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        Recipe.WhatPageID = constant.intRecipeDetails;
        Recipe.ID = (int)Util.Val(Request.QueryString["id"]);

        //Fill up database fields
        Recipe.fillup();

        //Initialize variables to use for aspx page.
        RecCatId = Recipe.CatID;
        strRName = Recipe.RecipeName;
        strCName = Recipe.Category;
        RecipeSection = constant.intRecipe;

        recipeimage.Visible = false;

        //Display recipe image if exist.
        if (!string.IsNullOrEmpty(Recipe.RecipeImage))
        {
            recipeimage.Visible = true;
            recipeimage.ImageUrl = GetRecipeImage.ImagePathDetail + Recipe.RecipeImage;
        }

        lbcountcomment.Text = Recipe.CountComments.ToString();
        lblname.Text = Recipe.RecipeName;
        lblauthor.Text = Recipe.Author;
        lblhits.Text = string.Format("{0:#,###}", Recipe.Hits);
        lblrating.Text = Recipe.Rating;
        lblvotescount.Text = Recipe.NoRates;
        lblcategorytop.Text = Recipe.Category;
        lbldate.Text = Recipe.Date.ToShortDateString();
        lblIngredients.Text = Util.FormatText(Recipe.Ingredients);
        lblInstructions.Text = Util.FormatText(Recipe.Instructions);
        starimage.ImageUrl = Utility.GetStarImage(Recipe.Rating);

        //Save to Favorite/Bookmark URL
        strBookmarkURL = Bookmark.URL;

        //Get dynamic page title and keywords
        GetMetaKeywords(DynamicKeywords.Keywords(constant.intRecipeDynamicKeywordDetails, Recipe.RecipeName.ToString() + " recipe, " + Recipe.Category.ToString() + " recipe"));

        //Display New and Popular image
        ShowNewPopularImage();

        //Get 15 related recipes datatable.
        GetRelatedrecipes();

        //Get user recipe cookie rating
        GetUserRecipeCookieRating();

        //Get Recipe Comment
        GetComments();

        //Release allocated memory
        Util = null;
        Recipe = null;
    }