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
Santosh Reddy
NA
64
20.4k
dropdownlist some code problems will come
Jun 24 2017 2:01 PM
My recouvrement is when will selected dropdown list that value is stored in my textbox
this is my code """"::::
code
protected void Button1_Click(object sender, EventArgs e)
{
try
{
string db = ConfigurationManager.ConnectionStrings["DDDB"].ConnectionString;
SqlConnection con = new SqlConnection(db);
SqlCommand cmd = new SqlCommand("select id, name,village from gridview ", con);
con.Open();
SqlDataReader rr = cmd.ExecuteReader();
DropDown1.DataTextField = "name";
DropDown1.DataValueField = "id";
DropDown1.DataSource = rr;
DropDown1.DataBind();
con.Close();
Lbl.Text = "connected";
TextBox1.Text = DropDown1.SelectedValue;
}
catch (Exception ex)
{
Lbl.Text = ex.Message;
// Response.Write("<script>alert('" + ex + "')</script>");
}
}
Reply
Answers (
5
)
How can i find memory leaks in Asp.net website.
How do i integrate and work with hangouts in my asp.net site