473,326 Members | 2,102 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,326 software developers and data experts.

Unable to initialize server controls

I'm having trouble getting my server controls in my code-behind file to
initialize. I field names exactly match that of the control in the
ASPX file. The controls are also public. However, in my Page_Load()
method the fields remain unitialized (null). Each of my pages derive
from my own base page, which in turn derives from Page. Could I be
overrided a crucial method here, and if so, what should I be looking
for? Also, each page uses a custom control (derives from UserControl
and INamingContainer). This custom control, WebTemplate, provides the
basic look and feel for each page.

Any help would be greatly appreciated.

Nov 19 '05 #1
3 1844
Without any code it's hard to tell what's wrong...my guess is simple user
error. One thing you could do is turn tracing on @Page trace=true and see
what the control Ids are...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"mcollier" <mi*************@gmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
I'm having trouble getting my server controls in my code-behind file to
initialize. I field names exactly match that of the control in the
ASPX file. The controls are also public. However, in my Page_Load()
method the fields remain unitialized (null). Each of my pages derive
from my own base page, which in turn derives from Page. Could I be
overrided a crucial method here, and if so, what should I be looking
for? Also, each page uses a custom control (derives from UserControl
and INamingContainer). This custom control, WebTemplate, provides the
basic look and feel for each page.

Any help would be greatly appreciated.

Nov 19 '05 #2
I'll see if I can't work up a short, simple example this afternoon. My
running theory so far is that the "template" (really a user control)
that implements INamingContainer is the culprit. This provides my
"master pages" like functionality.

Nov 19 '05 #3
Why not reuse free master pages?
http://metabuilders.com/Tools/MasterPages.aspx

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"mcollier" <mi*************@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I'll see if I can't work up a short, simple example this afternoon. My
running theory so far is that the "template" (really a user control)
that implements INamingContainer is the culprit. This provides my
"master pages" like functionality.

Nov 19 '05 #4

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

Similar topics

2
by: Carlos G Benevides | last post by:
I have a ASP.Net web application that has two assemblies that run under com+. Under Windows 2000 the two assemblies are added to com+ automatically when instantiated from the web site. For this...
2
by: paul meaney | last post by:
All, myself and another developer have been staring blankly at a screen for the past 48 hours and are wondering just what stunningly obvious thing we are missing. We are trying to load up 2...
0
by: Jeremy | last post by:
Ok, this is probably a dumb question, but how do you initialize server controls? I have several controls that work together based on a common class that handles the work flow & data, so I need to...
10
by: Don Wash | last post by:
Hi! I'm pretty frustrated learning ASP.NET. I'm learning ASP.NET by downloading samples from various ASP.NET websites and none of the samples worked so far. The SAME error was shown whenever I...
3
by: Danny Ni | last post by:
Hi, Is there a way to initialize an user control after it's loaded? I know this is a strange question, so allow me to elaborate, I have an user control which allow users to enter customer data and...
10
by: Andrew | last post by:
Hi, friends, In Page_Load() events, I want to initialize this web page with values I retrieved from DB. For example, for the element <INPUT type="text" id="firstName" .../>, I want to make...
0
by: geeteshss | last post by:
the present problem is that i am unable to display data in datagrid....... but the data is visible in database..below is the code what should i do...earlier i could view it also below this code is...
4
by: benjaminkang | last post by:
I'm very new to Coldfusion and action script, but due to job requirements, i got allocated the task of developing a cfm page where the user logs in using the embedded swf file and everything was...
0
by: benjaminkang | last post by:
I'm very new to Coldfusion and action script, but due to job requirements, i got allocated the task of developing a cfm page where the user logs in using the embedded swf file and everything was...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.