hello friends,
I was trying to call javascript function in child page
I have written following JS function in contentholder
function CreateGridHeader(pnlGVForecast, GridView1, HeaderDiv) {
....
}
I bind this function in Page_load in following way
protected void Page_Load(object sender, EventArgs e) {
ClientScript.RegisterStartupScript(this.GetType(), "CreateGridHeader", "<script>CreateGridHeader('pnlGVForecast', 'gvForecastSummary','HeaderDiv');</script>");
}
I tried to check the source code at runtime, what I found is the change in ID of controls
<br />
cphPage_pnlGVForecast for pnlGVForecast, cphPage_gvForecastSummary for gvForecastSummary<br />
i tried the following code too
ClientScript.RegisterStartupScript(this.GetType(), "CreateGridHeader", "<script>CreateGridHeader('cphPage_pnlGVForecast', 'cphPage_gvForecastSummary','HeaderDiv');</script>");
Still the javascript function is not getting called
Any solution??
Thanks in advance