c# - setting an asp.net label to the title of a jquery dialog -


i set jquery dialog title using asp.net label . possible?

i have tried :

 $(div1).dialog('option', 'title', 'title name'); 

but title name here static. use asp.net label here instead of 'title name'.

i have code updated below :

asp.net code :

 <div id="div1" class="insertbar">                                 <asp:label id="label2" runat="server" visible="true" font-bold="true"></asp:label>                                 <asp:panel id="panel1" runat="server" horizontalalign="left" scrollbars="auto">                                     <asp:gridview> *******gridview code ************************                                      </asp:gridview>                                 </asp:panel>                             </div> 

java script code :

<script type="text/javascript">         function viewmodelpopup1() {              $(div1).dialog('option', 'title', $('#<%=label2.clientid%>').val());          }     </script> 

the reason using label here (thought mention it):

i have asp.net grid view. displaying gridview in jquery dialog. have fetch value grid view , use title jquery dialog.

i fetching value grid view , storing in label.

i want assign value of label jquery dialog title.

does know how can ? or have ideas

try this:

$(div1).dialog('option', 'title', $('#<%=label1.clientid%>').text()); 

note: change label1 match name of asp.net label control.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -