Click here to Skip to main content
15,902,634 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
hi..........

i am trying to call javascript function on load of content page.i am using master page for which i have written separate javascript i want to call javascript function on page load content page provide soln for it.thanx
Posted
Updated 13-Jun-12 20:21pm
v2
Comments
Arunprasath Natarajan 14-Jun-12 2:28am    
If you are loading complete page then you can call it via onLoad function.

use this i hope it will solve your problem

write this on pageload event

C#
ClientScript.RegisterStartupScript(GetType(), ClientID, "UrJsFunction();", true);
 
Share this answer
 
Comments
Shiridish 19-Oct-12 8:33am    
hey thanks... this helped me too.
Aneeshasarath 1-Aug-13 7:21am    
gettype() type expected is shown
Include this statement in your aspx file
<script language="javascript" src="filename.js"></script>

Then call your javascript function on page onload event.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900