i have asp.net web application in which i used to generate list of text boxes depend on count in table dynamically.however whenever I load the details I am getting the same output in the TextBox every time.
please help.
after generating all controls(TextBox,dropdownlist etc) i am doing this below
TextBox txtRes1 = (TextBox)PlaceHolder1.FindControl("id1");
txtRes1.Text= concat(value1, valu2);
public int concat(strin v1, string v2)
{
return v1+v2;
}
TextBox txtRes1 = (TextBox)PlaceHolder1.FindControl("id1");
txtRes1.Text= concat(value1, valu2);
public int concat(strin v1, string v2)
{
return v1+v2;
}


Riddhi ValechaRank #794 · 2.9K reputationPosted Feb 21, 2016, 12:20 AM EST
txtRes1.Text= concat(value1, valu2).ToString();
public int concat(strin v1, string v2)
{
return v1+v2;
}
Amit Kumar SinghRank #562 · 4.3K reputationPosted Feb 21, 2016, 12:33 AM EST
Merajuddin Ansari57 reputationPosted Feb 21, 2016, 12:43 AM EST
Riddhi ValechaRank #794 · 2.9K reputationPosted Feb 21, 2016, 12:46 AM EST
Amit Kumar SinghRank #562 · 4.3K reputationPosted Feb 21, 2016, 12:49 AM EST
Merajuddin Ansari57 reputationPosted Feb 21, 2016, 12:54 AM EST
Amit Kumar SinghRank #562 · 4.3K reputationPosted Feb 21, 2016, 12:55 AM EST
Merajuddin Ansari57 reputationPosted Feb 21, 2016, 1:00 AM EST
Riddhi ValechaRank #794 · 2.9K reputationPosted Feb 21, 2016, 1:13 AM EST
Merajuddin Ansari57 reputationPosted Feb 21, 2016, 1:40 AM EST
Merajuddin Ansari57 reputationPosted Feb 21, 2016, 8:57 PM EST
Thanks guys. i got the solution for this by creating a TextChanged event of a textbox in which i wanted to put the new changed value. protected void TextBox1_TextChanged(object sender, EventArgs e) { string endDate = Request.Form[((TextBox)PlaceHolder1.FindControl("tb1")).UniqueID]; string startDate = Request.Form[((TextBox)PlaceHolder1.FindControl("tb2")).UniqueID]; TextBox txtRes = (TextBox)PlaceHolder1.FindControl("tb31"); txtRes.Text = tbc.DateDiff(Convert.ToDateTime(endDate), Convert.ToDateTime(startDate)); }