Hi I recently started to learn asp.net and I gotten to some confusion as to when exactly should I be creating the stylesheet.Because I mostly done client-side work and some basic PHP I am kind of confused at the process.For example when I recieve a PSD and have to turn it into a website/webapplication I usually follow this stepps:
- convert PSD to HTML/CSS
- add any necesary Javasscript/jQuery code
- add any necesarry PHP code(usually this ment form validation)
This worked because I always new the tags I use and what Id and classes I set for them.In asp.net webforms I can not always be sure what the generated tags for the various controls will be and also I can not be sure of the ID because from what I saw asp.net generates a more complex ID to make sure that the the id is unique.Aldo there is a way to get the client ID I don’t think this works in a css file. That leaves me with only knowing the class I set witch I believe from a writing clean HTML point of view is not always necesary to add in order to create style for the page.
So what I wanted to know is what is the process of created a website with asp.net webfoms?
When should I start writing the css for the website?
Depends on your projects.
If it’s a small projects and you’re alone on it, you can write your CSS while you’re coding your ASP.Net pages.
If you’re part of a team or bigger company, you may have different persons for each roles, or development workflows.
ASP.Net webform is not known for it’s usefullness when it comes to CSS. But in the end, it’s all HTML.
You can use the
ClientIDMode="Static"property of every ASP.Net control if you really need complete control over your ID’s.But regarding to what kind of HTML is usually generated by ASP.Net webform, I see no problem of using solely the
CssClassproperty.Personaly, with ASP.Net, I prefer the workflow :