refer this example
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<style>
.modal1 {
width:200px;
height:150px;
background-color:gray;
}
</style>
<script>
$(function () {
$(".modal1").hide();
$( '#<%= ddlYear.ClientID %>' + ',#<%= ddlMonth.ClientID %>').change(function () {
$(".modal1").show();
});
});
function pageLoad() {
$(".modal1").hide();
}
function close(){
$(".modal1").hide();
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:DropDownList ID="ddlYear" runat="server" Height="22px" Width="121px" OnSelectedIndexChanged="ddlYear_SelectedIndexChanged" AutoPostBack="True"></asp:DropDownList>
<asp:DropDownList ID="ddlMonth" runat="server" Height="22px" Width="121px" AutoPostBack="True" OnSelectedIndexChanged="ddlMonth_SelectedIndexChanged"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
<br /><br /><br />
<div class="modal1" >
<div style="text-align:right">
<button onclick="close()">close</button>
</div>
<h1>Loading..</h1>
</div>
</form>
</body>
</html>
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack) return;
for (int i = 0; i < 10; i++)
ddlYear.Items.Add("Year-" + i);
for (int i = 0; i < 10; i++)
ddlMonth.Items.Add("Month-" + i);
}
protected void ddlYear_SelectedIndexChanged(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(2000);
}
protected void ddlMonth_SelectedIndexChanged(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(2000);
}
refer
.net - What's the different between ASP.NET AJAX pageLoad() and JavaScript window.onload? - Stack Overflow[
^]