Hi Every One ,
i have Small doubt Asap solvethem,
When User Click The DropDown List Display TextBox ... actually Iam Writing Logic Code Let me know in my code where small Mistake...
protected void dpCity_SelectedIndexChanged(object sender, EventArgs e)
{
AutoNumber();
}
public void AutoNumber()
{
SqlConnection con = new SqlConnection("Data Source=SERVER;Initial Catalog=MuraliIIT;User ID=sa;Password=rits@1234");
con.Open();
string s = "select count(*) from NewStudentRegistrationForm";
SqlCommand com = new SqlCommand(s, con);
int count = Convert.ToInt16(com.ExecuteScalar()) + 2;
// dpCity.SelectedItem.Text = dpCity.SelectedItem.Text + count;
TxtUserid.Text = dpCity.SelectedItem.Text + count;
con.Close();
}


Shubham KumarRank #621 · 3.8K reputationPosted May 27, 2015, 9:39 AM EDT
Venkata SubbareddyRank #2,083 · 691 reputationPosted May 27, 2015, 9:50 AM EDT
Shubham KumarRank #621 · 3.8K reputationPosted May 27, 2015, 9:58 AM EDT
Venkata SubbareddyRank #2,083 · 691 reputationPosted May 27, 2015, 10:21 AM EDT
Shubham KumarRank #621 · 3.8K reputationPosted May 27, 2015, 10:23 AM EDT
Venkata SubbareddyRank #2,083 · 691 reputationPosted May 27, 2015, 10:27 AM EDT
Venkata SubbareddyRank #2,083 · 691 reputationPosted May 27, 2015, 10:30 AM EDT