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 > visual_studio.visual_studio_2008 Tags:
Item Type: NewsGroup Date Entered: 3/31/2008 6:56:40 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 8 Views: 53 Favorited: 0 Favorite
9 Items, 1 Pages 1 |< << Go >> >|
barryman9000
Asp.Net User
VS 2008 won't recognize CSS3/31/2008 6:56:40 PM

0

I'm not sure this is the right forum, but after installing VS2008 I noticed all my CSS classes are underlined in green in my User Controls.  I have VS Pro version 9.0.21022.8 installed, but all my projects and websites were created using 2005.  Is this a known issue, or something new with VS 2008?

Also, in case it matters, my style sheets are stored in my App_Themes folder.

Thanks

whatispunk
Asp.Net User
Re: VS 2008 won't recognize CSS3/31/2008 7:12:05 PM

0

Usercontrols don't have allow you to link stylesheets so VS2008 doesn't see them properly. I dynamically add a link element to the head of any page that uses my usercontrols and I also get the green underlines. This feature definitely needs some improvement.


Don't forget to click "Mark as Answer" if someone answers your question. Feel free to mark more than one answer, if you feel so inclined.
Bill_H
Asp.Net User
Re: VS 2008 won't recognize CSS3/31/2008 7:19:53 PM

0

FWIW, I am seeing the same thing in aspx content pages that have master pages. My css files are also in App_Theme folder. Sometimes the css class are recognized and the green lines go away, sometimes it suddenly reappears.

Cheers,

Bill

barryman9000
Asp.Net User
Re: VS 2008 won't recognize CSS4/3/2008 5:52:36 PM

0

Has anyone heard of a possible solution, or should we just wait for a fix from MS?

Mikhail Arkhipo
Asp.Net User
Re: VS 2008 won't recognize CSS4/3/2008 7:54:31 PM

0

VS 2005 did not have class name validation and therefore class names were not flagged, so it is not like something got broken since VS 2005. VS 2008 validates class names against attached stylesheets, but since designer does not know where user control may be included, it does not know which stylesheet to use. You can temporary attach <link> elements in the user control pointing to the right stylesheet and comment it out when you are done working with styles. Or you can try switching off CSS validation in Tools | Options.


Thanks

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

This posting is provided "AS IS" with no warranties, and confers no rights.
stmarti
Asp.Net User
Re: VS 2008 won't recognize CSS4/4/2008 7:47:26 AM

0

Mikhail Arkhipov (MSFT):
You can temporary attach <link> elements in the user control pointing to the right stylesheet and comment it out when you are done working with styles.
 

Would be nice if vs could get the stylesheet information out of a commented section or from some special marked section (so no need to brother to accidentally leave the stylesheet in a wrong place).

This solution could be similar to javascript intellisense references.

Mikhail Arkhipo
Asp.Net User
Re: VS 2008 won't recognize CSS4/4/2008 5:17:43 PM

0

Yes, we are thinking about adding something like this in the next version so you'll be able to reference stylesheets from user controls at design time.


Thanks

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

This posting is provided "AS IS" with no warranties, and confers no rights.
whatispunk
Asp.Net User
Re: VS 2008 won't recognize CSS4/4/2008 5:42:33 PM

0

Next version? You mean Visual Studio 2012?

This would be a nice feature for sure. But in the mean time its simple enough to add the link to the containing page in the OnInit method. 

 

 

protected override void OnInit(EventArgs e)
{
	base.OnInit(e);

	// Add reference to css stylesheet
	HtmlLink link = new HtmlLink();
	link.Href = "PathToStyleSheet.css";
	link.Attributes.Add("type", "text/css");
	link.Attributes.Add("rel", "stylesheet");
	Page.Header.Controls.Add(link);
}
 
Don't forget to click "Mark as Answer" if someone answers your question. Feel free to mark more than one answer, if you feel so inclined.
Mikhail Arkhipo
Asp.Net User
Re: VS 2008 won't recognize CSS4/4/2008 5:50:26 PM

0

This won't fix the designer since server code is not running at design time.


Thanks

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

