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
Azaad Abbas
NA
221
41.6k
dropdownlist selected value from database values
Feb 20 2015 7:29 AM
if (connection.State == ConnectionState.Closed)
connection.Open();
command = new SqlCommand();
command.CommandText = "sp_Get_ControlValues";
command.CommandType = CommandType.StoredProcedure;
command.Connection = connection;
command.Parameters.AddWithValue("@uid", uid);
SqlDataAdapter daPack = new SqlDataAdapter(command);
DataSet dsPack = new DataSet();
daPack.Fill(dsPack);
//ddlPackPeriod.DataSource = dsPack;
//ddlPackName.DataSource = dsPack;
//ddlPackPeriod.DataTextField = "PackagePeriod";
//ddlPackName.DataTextField = "PackageName";
txtOldExpDate.Text = dsPack.Tables[0].Rows[0]["OldExpiryDate"].ToString();
txtNoOfExtConn.Text = dsPack.Tables[0].Rows[0]["NoOfExtraConn"].ToString();
txtAmntToPay.Text = dsPack.Tables[0].Rows[0]["Balance"].ToString();
ddlPackPeriod.DataBind();
ddlPackName.DataBind();
In 'pageload' iam alredy binded those two dropdowns and those dropdowns are cascading
so when I click on 'Suearch' button I just want to show as selected of 'UserId' col values
so How?
Reply
Answers (
3
)
.net Developer
Error to read datetimepikers