cassiec
asked on
ASP.NET Programmatically assign CSS ID to a <div>
I have a sample ASPX page with a few styles assigned (see code below)
Styles were created in VS2008
1) I want to programmatically (using VB) add a DIV in the page and want the freedom of using a choice of the EXISTING styles currently defined in the style section of the aspx page, without having to recode the styles - some code examples will be appreciated.
2) Is it possible to place a general div in the aspx page and change its id programmatically - although I suppose this is possible ? - but rather to use a placeholder ?
Any suggestiions welcome
Thanks
Cassie
Styles were created in VS2008
1) I want to programmatically (using VB) add a DIV in the page and want the freedom of using a choice of the EXISTING styles currently defined in the style section of the aspx page, without having to recode the styles - some code examples will be appreciated.
2) Is it possible to place a general div in the aspx page and change its id programmatically - although I suppose this is possible ? - but rather to use a placeholder ?
Any suggestiions welcome
Thanks
Cassie
Part of ASPX page......
<style type="text/css">
#div01
{
background-color: #FFFFCC;
width: 200px;
height: auto;
}
.teststyle01
{
background-color: #99CCFF;
width: 500px;
height: 200px;
}
#divtop
{
background-color: #66FF33;
width: 500px;
height: 200px;
}
</style>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.