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

Page.LoadControl and CSS

I've got a page that dynamically loads web UserControls at run-time. The
problem is that CSS styles applied to the UserControl's controls and page
elements aren't being applied.

Any ideas?

Thanks

Ben
Nov 18 '05 #1
1 1350
Hi Ben,

Apply CSS file in Page that contains UserControl, and apply CSS classes in
UserCOntrol but don't link your usercontrol with CSS file. so only Container
page will have linked to CSS and Usercontrol will inherit CSS file from the
container page.

Revert back if not getting.

Harsh

"Ben Fidge" <be*******@btopenworld.com> wrote in message
news:e7**************@tk2msftngp13.phx.gbl...
I've got a page that dynamically loads web UserControls at run-time. The
problem is that CSS styles applied to the UserControl's controls and page
elements aren't being applied.

Any ideas?

Thanks

Ben

Nov 18 '05 #2

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

Similar topics

3
by: Tom | last post by:
Hi, I have an index.aspx page which includes top.aspx, left.aspx, main.aspx and bottom.aspx. In the left.aspx, there is a login web control - login.ascx. It keeps session of username and role...
6
by: martin | last post by:
Hi, I am a web page and a web user control. My web user control is placed in my web page using the following directive <%@ Register TagPrefix="uc1" TagName="Header"...
4
by: Christopher | last post by:
I am trying to load a UserControl which inherits from one of our customer classes which in turn inherits from UserControl. We use Page.LoadControl() from within our ASP.NET pages to load these...
4
by: Support | last post by:
Hello: I have a aspx web page - let's call it main.aspx It contains a placeholder: Myplaceholder. I have a web control, lets call it webcontrol which has a code behind class called...
5
by: alecyy | last post by:
hi, I create a UserControl called "RegInfo.ascx", then i add a PlaceHolder to WebForm1, and in WebForm1.Page_Load() i wrote the follow statement: placeHolder.Controls.Add(new RegInfo()); but...
5
by: Jay Douglas | last post by:
I have a set of pages that inherit from a base class in the App_Code folder. The class looks something like: public class MyBaseClass : System.Web.UI.Page In various stages of the life cycle I...
1
by: Joe | last post by:
Hello All, I have a class that inherits from System.Web.UI.Page. In it I call the Page.LoadControl. I am having trouble with the virtual path that the LoadControl method accepts as its...
1
by: RSH | last post by:
Hi, I have a situation where I have a user Control (ResultHeader.ascx) that has a button. I am placing that control into a page (samplePage.aspx). I have setup a custom event, that should from...
1
by: pyrusmagnus | last post by:
Hi, I'm having trouble loading a user control from inside my Sharepoint webpart. A System.IO.FileNotFoundException occurs on this line: Control myControl = Page.LoadControl("/UserControls/...
2
by: =?Utf-8?B?SlQtQVJM?= | last post by:
I have a pretty tricky problem. I have a dynamically built page. I use Page.ParseControls to parse the "entire page" (ASPX file contains only a Page tag). ParseControls is pretty resource...
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: 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
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...
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
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...
0
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,...
0
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...

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.