Click here to Skip to main content
15,892,072 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello friends,
I was trying to create fix header grid.
When i tried in simple aspx page, its working fine.
When i tried the same in using master page, the javascript function is not getting called.

This is my javascript function
 function CreateGridHeader(pnlGVForecast, GridView1, HeaderDiv) 
{
...
}


This is how i bind it to page
protected void Page_Load(object sender, EventArgs e)
    {
ClientScript.RegisterStartupScript(this.GetType(),
               "CreateGridHeader", "<script>CreateGridHeader('pnlGVForecast', 'gvForecastSummary', 'HeaderDiv');</script>");
}


May i know why there such problem??

Thanks in advance
Posted
Comments
justinonday 27-Apr-12 7:40am    
Did you used ajax tool kit in this web form?
dhage.prashant01 2-May-12 0:45am    
No
dhirajonnet 27-Apr-12 7:51am    
May i know where your javascript function is placed.in aspx or master page.
dhage.prashant01 2-May-12 0:44am    
Its in aspx page
Muralikrishna8811 27-Apr-12 7:52am    
Hi
bind that method in Jquery it's better than pageregisterscript

$(document).ready(function(){
CreateGridHeader('pnlGVForecast', 'gvForecastSummary', 'HeaderDiv');
});

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