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
vignesh t
NA
63
20.4k
Create controls dynamically on button click
Jan 8 2018 1:01 AM
Hi,
I need to create dynamic controls on button click.
HTML:
CODE:
When clicked on AddSorting shown in the below image I am trying to create dropdown control using below code and the controls doesn't show.
protected void lnkAddSort_Click(object sender, EventArgs e)
{
int index = pnlSort.Controls.OfType
().ToList().Count + 1;
this.Createddl("ddldyn" + index);
}
public void Createddl(string id)
{
DropDownList ddl = new DropDownList();
ddl.ID = id;
pnlSort.Controls.Add(ddl);
Literal lt = new Literal();
lt.Text = "
";
pnlSort.Controls.Add(lt);
}
Can anyone please provide suggestions on how to handle this?
Reply
Answers (
1
)
Download files having special characters in filemame
value not update in Registry at given path in C#