So I have this asp label like below, created in visual studio 2008
<asp:GridView ID="PopulateGridView" runat="server" CellPadding="4" BorderWidth="1px"
CssClass="ControlStyle" ForeColor="#333333" Font-Size="8px"
GridLines="Vertical" width="99%" CaptionAlign="Left" PageSize="22"
AllowPaging="True"
OnPageIndexChanging="Populate_OnPageIndexChanging"
OnSelectedIndexChanged="PopulateGridView_SelectedIndexChanged"
OnSelectedIndexChanging="PopulateGridView_SelectedIndexChanging"
AutoGenerateColumns="false"
enableEventValidation="true">
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Left" Wrap="False" />
<Columns >
<asp:TemplateField HeaderText="User ID">
<ItemTemplate>
<asp:Label ID="lblApp_uid" runat="server" Font-Size="10px" CssClass="ControlStyleUpperCase" Text='<%# Bind("uid") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</columns>
</asp:GridView>
And the situation is like this, once a submit button is clicked, there will be popup asking the user to key in something, and when they click on OK button inside the popup, It should pass the data to Javascript like
$(function() {
e.preventDefault();
$('#btnInsidePopup').click(function(e) {
var rmk = $('#rmk').val();
var uid = $('#lblApp_uid').val()
/* proceed with function */
});
});
I manage to get the key-in value using $('#rmk').val() but not the lblApp_uid value, I've tried below method but still unable get it.
var uid = $('#App_uid').val();
also this one(below) throw me an error Name 'lblApp_uid' is not declared
var uid = $('#<%=lblApp_uid.ClientID%>').val();
how can I get the value? please help