protected void Page_Load(object sender, EventArgs e) { if (Session["ID"] != null) { if (!IsPostBack) { int id = Convert.ToInt32(Request.QueryString["Id"]); Category category = categoryManeger.GetCategoryById(id); idHiddenField.Value = category.Id.ToString(); updateCategoryTextBox.Text = category.CategoryName; } } else { Response.Redirect("IndexUI.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { int id = Convert.ToInt32(Request.QueryString["Id"]); //Response.Write(id); //ID. = id); CategoryInput input = maneger.GetCategoryById(id); if (input != null) { idHiddenField.Value = input.ID.ToString(); CategoryInputTextBox.Text = input.Name; } } }