I am looking to implement search functionality in my popup window.
The popup includes a textbox, a button, and a grid to display the search results.
This is how the popup appears:
Upon clicking the search button, I have a JavaScript function set up to call a server-side function to populate the grid.
However, once the search button is clicked, the popup disappears.
Here is the markup for the search button:
<asp:Button ID="btnSearch" runat="server" Text="Search"
OnClientClick="javascript:showGrid();return false;"></asp:Button>
JavaScript function:
function showGrid() {
PageMethods.Search("onResult");
return false;
}
function onResult() {
return false;
}
Server-side search function (.cs):
[WebMethod]
public void Search()
{
availableMembers();
}
However, upon checking, I noticed that the call only reaches the JavaScript function showGrid()
.
The Search()
function on the server side is not being called, causing the popup to disappear without displaying the search results.
What could be the issue?
Please provide assistance. Thank you.