get data from dynamically generated textboxes

Posted by Mohsin1122 under ASP.NET on 7/16/2013 | Points: 10 | Views : 906 | Status : [Member] | Replies : 3
am facing the problem in accesing the dynamically generated textboxes

i am showing some data in gridview when i click on edit in some record a new panel is set to visible which contain form to update data

there is a single-column in db which contain many different values so to update it i split the values generate the textboxes at runtime and show it in textboxes now i want to know that when i click update how should i retrive values again from these textboxes

textbox name: tbin

tbin.id = "time"+i.toString()

placeholder name = placeholder6

in update btn i am doing this : string valin = ((TextBox)PlaceHolder6.FindControl("timein" + i.ToString())).Text;

but it gives null refrence error




Responses

Posted by: aswinialuri-19361 on: 7/16/2013 [Member] Starter | Points: 25

Up
0
Down
Hi,
Refer this link it might be useful to you
http://forums.asp.net/t/1893456.aspx/1
[/LINK] http://stackoverflow.com/questions/6489395/to-generate-textboxes-dynamically-in-asp-net[/LINK]

Mark as Answer if it helps you
Thanks&Regards
Aswini Aluri

Mohsin1122, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mohsin1122 on: 7/16/2013 [Member] Starter | Points: 25

Up
0
Down
useless link i am not asking how to generate the textbox dynamically
i am asking how to retrieve its value

Mohsin1122, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: aswinialuri-19361 on: 7/16/2013 [Member] Starter | Points: 25

Up
0
Down
Hi mohsin,

If the link is not useful to you means
say give me a proper answer
Nothing is useless here kk

Mark as Answer if it helps you
Thanks&Regards
Aswini Aluri

Mohsin1122, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response