TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Venkata Subbareddy
999
770
99.3k
How to retrive the DropDownListValue to TextBox using asp.n
May 27 2015 8:26 AM
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();
}
Reply
Answers (
7
)
How to upload the QuestionPaper in database
How to Generate Based on Location AutoGenerate Number using