473,378 Members | 1,436 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,378 software developers and data experts.

UserControl Is Nothing

Hi All,

My Web UserControl Is Nothing in the Load event.

That I am aware of, I have added the control correctly to the page as the
control appears, links to my database and displays correctly.

What I am trying to do is change a property on the control at runtime, and I
thought I could do this in the Load event, as the Load event is fired after
all the controls on the page are loaded.

Please help.

Landers
Nov 19 '05 #1
3 1123
You should be able to.

are you sure the name of the user control variable matches the id?

<uc1:something id="x" runat="server" />

protected x as Something

x.Xxx ?

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Landley" <ne**@creations-software.co.uk> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi All,

My Web UserControl Is Nothing in the Load event.

That I am aware of, I have added the control correctly to the page as the
control appears, links to my database and displays correctly.

What I am trying to do is change a property on the control at runtime, and
I
thought I could do this in the Load event, as the Load event is fired
after
all the controls on the page are loaded.

Please help.

Landers

Nov 19 '05 #2
If you're using Fragement Caching (where you cache the ASCX) then it will
be null. Perhaps this is the problem?

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi All,

My Web UserControl Is Nothing in the Load event.

That I am aware of, I have added the control correctly to the page as
the control appears, links to my database and displays correctly.

What I am trying to do is change a property on the control at runtime,
and I thought I could do this in the Load event, as the Load event is
fired after all the controls on the page are loaded.

Please help.

Landers

Nov 19 '05 #3
Nice catch :)

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:b8**************************@msnews.microsoft .com...
If you're using Fragement Caching (where you cache the ASCX) then it will
be null. Perhaps this is the problem?

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi All,

My Web UserControl Is Nothing in the Load event.

That I am aware of, I have added the control correctly to the page as
the control appears, links to my database and displays correctly.

What I am trying to do is change a property on the control at runtime,
and I thought I could do this in the Load event, as the Load event is
fired after all the controls on the page are loaded.

Please help.

Landers


Nov 19 '05 #4

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

Similar topics

4
by: Mark Friedman | last post by:
I can't seem to figure out how to get a reference to a UserControl in the code-behind for the page that contains the control. All the examples I've seen show how to pass property values from the...
2
by: crjunk | last post by:
I have a droped a UserControl named "ReceivedRecord1" onto my web form. Currently, I have been saving information typed in by the user with the following code that is located in the CodeBehind...
2
by: SamSpade | last post by:
This more out of curiosity than need. The Object Browser shows a property Text for UserControl. But if I look in the property window for a UserControl Text is not there (How come??). I...
0
by: Matthew | last post by:
All, I have searched google and the newsgroups but can't find anything the same as what I am experiencing (though I may have missed something). I have controls (textboxes) within UserControls...
0
by: Gary Shell | last post by:
I am experiencing some strange behavior between a UserControl's validating event and a treeview control. Initially, I thought it was related to an issue in the Knowledgebase article 810852...
41
by: JohnR | last post by:
In it's simplest form, assume that I have created a usercontrol, WSToolBarButton that contains a button. I would like to eventually create copies of WSToolBarButton dynamically at run time based...
12
by: Joe | last post by:
Hello All: Do I have to use the LoadControl method of the Page to load a UserControl? I have a class which contains three methods (one public and two private). The class acts as a control...
9
by: Marcelo Cabrera | last post by:
Hi, I have a user control that in turn creates a bunch of webcontrols dynamically and handles the events these webcontrols raise. It used to work fine on ASP .Net 1.1 but when compiled on 2.0 it...
1
by: Giovanni | last post by:
Dear Friends/Gurus, I have exhausted myself and have yet no solution to the following: I have an ASP.NET 2.0 Survey type application. On a page, I have placed a GridView which is bound to an...
5
by: tshad | last post by:
I get an error when running my Javascript inside my UserControl. It works fine if I put the UserControl Data directly in my Web Page. The stripped down code is: <script language=javascript>...
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: 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...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.