I have the following update panel tag:
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" onload="load()">
in my header I have the following:
<script type="text/javascript" >
function load() {
doSomething....
}
</script>
When I run this I get:
Compiler Error Message: CS1061: ‘ASP.aform_webform2_aspx’ does not contain a definition for ‘load’ and no extension method ‘load’ accepting a first argument of type ‘ASP.aform_webform2_aspx’ could be found (are you missing a using directive or an assembly reference?)
Can anyone help me figure out how to call that function whenever my update panel loads?
There is no
onloadproperty on the update panel. You should remove it. You may take a look at the following article. You could use:and the
load()will be triggered after every update panel update. But if you want to target a specific update panel you could use the following in the code behind: