473,769 Members | 2,337 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

User Controls Event Lifecycle

I have a user control made up of a couple of web controls.

I want to be able to set the SkinId on the web controls at run time. To
do this I need to set the skin Id in or before the PreInit event.
However, I can see no way of hooking in to any events within a user
control prior to the OnInit event - which is too late for setting a
SkinID.

Any help greatly appreciated. Thanks, Jonny

Nov 19 '05 #1
2 4093
See:

http://msdn.microsoft.com/library/de...nLifecycle.asp

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Jonny" <jo********@tis cali.co.uk> wrote in message
news:11******** *************@g 44g2000cwa.goog legroups.com...
I have a user control made up of a couple of web controls.

I want to be able to set the SkinId on the web controls at run time. To
do this I need to set the skin Id in or before the PreInit event.
However, I can see no way of hooking in to any events within a user
control prior to the OnInit event - which is too late for setting a
SkinID.

Any help greatly appreciated. Thanks, Jonny

Nov 19 '05 #2
Only the Page has a PreInit event. You could set the SkinID from the
page object's PreInit, but I'm not sure what you are trying to
ultimately achieve.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On 13 Sep 2005 14:36:31 -0700, "Jonny" <jo********@tis cali.co.uk>
wrote:
I have a user control made up of a couple of web controls.

I want to be able to set the SkinId on the web controls at run time. To
do this I need to set the skin Id in or before the PreInit event.
However, I can see no way of hooking in to any events within a user
control prior to the OnInit event - which is too late for setting a
SkinID.

Any help greatly appreciated. Thanks, Jonny


Nov 19 '05 #3

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

Similar topics

1
1203
by: Charles A. Lackman | last post by:
Hello, I have created a User Control within Visual Studio and it contains a button that allows the user to querry a database. I dynamically add additional controls to the page based on the number of rows retured inside a dataset. All works well, but I have noticed that the control is rendered after the WebForm's load event is fired. This creates duplicate controls in certain situations. I have been able to prevent this from happening...
0
1083
by: Johannes Eble | last post by:
Hallo allerseits, ich habe eine Webform, die u.a. zwei User Controls enthaelt, sagen wir usrA.ascx und usrB.ascx. usrB.ascx enthaelt wiederrum ein User Control usrBB.ascx. usrA.ascx enthaelt eine Dropdown List ddL1 mit Autopostback=True und einem ddL1_SelectedIndexChanged Handler. Diesen Event muss jetzt auch usrBB erhalten. Wie mache ich das?
1
2135
by: Robert Howells | last post by:
Perhaps I'm just too new at this to pull it off, or perhaps it's just bad architecture. I'd appreciate some feedback on the the wisdom (or lack thereof) in attempting the following: I'm not new to programming, but I am new to ASP.NET and Web application design in general... loved the concept of user controls and dynamically adding them to a page. So what I wound up with was an application that dynamically loads two user controls directly...
1
1282
by: Nick Stansbury | last post by:
Hi, Is there any way to cause a page to completely resubmit itself from the server side? I have an array of user controls that, in the event handler of the user control itself, add new user controls to the same array - so page_load runs, then the control's event handler, but I can't handle the events of the new controls, because I didn't load them during page_load - simplest solution seems to be to store the lot in session memory and...
6
1811
by: Jim | last post by:
I have a user control that I am dynamically loading into an aspx page. When I fill out the text boxes and submit the form using a command button on the aspx page I lose the value from the user control. I have an Error-checking function in the user control that I invoke from the aspx page. This method fires and detects an error even though I fill the the text box with text. Now, if I fill out the text box again with text everything goes...
7
1294
by: Mr Newbie | last post by:
Hi There, Here I am messing about with User Controls and I seem to have a conundrum on my hands which I'm sure you chaps will unravel for me in the blink of an eye.
7
2595
by: David Lozzi | last post by:
Howdy, I have a usercontrol in my aspx page and when the page loads, I send it some property values based on the data displayed. I am sending it to a public property like below. However the usercontrol has some functions and when the function is run, I lose all of the property values. If I assign the property value to a text box, the information is not lost in the text box. I think this is by design, but how do I get around it??? ...
1
1842
by: Bob Rock | last post by:
Hello, I'm new to ASP.NET and I've been looking into the topic of dynamically loading (typically accomplished with a LoadControl followed by a MyControl.Controls.Add()) both user controls and asp.net web controls. I searched for articles on the internet and in the end I must say that I'm confused. I read about issues related to: a.. events not firing
0
1030
by: Ken Fine | last post by:
This supplements a question I asked earlier, about acting on ASP.NET controls of a particular type. I'm wondering how to loop through all controls on a page and manipulate user controls with custom properties set to a specific value -- can someone offer a code snip? What is the last point in the page lifecycle that I would still be "permitted" to do this? Thanks, -KF
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10211
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
10045
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...
1
9994
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9863
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
6673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3958
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
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.