How do I call client onload from ASP.NET ContentPage?
When we use ASP.NET Master Page inside our web application, body tag automatically remove from content pages. Coz, at runtime Master page body tag render as content page body tag. But the problem arises when we want to access the content page body element. Just say we want to call JavaScript function from client page body onload event.
With ASP.NET, we call solve this issue with some extra code.
Step 1: Set ID and runat tag for Master Page body element.
Step 2: Put below code inside the content page load event.
Labels: ASP.NET




1 Comments:
Nice and simple. Thanks!
Post a Comment
<< Home