Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts
Thursday, June 9, 2011
Refresh Parent Window of Popup with Javascript
Blog has been moved to :
http://robfine.com/aspnet/RefreshParentWindowofPopupwithJavascript
Friday, April 29, 2011
Monday, January 3, 2011
Resolving Body OnLoad Error BC30456 when runat="Server"
Having trouble loading a javascript function with your body onload call with ASP.NET? If you're getting the Compiler Error Message: BC30456: 'myFunction' is not a member of 'ASP.myMaster', then chances are you've probably set your body to runat="server".

Luckily, there is a way to keep your body running at the server level and a javascript function to the onload method.
First, remove the onload attribute from your body tag:
Now, in the code behind your page or in my case, the master page, add the following code:
masterbody.Attributes.Add("onload", "javascript:myFunction();")

Luckily, there is a way to keep your body running at the server level and a javascript function to the onload method.
First, remove the onload attribute from your body tag:
<body runat="server" id="masterbody">
Now, in the code behind your page or in my case, the master page, add the following code:
masterbody.Attributes.Add("onload", "javascript:myFunction();")