[Solved] why my query doesn’t work correctly? [closed]


i solved my problem,i was forgotten that i use the IsPostBack :

if (!IsPostBack)
        {
            if (Request["Id"] != null)
            {
                Int32 ID = Int32.Parse(Request["Id"].ToString());
                using (NoavaranModel.NoavaranEntities1 dbContext = new NoavaranModel.NoavaranEntities1())
                {
                    var query = (from list in dbContext.Packages
                                 where list.Id == ID
                                 select list).FirstOrDefault();
                    txtName.Text = query.Name;
                    txtLevel.Text = query.Level;
                    txtDescription.Text = query.Description;
                    Image2.ImageUrl = "PackageImages/" + query.Image;
                    ddlAgeFor.Text = query.ForAge;
                    //ddlCategory.Text = query.CatId.ToString();
                }
            }
        }

1

solved why my query doesn’t work correctly? [closed]