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
Devendra Kumar
NA
517
244.7k
get value from dynamically created TextBoxes c#
Jan 25 2016 12:43 AM
get value from
dynamically created TextBoxes by code is
txt show null value
foreach (System.Web.UI.WebControls.ListItem item in ddsize.Items)
{
if (item.Selected)
{
TextBox txt = (TextBox)Panel1.FindControl("price"+ item.Value);
}
protected void ddsize_SelectedIndexChanged(object sender, EventArgs e)
{
if (counter > 1)
return;
foreach (ListItem item in ddsize.Items)
{
if (item.Selected)
{
Panel1.Visible = true;
TextBox price = new TextBox();
price.ID = "price" + item.Value;
//txtprice.ID = "txtprice";
Label lbl = new Label();
//lbl.ID = "lblsize";
lbl.Text = item.Text;
Panel1.Controls.Add(lbl);
Panel1.Controls.Add(price);
}
}
counter++;
}
Reply
Answers (
4
)
Get HTML table data from a string
edit and save data in gv