If I understand, You need bellow
in your aspx page write following
<script language="javascript" type="text/javascript">
function confirmSearch() {
if (confirm("Are you sure you want to search!"))
return true;
return false;
}
</script>
and in Button do the followings
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="return confirmSearch()" OnClick="searchfromDate" />
Hope it help