Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UserControl linking stylesheet in design 1

Status
Not open for further replies.

NervousRex

Programmer
Sep 4, 2003
66
US
I am creating a usercontrol and would like the stylesheet applied in design view in VS2005 so I can see what the heck I am creating.

Currently the only way I can see how the control is going to look is to run a page the control is used in, which is very annoying.

Since the usercontrol has no <head> tag, I don't know how else to link the stylesheet to the control.

Any ideas?
 
Currently the only way I can see how the control is going to look is to run a page the control is used in,
Which happens to be the only way your users will see the control anyway so it's the only option that actually shows the real results. Plus, you need to be checking it in more than one browser (I'd say at least IE6, IE7, FireFox, Safari and Opera). The Visual Studio design window can only make a guess, and a guess isn't good enough as it isn't a real representation of any of those browsers.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
Its an internal app, our employees will be locked to IE7 so none of that mattered in this case. What I see is what they will see, no question.

If I drop the control on a page, I can see what I want...but I would much rather see what i'm creating without having to drop it on a page and go back and forth.

 
Its an internal app, our employees will be locked to IE7 so none of that mattered in this case.
Still, whilst you have the option, test it in other browsers too. You never know if your company will make any decisions to move to another browser or open the site up to other users who may have a different browser (e.g users at home via a VPN).

What I see is what they will see, no question.
Not necessarily - see above. Plus, they may also use different resolutions and different font sizes so make sure you check that too.

The whole point of my original statement is that a browser is the only place where you can check for certain what a rendered control will look like. As a browser can't navigate directly to a control, you will have to make a page that displays this control. There is no way around this.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
Not going to continue to argue with you over something that is irrelevant to what i'm asking. Trust me I know about different resolutions and that non-sense.

They created IDEs to help with this, something as simple as asking to have a stylesheet that a user will use be linked to the control i'm creating is becoming a drawn out argument over testing in other browsers. What your saying is like painting a picture blindfolded, taking the blindfold off to see god knows what you created, then putting it back on to fix the painting.

All i want to do is see what i'm creating without having to keep recompiling for trivial things. If I wanted to do that I would go back to developing in Notepad.

As a browser can't navigate directly to a control, you will have to make a page that displays this control. There is no way around this.

Still didn't answer what I had asked. If there is no way to apply the stylesheet to the control within VS2005, please just say so, thats all I originally asked.


 
I'm sorry you don't understand why you need to view it in a browser.

If you want a simple answer to your question without any explanation then the answer is "no".


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
I do understand I need to view it in a browser, but there is a time for that....when I get to points where it is ready for a browser. Like i said, what your suggesting is me going back to using Notepad.

Thank you for your answer
 
Like i said, what your suggesting is me going back to using Notepad.
I have never mentioned using Notepad. All I suggested is that to view HTML you will need a browser and anything other than a browser will not show the real results.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top