Click here to Skip to main content
15,885,435 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

I am using text box with auto post back property true but it working good in Mozilla but it not working in chrome if any suggestion kindly help me...
Posted
Comments
Umapathi K 5-Apr-14 0:44am    
Can You post your code here?
prasanna.raj 5-Apr-14 1:05am    
//cs code
try
{
//connection();
con = new SqlConnection(constr);
con.Open();
txtcusname.Text = "";
txtcusnumber.Text = "";
query = "sample_SP";
cmd = new SqlCommand(query, con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@GetCusID", txtcusid.Text).ToString();
da = new SqlDataAdapter(cmd);
ds = new DataSet();
da.Fill(ds);
GrdCustomerDetails.DataSource = ds;
GrdCustomerDetails.DataBind();
con.Close();
try
{
//connection();
con = new SqlConnection(constr);
con.Open();
ViewState["VSCusID"] = txtcusid.Text;
cmd = new SqlCommand("select contname,mob from CustContacts_TB where cid='" + ViewState["VSCusID"] + " '", con);
dr = cmd.ExecuteReader();
dr.Read();
txtcusname.Text = dr["contname"].ToString();
txtcusnumber.Text=dr["mob"].ToString();
con.Close();
}
catch(Exception ex)
{

}
finally
{
//connection();
con = new SqlConnection(constr);
con.Open();
ViewState["VSCusID"] = txtcusid.Text;
//cmd = new SqlCommand("select compname from CustCreate_TB inner join CustContacts_TB on CustContacts_TB.'" + ViewState["VSCusID"] + "'=CustCreate_TB.'" + ViewState["VSCusID"] + "' ", con);
cmd = new SqlCommand("select compname from CustCreate_TB where cid='" + ViewState["VSCusID"] + " ' ", con);
dr = cmd.ExecuteReader();
dr.Read();
txtcompname.Text = dr["compname"].ToString();
con.Close();
//txtcusname.DataBind();
}

<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<contenttemplate>
<asp:TextBox ID="txtcompid" runat="server" CssClass="textfield" Width="150px" Height="17px">
King Fisher 5-Apr-14 0:57am    
have you used any update panel? post your code
prasanna.raj 5-Apr-14 1:06am    
//cs code
try
{
//connection();
con = new SqlConnection(constr);
con.Open();
txtcusname.Text = "";
txtcusnumber.Text = "";
query = "sample_SP";
cmd = new SqlCommand(query, con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@GetCusID", txtcusid.Text).ToString();
da = new SqlDataAdapter(cmd);
ds = new DataSet();
da.Fill(ds);
GrdCustomerDetails.DataSource = ds;
GrdCustomerDetails.DataBind();
con.Close();
try
{
//connection();
con = new SqlConnection(constr);
con.Open();
ViewState["VSCusID"] = txtcusid.Text;
cmd = new SqlCommand("select contname,mob from CustContacts_TB where cid='" + ViewState["VSCusID"] + " '", con);
dr = cmd.ExecuteReader();
dr.Read();
txtcusname.Text = dr["contname"].ToString();
txtcusnumber.Text=dr["mob"].ToString();
con.Close();
}
catch(Exception ex)
{

}
finally
{
//connection();
con = new SqlConnection(constr);
con.Open();
ViewState["VSCusID"] = txtcusid.Text;
//cmd = new SqlCommand("select compname from CustCreate_TB inner join CustContacts_TB on CustContacts_TB.'" + ViewState["VSCusID"] + "'=CustCreate_TB.'" + ViewState["VSCusID"] + "' ", con);
cmd = new SqlCommand("select compname from CustCreate_TB where cid='" + ViewState["VSCusID"] + " ' ", con);
dr = cmd.ExecuteReader();
dr.Read();
txtcompname.Text = dr["compname"].ToString();
con.Close();
//txtcusname.DataBind();
}

<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<contenttemplate>
<asp:TextBox ID="txtcompid" runat="server" CssClass="textfield" Width="150px" Height="17px">
King Fisher 5-Apr-14 1:09am    
post you design part.

1 solution

Answers to this[^] question may be able to help you.
 
Share this answer
 
Comments
Rahul VB 5-Apr-14 6:18am    
Hello Sir,
thanks a ton. Bookmarked.
Abhinav S 5-Apr-14 6:28am    
Mark as answered if it helped. Thanks.
Rahul VB 5-Apr-14 6:38am    
I have already done that. But dont mind sir, i just want to say one thing. What will happen if i mark it as answered or unanswered? Points or marks dont matter until we get to learn something new. because of you i got to learn something new. the main important thing is knowledge which matters. What will happen if you get one million points? its knowledge that matters at the end of the day.

i apologize if it hurt you. The article was really helpful. I thank you for that.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


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