Hi Mehram,
Please refer below sample code. You need to call the change function inside JavaScript windows.onload event.
HTML
<asp:DropDownList ID="cboVoucherType" runat="server" onchange="change();">
<asp:ListItem Text="Single" Value="0" />
<asp:ListItem Text="Multiple" Value="1" />
</asp:DropDownList>
<div id="divEntrySingle">
Single
</div>
<div id="divEntryMultipal">
Multiple
</div>
<script type="text/javascript">
window.onload = function () {
change();
}
function change() {
var DropdownList = document.getElementById('<%=cboVoucherType.ClientID%>');
var SelectedIndex = DropdownList.selectedIndex;
var divEntrySingle = document.getElementById('divEntrySingle');
var divEntryMultipal = document.getElementById('divEntryMultipal');
if (SelectedIndex == 1) {
divEntrySingle.style.display = "none";
divEntryMultipal.style.display = "block";
}
else {
divEntrySingle.style.display = "block";
divEntryMultipal.style.display = "none";
}
}
</script>
Screenshot