I'm currently developing an ASP.NET Web Form application with a specific requirement: to display a popup box for downloading an Excel file when the user clicks on a link. This link is located within a popup page, not on the main ASPX page.
Here's the code snippet:
function showListModelFromGenrator(divId) {
// Code logic here...
}
Web method:
[WebMethod(EnableSession = true)]
public string GetProductActivityStatus(int LoggedInOwnerId, int SelectedOwnerId, int CommunityId)
{
// Logic for generating HTML content for the popup screen...
}
When the user clicks on the "lnkViewProductCodeStatus" link generated by the web method above, a JS function called ExportExcel
is triggered. This function calls a handler method to process the file download.
function ExportExel(){
// Code logic for exporting Excel file here...
}
The issue arises when trying to initiate the file download popup from the handler. While the debug process shows that the call reaches the handler correctly, the file download prompt fails to appear. A similar approach tested outside of the popup worked fine. Can anyone provide insights as to why this might be happening in my case?
Thank you, Prashant