converting 1.1 pages to the master page

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
 
M

Mark Rae

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();");
 
J

JJ

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top