CodeVerge.Net Beta
Login Idy
Register Password
  Forgot?
Explore    Item Entry    Members   
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML





Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.visual_studio_2008 Tags:
Item Type: NewsGroup Date Entered: 4/4/2008 4:39:59 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 9 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
jshallard
Asp.Net User
Switch inline style for class4/4/2008 4:39:59 PM

0/0

Does visual studio 2008 have the capability to automagically allow a CSS class to generate, and switched out for an inline style?  I am sure i heard something about this at a Microsoft Event, but have not managed to find it in VS 2008.

For example, if i have the tag:

<div style="background-color:red; font-size:large">Hello World</div>

Is there any way of, with the click of a button, getting the code to update to the following

 <style>.bigRedText{background-color:red; font-size:large}</style>
<div class="bigRedText">Hello World</div>

Thanks for any help

Mikhail Arkhipo
Asp.Net User
Re: Switch inline style for class4/4/2008 7:29:40 PM

0/0

You can change the way designer is applying styles, but it won't affect styles you have already entered as inline. I.e. changing setting does not convert inline styles to classes or the other way around.


Thanks

------------------------------------------------------------

This posting is provided "AS IS" with no warranties, and confers no rights.
wudwork
Asp.Net User
Re: Switch inline style for class - Modify THEME on the fly4/7/2008 2:01:41 AM

0/0

Easy to do. I created the below as "myBaseClass.vb".  All pages inherit it.   I chose to store the theme preference for each use in the built in profile (but I think my own sql table is easier for me to manage). Provide user a DDL in master.page header with choices of font size and/or theme and let them choose. On postback, this "just" works!   HTH, Tom 

 

*************** This is myBaseClass.vb file ***********************

Imports System.Web.Security.Membership

Public Class myBasePageClass

Inherits System.Web.UI.Page

Protected Overrides Sub OnPreInit(ByVal e As System.EventArgs)

MyBase.OnPreInit(e)

Dim MyProfile As System.Web.Profile.ProfileBase

MyProfile = HttpContext.Current.Profile

Dim tt As String = MyProfile.GetPropertyValue("ThemePreference").ToString

' Setup your MasterPage

If HttpContext.Current.User.IsInRole("SysAdmin") Then

Me.Page.MasterPageFile = "~/MPage/Admin.master"

ElseIf HttpContext.Current.User.IsInRole("Homeowner") Then

Me.Page.MasterPageFile = "~/MPage/User.master"

End If

'Setup your Theme

If tt Is Nothing Or Len(tt) < 3 Then

Me.StyleSheetTheme = "BasicBlue" ' default if you have not selected one

Else

Me.StyleSheetTheme = tt

End If

End Sub

 end class

jshallard
Asp.Net User
Re: Switch inline style for class4/7/2008 11:30:51 AM

0/0

A neat trick Wudwork, but not the answer to the question i asked!  Thanks for your contribution though.

4 Items, 1 Pages 1 |< << Go >> >|



Search This Site:


Meet Our Sponsors:



Other Resources:

Menu and Inline CSS - newsgroup.asp-net-forum.general_asp-net ... ... class="NaviTopMenu_1 StaticMenuItem NaviTopMenu_3" href="#"style="border-style: ... Ctrl+F2 - enter/switch menu | Arrow keys - navigate | Esc - exit menu ...
Class 4 telephone switch - Wikipedia, the free encyclopedia This article or section needs copy editing for grammar, style, cohesion, tone or spelling. ... to harnessing two beasts of burden in line rather than abreast. ...
Apply CSS Styles, Style, Type, Text, CSS, Inline, Tag, Sheet, ID, Class ... It then discusses the use of CLASS -v- ID when you are applying styles to an ... Switch Styles. Best viewed at 1024 x 768 using a colour depth greater than 256 ...
Ferraz Shawmut OEM Central - Family Detail Class CC / Midget Fuse Holders. In-Line Class CC Fuse Holders (FEY Series-Two Pole) ... Fusible Disconnect Switch. Non-Fusible Disconnect Switch. Fusible Shunt Trip ...
Ferraz Shawmut OEM Central - Product Group In-Line Class CC Fuse Holders (FEC Series-Single Pole) ... Fusible Disconnect Switch. Non-Fusible Disconnect Switch. Fusible Shunt Trip ...
Style "L" Inline Push-To-Talk Assembly ... the Style "L" Assembly features a multi-positionable remote PTT switch on a cable. ... "B" Class Uniform Pant - Poly Rayon. Men's 5.11 "B" Class Uniform ...
Switch Menu II script working in IE but not Firefox...puzzled..please ... <DIV class=subMenu style="DISPLAY: inline" ... <DIV class=subMenu style="DISPLAY: inline"> <DIV class=subItem> Amazon.com code ...


 
All Times Are GMT