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
Deepak Awashti
NA
301
73.9k
Dynamic textbox generate ,fill value but not show sum
Dec 5 2015 3:15 AM
i have generate dynamic textbox but not find the value in dynamic text box , so my problem is ... i am not find the total sum of all text box
pls help me
------------- Button Code (Generate text box)
protected void Button1_Click(object sender, EventArgs e)
{
int rc = Convert.ToInt32(TextBox1.Text);
int cc = Convert.ToInt32(TextBox2.Text);
Table tb = new Table();
tb.ID = "table1";
for (int i = 0; i < rc; i++)
{
TableRow tr = new TableRow();
for (int j = 0; j < cc; j++)
{
TableCell tc = new TableCell();
TextBox TxtBox = new TextBox();
TxtBox.ID = "Txtbox" + i+j.ToString();
tc.ID = "cell" + i.ToString();
tc.Controls.Add(TxtBox);
tr.Cells.Add(tc);
}
tb.Rows.Add(tr);
}
Panel1.Controls.Add(tb);
}
--------------- Button Code (Sum all text box value)
protected void Button2_Click(object sender, EventArgs e)
{
int rc = Convert.ToInt32(TextBox1.Text);
int cc = Convert.ToInt32(TextBox2.Text);
Table tb = new Table();
tb.ID = "table1";
for (int i = 0; i < rc; i++)
{
TableRow tr = new TableRow();
for (int j = 0; j < cc; j++)
{
TableCell tc = new TableCell();
TextBox TxtBox = new TextBox();
TxtBox.ID = "Txtbox" + i + j.ToString();
string strTemp = "Txtbox" + i + j.ToString();
TextBox tb1 = (TextBox)FindControl("TextBox2");
TextBox txt1 = (TextBox)Panel1.FindControl("TextBox2");
}
tb.Rows.Add(tr);
}
}
pls help me .... in urgent
Reply
Answers (
2
)
How to import excel sheet to database using store procedure
MVC Ajax Calls Getting Very SLow performance while in Domain