This posting is provided "AS IS" with no warranties, and confers no rights.
9 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
The Essential Guide to Dreamweaver CS4 with CSS, Ajax, and PHP Authors: David Powers, Pages: 1000, Published: 2008
Foundation Website Creation with CSS, XHTML, and JavaScript Authors: Jonathan Lane, Steve Smith, Meitar Moscovitz, Joseph R. Lewis, Pages: 335, Published: 2008
Dreamweaver CS4: The Missing Manual Authors: David Sawyer McFarland, Pages: 1064, Published: 2008
Beginning ASP.NET 3.5 in VB 2008: From Novice to Professional Authors: Matthew MacDonald, Pages: 956, Published: 2007
Creating a Web Site: The Missing Manual Authors: Matthew MacDonald, Pages: 606, Published: 2008

Web:
Why did my Visual Studio 2008 stop recognizing .aspx and .css ... Visual Studio 2008 doesn't recognize Lambda Expression Syntax · Visual Studio 2008 sometimes won't open .aspx html markup ...
Enabling Vertical Split View in VS 2008 - ScottGu's Blog To enable vertical split-view orientation in VS 2008, ... CSS doesn't seem to recognize files that are referenced in the head of a masterpage in beta 2. ... I won't even quibble about the 'click here to update' thing! ...
Joomla! • View topic - TinyMCE doesn't read or recognize editor.css It won't display any of your others as dropdown options. ... doesn't read or recognize editor.css. Post Posted: Tue Nov 04, 2008 2:42 pm ...
Visual Web Developer Team Blog : Web Development Updates in Visual ... Visual Studio 2008 SP1 and Visual Web Developer 2008 SP1 are now available for download . ... FeedbackID=299418; web.config validation does not recognize .... is anyone else crashing vs when trying to "format document" in .css files? .... This doesn't appear to be a problem in basic use of the controls. ...
Feedback: ascx does not recognize css classes linked in master or aspx Aug 14, 2007 ... ascx does not recognize css classes linked in master or aspx ... the case similarly to what was done in JScript files in VS 2008 where you ...

Dynamic Title for Page from Database - ng.asp-net-forum ... It doesn't seem to recognize the Dataview command. ... . . Without that head runat Server command, you won't be able to dynamically change .... nested menu from single database table. vs2008 master page/content ...
"This document is opened by another project" - Visual Stuidio 2008 ... vs 2008 won't recognize css · windows service · freeze ups, forgotten window settings, forgotten option settings.. visual studio 2008 wont add a class to my ...
Horizontal menu hover image - ng.asp-net-forum.microsoft_downloads ... Because IE6 doesn't recognize the "hover" pseudo CSS selector, whereas FF and IE7 do. Thus the rule you gave won't be recognized by IE6 as legitimate but ...
Can't find afxwin.h - ng.asp-net-forum ... YouTube - I just can't seem to get it right today Jan 20, 2008 . ... visual web developer 2005 express doesn't recognize framework namespaces and classes ...
Server Error in '/asp.netwebadminfiles' Application - ng.asp-net ... Server Error in '/asp.netwebadminfiles' Application May 7, 2008 ... I am running Visual Studio 2008 and when I attempt to open the Web Admin Tool from the ...






copy website -> ftp very slow

where is asp:history control?

which is better . vs08 professional or visual studio team system 2008 team suite ??

vs2008 (trial) without xml schema 'designer' support?

vs2008 hangs intermittently on vista

how to install visual studio 2008 on fresh install of vista 32bit?

vss with visual studio 2008

access to reource object

building asp.net 2.0 with visual studio 2008

visual studio 2008 beta 2-linq?

subversion and web site (not web application)

performance hotfix is available

data access layer in vs 2008

vs2008 beta 2 master pages and iis6

system.data.entity failed to load in orcas ctp

use custom web server option is greyed out in project property pages

datapager and linqdatasource - where does it get the number of total pages.

"resetting" visual studio to different configurations

problem with asp.net development server in visual studio 2008 pro.wrong ports

zoom out in html design mode

_default instead of default in vs2008 beta2

how to change column bg color?

web application deploy

linq to entities framework for asp.net framework 3.5

web.config excluded from project causes debugging not enabled dialog to appear

choose items crashing visual studio 2008

dissapointed in vs 2008

vs08 is very slow

help with solution directory

ide smart code analyzer stopped working after vs2008 installation

   
  Privacy | Contact Us
All Times Are GMT