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
Methoun Ahmed
NA
145
102.3k
How to show demo title in Dropdownlist
Aug 10 2018 12:25 PM
I want to show demo title in dropdownlist like 'Select Item' from binding data value in dropdownlist.Database value show perfectly but demo text not show.Bellow my C# code
void GetStatus()
{
if (!IsPostBack)
{
SqlDataAdapter sda = new SqlDataAdapter("SELECT Title FROM tblCloseStatus", con);
DataTable dt = new DataTable();
sda.Fill(dt);
DropDownList1.Items.Clear();
foreach (DataRow dr in dt.Rows)
{
DropDownList1.Items.Add(dr["Title"].ToString());
}
}
}
Here is my Asp.net Code
Reply
Answers (
4
)
Converting file to bytes then saving to SQL using C# MVC
How to add MVC5 report with HTML5 using parameters