---
title: "How use selectedIndexChanged from dropdownlist in clientSide and ServerSide"  
description: "How use selectedIndexChanged from dropdownlist in clientSide and ServerSide"  
author: "Anonymous User"  
published: 2014-08-28  
updated: 2014-08-28  
canonical: https://www.mindstick.com/forum/2188/how-use-selectedindexchanged-from-dropdownlist-in-clientside-and-serverside  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# How use selectedIndexChanged from dropdownlist in clientSide and ServerSide

In clientside i want call [javascript](https://www.mindstick.com/articles/874/how-to-create-watermark-text-for-textbox-by-using-javascript) funcition!

```
 <script type="text/javascript">function changeCursor() {    document.body.style.cursor="progress";}</script> <asp:DropDownList ID="DropDownSubject" runat="server" DataTextField="Word" AutoPostBack="True" OnSelectedIndexChanged="SelectedChange"></asp:DropDownList>
```

SelectedChange is a [name](https://yourviews.mindstick.com/view/87450/how-to-generate-a-brand-name-using-linkedin-comprehensive-guide) of [function](https://www.mindstick.com/articles/13001/multi-statement-table-valued-user-defined-function-in-sql-server) in clientside!

Thanks for help!

## Replies

### Reply by Sumit Kesarwani

Hi Ankita, \

In Code behind

```
<asp:DropDownList ID="DropDownSubject"runat="server" DataTextField="Word"
AutoPostBack="True" OnSelectedIndexChanged="SelectedChange"
onchange="YourChangeFun(this);"></asp:DropDownList>In javascript<script type="text/javascript">      function YourChangeFun(ddl)      {        
alert(ddl.selectedIndex);      }</script>
```


---

Original Source: https://www.mindstick.com/forum/2188/how-use-selectedindexchanged-from-dropdownlist-in-clientside-and-serverside

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
