Click to See Complete Forum and Search --> : dynamic css
PeOfEo
02-11-2003, 02:17 PM
In asp you are dynamically creating an html document but when you make an object like a text bog you would do something like
<asp:textbox
bla bla bla, properties n' such here
/>
well something like that anyway, I know css so i know how to make a nice css border on a text box that is 1px, I know you can modify the borders and text color with asp using fore color and back color but like in vb there is no way or atleast no way that I know to change the border color so where would I go about puting some css to change the border color, if there is a way to do so of cource. This is one reason I like cgi controlling my forms :( BUT ASP STILL ROCKS!
PeOfEo
02-11-2003, 07:43 PM
Its the border color that I really want. Like if you go to www.barbaricsoftware.2ya.com and click on the support page and look at the form youll see what I want
PeOfEo
02-11-2003, 07:56 PM
That structure looks a little bit strange... I have been using asp.net by the way if it makes any difference but when I have made my objects it has started like <asp:textbox and ended like /> But thats how you do it? the css i mean in an asp object?
Ribeyed
02-12-2003, 05:41 AM
hi,
PeOfEo you are begining to confuse me with your chat. You are working with the new ASP.NET and not Classic ASP 3. These are 2 very different web technologies.
To answer your question yes CSS will work with ASP.NET.
If you are developing with ASP.NET then you either use VB.NET or C#.NET to write your pages (there are about another 12 other languages you can use).
If you are using Classic ASP 3 then you are using VBScript to write your pages. Please in future posts please make sure you tell us you are using VB.NET or whatever to write ASP.NET.
PeOfEo
02-12-2003, 04:32 PM
I am using asp.net and am using vb to write it.
Ribeyed
02-12-2003, 05:12 PM
hi,
there are 2 ways you can do this
first way:
<form action="" method="get" runat="server" >
<asp:table BackColor="#FFFFFF" BorderColor="#000000" BorderWidth="1" CellPadding="2" CellSpacing="2" runat="server" >
<asp:tablerow>
<asp:tablecell >
<asp:label ID="Namelabel" runat="server" Text="User Name:"></asp:label>
</asp:tablecell>
<asp:tablecell >
<asp:textbox ID="UserName" runat="server" TextMode="SingleLine" />
</asp:tablecell>
</asp:tablerow>
</asp:table>
</form>
Not using CSS
or
<style type="text/css">
<!--
.table1 {
border: 1px solid #FF0000;
}
-->
</style>
</head>
<body>
<form action="" method="get" runat="server" >
<asp:table CssClass="table1" runat="server" >
<asp:tablerow >
<asp:tablecell >
<asp:label ID="Namelabel" runat="server" Text="User Name:"></asp:label>
</asp:tablecell>
<asp:tablecell >
<asp:textbox ID="UserName" runat="server" TextMode="SingleLine" />
</asp:tablecell>
</asp:tablerow>
</asp:table>
</form>
</body>
</html>
Hope this helps
PeOfEo
02-13-2003, 11:25 AM
ohh so you write the css in a separate area then state the name like cssclass="the name I called my statement", that seems pretty stright forward, I was thinking you could just put the css into the <asp:table style="border:1px solid #003366"> or something but I tried it and it did not work. I will try that statement you typed by putting the css in an area separate from the table. I knew there was a way to do it some how, thanks :D
Ribeyed
02-13-2003, 12:08 PM
hi,
it maybe didn't work because you maybe declaired it as class="yourscript". In ASP.NET it is CssClass="table1".