Unable to call jquery from linkbutton
Hi,
I need to bind a dropdown list in modal popup.
I have below code in grid view:
- <asp:TemplateField HeaderText="Upload">
<ItemTemplate>
<div id="clicker" class="box">
<asp:LinkButton ID="lnkUpload" CommandName="UploadFile" CommandArgument='<%#Eval("ClientCode") %>' runat="server">Upload</asp:LinkButton>
</div>
<asp:Label ID="lblStatus" runat="server" Text=""></asp:Label>
</ItemTemplate>
</asp:TemplateField>
In the same page, i have jquery plugin call as below:
- <script type="text/javascript">
$(function () {
$('#popup-wrapper').modalPopLite({ openButton: '#clicker', closeButton: '#close-btn' });
});
</script>
If the popup is called the dropdown list should bound and the specific value should be displayed in ddl. popup and the ddl are working well separately, but not both.
- protected void grdFileList_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "DownloadFile")
{
try
{
some code
}
else
{
some code
}
}
catch (Exception ex) { Response.Write(@"<script language='javascript'>alert('Error Occured: " + ex.Message + "');</script>"); }
}
else
{
try
{
code to bind drop down.
}
catch (Exception ex) { Response.Write(@"<script language='javascript'>alert('Error Occured: " + ex.Message + "');</script>"); }
finally
{
I tried your code here. but its not calling the jquery.
}
}
}
I have to display different data in dropdown list according to the row its clicked. so is it possible to call the modalPopLite({ openButton: '#clicker', closeButton: '#close-btn' }); with linkbutton I use?