Click here to Skip to main content
15,879,474 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have gridview control in grid iam having textbox how to find the control in javascript?
Posted

 
Share this answer
 
Comments
joginder-banger 19-Mar-14 6:43am    
sir Gud evening i am in problem about the Data list, sir how can find the datalist div value or how can set a div value through jquery. i try on google but at last result is zero. plz help of or send me a proper link
thanks
joginder@gmail.com
Ankur\m/ 19-Mar-14 6:48am    
Are you the same guy who asked this question? If not, please post this as a question.
There are many ways to find a control in javascript/jquery - by id, by class name, by element type, by control hierarchy. I couldn't believe you couldn't find it on Google. Use the right keywords.
joginder-banger 19-Mar-14 6:52am    
what is the best way find the control value, I have all ready used the class name add but this is not perfect idea..
Ankur\m/ 19-Mar-14 7:34am    
ID is the fastest way. Which version of ASP.NET are you using? Any control inside GridView control won't have ID as you specified. They are prefixed so that the ids are different. But you can use the pattern to find them.
joginder-banger 19-Mar-14 8:20am    
sir i am try with the help of ID but problem occurs every time.ok i am trying to clear what's the problem, suppose I have one Data list and in this data list have five Records. In datalist have one Div like this type code mention below
<div id="myfun"><%#Eval("id")%> I want get or set this div value. if have a single records no problem face but when more then two then how can set a value or get a value. I try with the help of id every time get or set value first div. sir how can do with the help of div. plz suggestion me
it's may be this link some help your try this Grid View Control Find[^]

another link is here[^]
 
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