converting 1.1 pages to the master page

  • Thread starter Thread starter JJ
  • Start date Start date
J

JJ

I am trying to convert applications built with .net framework 1.1 to use
master pages. On a couple of aspx pages, I call certain javascript
functions
<body onresize="blah()"....>

However, now that <body> tag is in master page, I cannot do this. What is
the correct way/workaround for this? I really don't want to create another
master page for those aspx pages.

Thanks
 
I am trying to convert applications built with .net framework 1.1 to use
master pages. On a couple of aspx pages, I call certain javascript
functions
<body onresize="blah()"....>

However, now that <body> tag is in master page, I cannot do this. What is
the correct way/workaround for this? I really don't want to create
another master page for those aspx pages.

In your MasterPage:

<body id="MasterBody" runat="server">

In your content page:

((HtmlGenericControl)Master.FindControls("MasterBody")).Attributes.Add("onresize",
"blah();");
 
Thanks for your response.

What if you want to add a block of javascript because there are some pages
with <script> tag in the <head> section?
What about external .css (stylesheet) or exteral .js (javascript) files?

Thanks
 
Back
Top