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
r k
NA
111
16.5k
Repeater control each row id on button click
Apr 24 2021 11:07 PM
I have a repeater control and I want it's row id when user click button "Read Message" which is a hidden field with the javascript or jquery. But whichever row i am selecting , i am getting the last row ID . Please help
i have my repeater control below :
<asp:HiddenField ID="hdnId" runat="server" Value='<%# Bind("ID") %>' />
<h4><%#Eval("SubjectText") %></h4>
<div>
<input type="button" id="btn" class="btn btn-default" value="Read Message" onclick="DeleteRecord();return false">
</div>
<div id="Create" style="display: none">
<div class="cnt" style="overflow: hidden">
<p class="show-read-more"><%#Eval("MessageText") %></p>
</div>
</div>
My jquery:
function DeleteRecord() {
event.preventDefault();
var name = "<%: HttpContext.Current.User.Identity.Name %>";
//Jquery ajax call to server side method
var msg = "";
var row = $(this).closest("tr");
var hidId = $('[id*=hdnId]').val();
Reply
Answers (
2
)
how to set selected value from database in combobox c#
which .Net library should i use?