Ejemplo n.º 1
0
    //Data bind
    private void BindList()
    {
        //Instantiate Action Stored Procedure object
        Blogic FetchData = new Blogic();

        Recipe.CatID = (int)Util.Val(Request.QueryString["catid"]);

        IDataReader dr = FetchData.GetCatName(Recipe.CatID);

        try
        {
            dr.Read();

            Recipe.Category = dr["CAT_TYPE"].ToString();
            lbcatname.Text  = Recipe.Category.ToString();
            lbcatname2.Text = Recipe.Category.ToString();

            //Assing value to hidden HTML text field.
            Category.Value = Recipe.Category.ToString();
            CAT_ID.Value   = Recipe.CatID.ToString();

            dr.Close();
        }
        catch
        {
            //If no record, redirect to page not found.
            Util.PageRedirect(1);
        }

        //Release allocated memory
        FetchData = null;
    }