Once I was trying to access client script at .cs side by using ClientScript.RegisterStartupScript. But somehow it didn't work.After doing some research I found the solution to it.I realised that the reason why it wasn't working was because of update panel present on the page.
"<script> alert('I'm unable to access it in Update Panel.');</script>");
<asp:ScriptManager ID="sManger" runat="server" >
"message", "alert('It is working now.');", true);