TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
viv verma
NA
163
35.4k
how to get value Table's or Gridvie tr td from Jquery,
Nov 19 2016 10:26 AM
<script type="text/javascript">
function mainCall() {
var lb = document.getElementById('gvlblName').innerHTML;
alert(lb);
var name = $(obj).closest('tr').find('td:eq(0)').text();
alert(name);
}
</script>
===============================
<asp:GridView ID="grdRegister" runat="server" AutoGenerateColumns="false" >
<Columns>
<asp:TemplateField HeaderText="UserName">
<ItemTemplate>
<a href="#" id="na" onclick="mainCall();" >
<asp:Label ID="gvlblName" runat="server" text='<%#Eval("UserName")%>'></asp:Label>
</a>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
========================================================
error popup : The name 'gvlblName' does not exist in the current context
error popup : undefiend
Reply
Answers (
1
)
how to call webmethod with parameter
I want to learn Jquery. simple to advanced