473,802 Members | 2,430 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

converting 1.1 pages to the master page

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 <bodytag 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
Mar 29 '07 #1
3 1287
"JJ" <no****@nospam. comwrote in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
>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 <bodytag 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:

((HtmlGenericCo ntrol)Master.Fi ndControls("Mas terBody")).Attr ibutes.Add("onr esize",
"blah();");
Mar 29 '07 #2
JJ
Thanks for your response.

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

Thanks

"Mark Rae" <ma**@markNOSPA Mrae.comwrote in message
news:u8******** ******@TK2MSFTN GP06.phx.gbl...
"JJ" <no****@nospam. comwrote in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
>>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 <bodytag 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:

((HtmlGenericCo ntrol)Master.Fi ndControls("Mas terBody")).Attr ibutes.Add("onr esize",
"blah();");

Mar 29 '07 #3
"JJ" <no****@nospam. comwrote in message
news:eu******** ******@TK2MSFTN GP02.phx.gbl...
What if you want to add a block of javascript because there are some pages
with <scripttag in the <headsection?
What about external .css (stylesheet) or exteral .js (javascript) files?
http://aquesthosting.headtreez.com/d...a-ce5698c85160
http://msdn2.microsoft.com/en-us/library/btf44dc9.aspx
Mar 29 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1628
by: Sasha | last post by:
Hi all asp.net proffesionals out there, How do you implement master pages in your applications? What libraries do you use and what have been your experience? Sasha
5
2441
by: Michael Herman \(Parallelspace\) | last post by:
1. What are some compelling solutions for using Master/Content pages with Web Pages? 2. If a content area has a web part zone with web parts, what is the user experience like when "editting" the web part page? Does it take place at the page level? ...or the content area level? 3. Where is the Web Part Manager instantiated? ...in the Master Page? ....Content Page? ...elsewhere?
14
2407
by: multiformity | last post by:
So I have been working on an opensource project for a while, and decided to really try to make it look better after focusing on the functionality most of this time. Up to now, I have simply used a standard ASPX page with minor modifications to it. All of my pages inherit from a "BasePage.cs" class, that handles common things like getting the user's information out of the session, determines if a page should or should not be password...
1
1301
by: Friso Wiskerke | last post by:
Hi All, We've got an VS.2003 ASPNET (VB) webproject which we would like to convert to VS.2005 so that we can make use of the Master Page feature. Converting the initial pages to 2005 is not such a problem (some minor errors) but we run into trouble when we're trying to insert a converted page into a master page content-placeholder. The original page has some Javascript in it which ofcourse references to controls in a form in the page....
17
3164
by: Rob R. Ainscough | last post by:
Again another simple concept that appears NOT to be intuitive or I'm just stupid. I've read the WROX book and the example doesn't actually show how the .master page links in the other content pages? Kinda sorta a critical point no? Am I missing something? Rob. P.S. the day I find a book that actually is useful rather than just a
7
8732
by: xkeops | last post by:
Thinking of creating a website, most of the pages will have a general toolbar menu, a content and a footer. The content will be the only one who's gonna change but the rest (header,footer) will remain the same. I am interested to know your opinions/suggestions in finding an easy way of doing it. In asp one could have something like this:
11
12130
by: EagleRed | last post by:
I am writing an ASP.NET 2.0 application that uses master pages. I have some pages that must not be cached on the client. In ASP.NET 1.1 I achieved this using metatags: <meta http-equiv="Expires" content="0"> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Cache-Control" content="no-cache"> This tags are part of the <headelement. Sample code that I have seen shows how to add metatags of the form:
3
5976
by: Rich | last post by:
Hi, I want to use 2 master pages, one for the main part of the site, the other for the admin pages. They are quite similar, with many shared elements. Ideally I would like to have a parent master page, which both of these child master pages are based on, and in turn the final pages are based on one of these child master pages.
6
1692
by: Mickey | last post by:
Coming from a Dreamweaver/ASP/PHP background. Planning to use Visual Studio 2008 for a website. Complete newbie question here (please be gentle!): Do master pages work similar to Dreamweaver templates in that when the master page is updated, all the child pages created from the master page are updated and then they all need to be uploaded to the server? Or do you only have to upload the master page after an update?
0
10535
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10303
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10061
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9111
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7598
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5494
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4270
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3792
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.