:
Page.ClientScript.RegisterStartupScript(Type, String key, String script)
Page.ClientScript.RegisterClientScriptBlock(Type, String key, String script)
"" "" script. , script, . , ,
.
1.RegisterClientScriptBlock() method add the script before the controls are renderd in the page. So the scripts we are registered can't acess the controls inside the page.
e.g : var name = document.getElementById('txtName'); //will not work as excepted.
2.RegisterStartupScript() method add the script before the end of body tag after all the controls are rendered in the browser. So the registered script can acess the controls inside the page .
e.g : var name = document.getElementById('txtName'); //will work fine.