Click here to Skip to main content
16,017,954 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to get textbox id which is used inside the datalist control in javascript
Posted

ohh sorry..
in Javascript u can try following code.
C#
var datalist = document.getElementById('<%=DataList1.ClientID%>').childNodes[0];
var txtbox = datalist.getElementsByTagName("txtid");
 
Share this answer
 
Try out following..
C#
foreach (DataListItem rw in dlbudjob.Items)
{
 TextBox txtId = (TextBox)rw.FindControl("textbox");
 int Cid = int.Parse(txtId.Text);
}
 
Share this answer
 
Comments
__PP__ 5-Oct-12 4:37am    
i want in javascript
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900