473,394 Members | 2,100 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

2.0 master pages and codebehind cycle

I am using the codebehind in my masterpage to set some global variables
which all children (content) pages use, for example the DB connection
string.
It seems the master page code is run AFTER the content pages' and so the
content page code never sees these variables. Can I change this? Or should I
pherhaps use some other alternative eg. an user control (with codebehind) or
even global.aspx ??
Nov 19 '05 #1
1 1086
found this (to be placed in masterpage code behind):

protected override void OnPreInit(EventArgs e)
{
... my code ...
base.OnPreInit(e);
}
well... I get error "no suitable method found to override"

blows my mind
Nov 19 '05 #2

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

Similar topics

3
by: Nils Magnus Englund | last post by:
Hi! I'm playing around with Wilson's master pages for ASP.NET 1.1. It seems ok, but I'm really struggling with the following two problems: 1) I want all .aspx pages to inherit from the same...
1
by: Diego | last post by:
Hi all I'd like to understand something about master pages: 1)Why if if try to typecast a masterpage inside a "child page" the compiler tells it dont find the class? I was trying to declare a...
14
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...
2
by: Learner | last post by:
Hello, This is first time I have started using Master Pages. I am using ASP.NET 2.0 (VB) in Visual Studion 2005. This is how I am doing it... I have created a master page and placed a...
2
by: Paul | last post by:
Hello: I am struggling with something that would seem to be very easy. I am using a master page. On the content page (which includes the master page), I have a form with a submit input type...
0
by: romaricr | last post by:
Hello, We are having issues with namespaces. Here is what we do: - We set a namespace for our project and pages (something like 'group.project.component.folder.subfolder.page) - We add a...
0
by: danielclark | last post by:
Hello, Here's my scenario: I have a simple contact form set up where the user can choose how they wish to be contacted from a list of options presented in a Select box (DropDownList)....
0
by: gr8oblivion | last post by:
Hi everyone, I'm using .Net 1.1 to create a c# web application... and I want to use Wilson's Master Pages. The problem is, I'm planning on hosting it on Brinkster which does not allow...
1
by: H F | last post by:
Hi all I created a user control that has a button and have added it to the Master page. When I click on the button, the onClick event handler in the user control is not fired. How do I reference...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.