Click here to Skip to main content
15,885,192 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
my problem. 1st page i get 1st row record from grid and send the row record to next page and it show . then i cant update it . i found update - textbox.text not editable
Posted
Comments
giri001 8-Mar-13 2:18am    
provide info is not enough to solve your problem.better to paste your code.thanks.
prashant patil 4987 8-Mar-13 2:24am    
improve your question buddy...
Michael Haephrati 8-Mar-13 4:32am    
Please add some of your source code to explain the exact issue

1 solution

hi guys i found the problem.. i put bind function with in postback

public void showDeal()
{
int did = Convert.ToInt16(Request.QueryString["sid"]);
if (did == null)
{
string msg = "";
msg = "<script>alert('No')</script>+did";
ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "alert", msg, false);

}
else
{
co.Open();
string s = "select * from PS_deals where did='" + did + "' ";
SqlCommand cm = new SqlCommand(s, co);
cm.ExecuteNonQuery();
SqlDataAdapter sd = new SqlDataAdapter(cm);
DataSet dt = new DataSet();
sd.Fill(dt);
if (dt.Tables[0].Rows.Count > 0)
{
txt_dname.Text = dt.Tables[0].Rows[0]["dealname"].ToString();
txt_descp.Text = dt.Tables[0].Rows[0]["description"].ToString();
txt_validfrom.Text = dt.Tables[0].Rows[0]["validfrom"].ToString();
txt_validto.Text = dt.Tables[0].Rows[0]["validto"].ToString();
drp_nit.Items[0].Text = dt.Tables[0].Rows[0]["night"].ToString();
drp_roomtype.Items[0].Text = dt.Tables[0].Rows[0]["roomtype"].ToString();
txt_price.Text = dt.Tables[0].Rows[0]["price"].ToString();
}


dt.Dispose();

co.Close();
}
}
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900