jquery - Get the text value from ASP.NET Hyperlink -


i'm trying figure out how use jquery text out of asp.net gridview hyperlink text.

<asp:gridview id="g" runat="server"  autogeneratecolumns="false"  onrowcreated="g_rowcreated" onrowdatabound="g_rowdatabound" width="755px" > <columns>      <asp:templatefield headertext="" itemstyle-horizontalalign="left" itemstyle-width="100%">         <itemtemplate>                                                           <asp:hyperlink id="hyperlink1" runat="server" navigateurl="javascript://" onclick="<%# eval(&quot;varid&quot;, &quot;return loaddata('{0}',this);&quot;)%>" text='<%# eval("varname","{0}") %>' ></asp:hyperlink>         </itemtemplate>     </asp:templatefield> 

hyperlink1 text value want grab can use column heading else on page. there way use jquery this? i've know using getelementbyid wont work after that? i'm trying text value can make jquery dialog title name.

thanks

i don't know result of server-side markup inside onclick attribute going be, nor know client-side markup ends being. (posting these things help.) if you're in context of click event handler hyperlink can text jquery's .text() function.

for example, if click handler this:

$('table a').click(function () {     // want text }); 

then can reference referencing this inside handler:

$('table a').click(function () {     var thetext = $(this).text(); }); 

a lot of conjecture based on very limited information you've provided, i'm trying point in right direction. if can supply client-side markup , javascript code you're using, can more precisely direct answer.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -