Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8722339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:23:31+00:00 2026-06-13T07:23:31+00:00

my gridview looks like: <asp:GridView ID=gvFiles runat=server > <Columns> <asp:TemplateField HeaderText=Notification Sent to> <ItemTemplate>

  • 0

my gridview looks like:

 <asp:GridView ID="gvFiles" runat="server" >
                                <Columns>
 <asp:TemplateField HeaderText="Notification Sent to">
                                        <ItemTemplate>
                                            <asp:Label ID="lblNotifSentTo" runat="server" CssClass="NotifSent"></asp:Label>
                                            <asp:HyperLink ID="hypNotifSentTo" runat="server"  CssClass="NotifSent2" NavigateUrl="#" 
                                                Text='<%# Eval("NotifSentToLabsStr") %>'></asp:HyperLink>
                                        </ItemTemplate>
                                    </asp:TemplateField>
  <asp:TemplateField>
                                        <ItemStyle Wrap="false" />
                                        <ItemTemplate>
                                            <div id="divIbtnEdit" runat="server" style="display: inline;">
                                                <asp:ImageButton ID="ibtnDelete" runat="server" ImageUrl="~/Images/Delete.gif"
                                                    ToolTip="Delete" />
                                                &nbsp;
                                            </div>
.......

when i click the delete button, i need to check the value of the “notification sent to” hyperlink before i do anything else, but i can’t seem to get the value out

this is what i have now:

 $("input[id*='_ibtnDelete_']").live("click", function ($e) {

            var id = $(this).next('NotifSent2').val();
            var nm = $(this).find('input[id$=NotifSent2]').val();

            var nm = $(this).parent.find('input[id$=NotifSent2]').val();
            var x = $(this).find('[id$="NotifSent2"]').val();
            return confirm(x);



            if ($(this).attr('src') == "Images/Delete_gray.gif") {
                alert("This request cannot be deleted, because it is currently linked to other files. ");
                return false;
            }

            else {
                return confirm('Are you sure you want to delete this file?');
            }
        });

i keep getting “undefined”

what am i doing wrong? please help.

here is the generated html:

<table cellspacing="0" cellpadding="8" id="ContentPlaceHolder1_gvFiles" style="background-color:White;border-color:#CCCCCC;border-width:1px;border-style:Solid;width:100%;border-collapse:collapse;">
                    <tr align="left" style="color:White;background-color:#ABAAC1;font-weight:bold;">
                        <th scope="col">&nbsp;</th><th scope="col">&nbsp;</th><th scope="col">&nbsp;</th><th scope="col">Type of Request</th><th scope="col">Status</th><th scope="col">Sender</th><th scope="col">Upload Date (EST)</th><th scope="col">Notification Sent to</th><th scope="col">&nbsp;</th><th scope="col">&nbsp;</th>
                    </tr><tr class="gvRowReqIncomplete">
                        <td>
                                            <td>HQ</td><td>10/23/2012 12:41:19 PM</td><td>
                                            <span id="ContentPlaceHolder1_gvFiles_lblNotifSentTo_0" class="uglyRed" style="display:inline;">No Recipient Selected!</span>
                                            <a id="ContentPlaceHolder1_gvFiles_hypNotifSentTo_0" class="NotifSent2" href="#" style="display:none;"></a>
                                        </td><td>

                                            <a id="ContentPlaceHolder1_gvFiles_hypResend_0" style="font-weight:bold;cursor:pointer;">Send Reminder</a>
                                        </td><td style="white-space:nowrap;">
                                            <div id="ContentPlaceHolder1_gvFiles_divIbtnEdit_0" style="display: inline;">
                                                <input type="image" name="ctl00$ContentPlaceHolder1$gvFiles$ctl02$ibtnEdit" id="ContentPlaceHolder1_gvFiles_ibtnEdit_0" title="Edit" src="Images/Edit.gif" />
                                                &nbsp;
                                            </div>
                                            <div id="ContentPlaceHolder1_gvFiles_divIbtnDelete_0" style="display: inline;">
                                                <input type="image" name="ctl00$ContentPlaceHolder1$gvFiles$ctl02$ibtnDelete" id="ContentPlaceHolder1_gvFiles_ibtnDelete_0" title="Delete" src="Images/Delete.gif" />
                                                &nbsp;
                                            </div>
                                            <div id="ContentPlaceHolder1_gvFiles_divIbtnUpdate_0" style="display: none;">
                                                <input type="image" name="ctl00$ContentPlaceHolder1$gvFiles$ctl02$ibtnUpdate" id="ContentPlaceHolder1_gvFiles_ibtnUpdate_0" title="Update" src="Images/Update.gif" />
                                                &nbsp;
                                            </div>
                                            <div id="ContentPlaceHolder1_gvFiles_divIbtnCancel_0" style="display: none;">
                                                <input type="image" name="ctl00$ContentPlaceHolder1$gvFiles$ctl02$ibtnCancel" id="ContentPlaceHolder1_gvFiles_ibtnCancel_0" title="Cancel" src="Images/Cancel.gif" />
                                            </div>
                                        </td>
                    </tr>
                </table>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T07:23:32+00:00Added an answer on June 13, 2026 at 7:23 am

    Try this:

    var id = $(".NotifSent2", $(this).closest("tr")).html();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple gridview ItemTemplate that looks like this: <asp:TemplateField HeaderText=User> <ItemTemplate> <a
This is what my aspx page looks like: <asp:TemplateField HeaderText=Detail HeaderStyle-ForeColor=DimGray > <ItemTemplate> <asp:Label
I have a Gridview with delete and edit buttons looks like <asp:GridView ID=grdTrackedItems runat=server
my line in gridview <asp:Label ID=Label2 runat=server Text='<%# new System.Text.StringBuilder(<a href=\/Administration/Pages/EditPage/?pageID=).Append(Eval(PageID)).Append(\>).Append(Eval(Name)).Append(</a>).ToString() %>'></asp:Label> fails with
I have the following GridView in ASP.NET 3.5: <asp:GridView ID=gvTable runat=server AllowSorting=true ShowHeader=true> <Columns>
I have a GridView with a bunch of DynamicFields like so; <asp:GridView ID=GridView1 runat=server
I have user control which looks like <div> <asp:LinkButton ID=btnShow runat=server Text=Select CausesValidation=false />
I have gridview in my asp.net 3.5 application [C#]. Which looks like this: <asp:GridView
I have a GridView that looks something like this: <asp:GridView ID=GridView1 AllowPaging=true OnRowCommand=RowCommand OnPageIndexChanging=gridView_PageIndexChanging
I have an ASP.NET GridView which has columns that look like this: | Foo

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.