//SqlConnection con = null; //SqlCommand cmd = null; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { RepositoryFile rf = new RepositoryFile(); int pid = Convert.ToInt32(Request.QueryString["Id"]); ProductsInformation pi = rf.GetDetail(pid); txtid.Text = pi.Id.ToString(); txtname.Text = pi.Name.ToString(); txtimage.Text = pi.ImageUrl.ToString(); txtprice.Text = pi.Price.ToString(); txtdesc.Text = pi.Description.ToString(); } }