Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have table name starting with tbl_5 (some value)... how to get table id using jquery with part of table name tbl_?????
Posted
Comments
Jameel VM 7-Jan-14 0:33am    
can you post the table mark up code?
Gitanjali Singh 7-Jan-14 0:39am    
where do you need this table id,can you post your code?
rhl4569 7-Jan-14 0:43am    
this is code behind i created the table...
Dim tbl As New Table
tbl.ID = "tbl_" & rowcount '''''rowcount is some number
I naeed to apply style to table in aspx page when click on row then current row will be displayed as active.. for that i need the table id
Gitanjali Singh 7-Jan-14 0:50am    
Refer:http://stackoverflow.com/questions/17316317/jquery-select-current-table-row-values
This may help

on top of Tadit dash solutoin..

you can have a look at this link http://api.jquery.com/category/selectors/[^] for all possible selectors
and you can choose which one suits for your need.

I would prefer below selectors for your need.
http://api.jquery.com/attribute-contains-selector/[^]
http://api.jquery.com/attribute-starts-with-selector/[^]
 
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