CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 7/1/2007 8:48:38 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 1 Views: 34 Favorited: 0 Favorite
2 Items, 1 Pages 1 |< << Go >> >|
cstavaru
Asp.Net User
Problems changing the CssClass property of a control when using a stylesheet theme7/1/2007 8:48:38 PM

0

Hi,

 I have the following problem: I use a stylesheet theme for my web application, and I have a Repeater control in which I have to change the CssClass of the item controls depending on what data does the row contain. However, I get a runtime error stating the fact that CssClass is not changeable when using stylesheet themes.

 So I ended up with the Repeater containing a MultiView for each item in which I duplicate the normal ItemTemplate contents, changing the CssClass of the controls I want in each view, and then set the ActiveViewIndex of the MultiView to a view that contains the css class I need.

It seems to me that this involves some resource and speed overhead. Does anybody know a better solution to this problem ?

Thank you.

 

Shobana P.S
Asp.Net User
Re: Problems changing the CssClass property of a control when using a stylesheet theme7/2/2007 9:59:13 AM

0

Hi,

i think your question is to change the cssclass of the itemtemplate during runtime.

For this in the itemcommand or itemdatabound event, use the following snippet

If (e.Item.ItemType = ListItemType.Item) Or ((e.Item.ItemType = ListItemType.AlternatingItem)) Then

CType(e.Item.FindControl("lblid"), TextBox).CssClass = "TableRowBold"

End If

this will change the cssclass in runtime


Regards,
Shobana
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Pro ASP.NET 3.5 in C# 2008 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1498, Published: 2007
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005
Pro ASP.NET 2.0 in C# 2005: Create Next-generation Web Applications with the Latest Version of Microsoft's Revolutionary Technology Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1426, Published: 2006
Beginning ASP.NET 2.0 Databases: Beta Preview Authors: John Kauffman, Thiru Thangarathinam, Pages: 427, Published: 2005

Web:
Mr.Bool - Working with Themes, Skins and Styles In the properties of the control, inform “grid” in the CssClass property, ... result simply by changing the page’s Theme and StyleSheetTheme properties (not ...
Integrating CSS techniques into ASP.NET 2.0 applications ... Feb 19, 2008 ... I’ll go into more detail about the CssClass property and themes after ... of a Web control using one of many techniques including CSS. ...
Themes and Master Pages the appropriate control using the CssClass property. ...... stylesheet without using themes by adding a element in the section of the master ...
Web Applications Development using Microsoft ASP.NET Using Skins is no different than setting control properties. .... makes more sense to use a Cascading Style Sheet and modify a control's CssClass property. ...
Walkthrough: Working with Cascading Style Sheet Styles in Visual ... For more information, see How to: Set HTML Server Control Properties Programmatically. ... Set CssClass Problems, Last Edit 4:53 PM by Daniel Borras ...
Customizing the Web Mapping Application NET folder for application theme files, including stylesheets, ..... Check if the control has a CssClass property. If this property is populated, ...
Themes/Skins and ASP.NET | Tech Off | Channel 9 Jul 4, 2006 ... As for changing the markup. if you just pump of control specific ... i.e. " CssClass" property is part of the skin. Themes are a way of ...
Themes and Master Pages the appropriate control using the CssClass property. ...... link to a stylesheet without using themes by adding a element in the section of ...
ASP.NET CMS .NET open content management system portal C# free ... General: Changing the code name of the web site could cause problems with ..... part setting both Stylesheet theme and Skin ID properties caused an error. ...
Build Your Own ASP.NET 2.0 Web Site Using C# & VB, 2nd Edition ... TextBox web server control, Web Server Controls; TextMode property, TextBox; theme folder. cerating, Creating a New Theme Folder. themes, Using Cascading ...












capturing button_click event from master page

accessing usercontrol properties on master page from content page

setting a property value

how do i create controls dynamically on a webform. - we are master pages. this is how i am trying.

menu control help needed

pathing of images from css

after selecting a theme i receive invalid postback or callback argument.......

forms authentication and themes

client being able to select different masterpage

how to left align text in <asp:menu> control?

setting onload event in body for a given content page

css placed in app_themes not placed in <head> ?

construct proper sitemap file

wizard control

treeview using sitemap data source renders nothing, but looks good in design view ??

want to create menu within menu dynamic..pls help with code

global masterpage not shown in designer?

how can i implement iframe?

sitemap and menu control

dynamically populating the menu control

too much stuff in each multiview view

adding meta data when using master page?

how to pop up a dialog in a page that uses a master (used to be done in body onload)

css url's not working in master pages

pass an id from a querystring to a formview textbox

setting the content of a contentplaceholder

customizing master pages (best approaches)

master pages - cannot place content placeholder side by side

menu items with images

how can content page sub page_load read master page session state?

 
Search This Site:

 
  Privacy | Contact Us
All Times Are GMT