Get Asp.net ID Dynamic Server Id in Client Side For JavaScript 

<script type=”text/javascript” language=”javascript”>

    function search()

    {

    if (document.getElementById(“<%=txt_search.ClientID %>“).value==”")

    {

        alert(“Please Enter Keyword”);

    }    

    }

</script>

<asp:ImageButton ID=”btn_search” OnClientClick=”return search()” runat=”server” ToolTip=”Search the website”/>

Here i Shown How i Fetched the Dynamic Image Button Id in the server side to implemnt the javascript Function.

Enjoy !!! Please Comment if you need a clear Understanding.