PC Review


Reply
Thread Tools Rate Thread

How to change the Class of a table

 
 
Corinne
Guest
Posts: n/a
 
      15th Feb 2007
Hi All,

I have a table in a aspx page.

I want to change the class value dependign on a value pass to the page.

Any idea how I get to do that.

I would have expected the following to work but it doesn't. For some reason
I get "Name "Value" is not declared"

<%
dim value as string
value = "classname"
%>
.....

<table class="<%=value%>">
<tr><td>&nbsp;</td></tr>
</table>


Any help would be apreciated

Corinne

Ta!


 
Reply With Quote
 
 
 
 
Patrick Steele
Guest
Posts: n/a
 
      16th Feb 2007
In article <#Us#(E-Mail Removed)>, clofts@shepherd-
neame.co.uk says...
> Hi All,
>
> I have a table in a aspx page.
>
> I want to change the class value dependign on a value pass to the page.
>
> Any idea how I get to do that.
>
> I would have expected the following to work but it doesn't. For some reason
> I get "Name "Value" is not declared"
>
> <%
> dim value as string
> value = "classname"
> %>
> ....
>
> <table class="<%=value%>">
> <tr><td>&nbsp;</td></tr>
> </table>
>
>
> Any help would be apreciated
>
> Corinne


I would use the server-side control <asp:Table>. Then you can just set
that control's "CssClass" property during PageLoad.

--
Patrick Steele
http://weblogs.asp.net/psteele
 
Reply With Quote
 
Corinne
Guest
Posts: n/a
 
      16th Feb 2007
I will give that a try.

Thanks for the suggestion Patrick.

Corinne


"Patrick Steele" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> In article <#Us#(E-Mail Removed)>, clofts@shepherd-
> neame.co.uk says...
>> Hi All,
>>
>> I have a table in a aspx page.
>>
>> I want to change the class value dependign on a value pass to the page.
>>
>> Any idea how I get to do that.
>>
>> I would have expected the following to work but it doesn't. For some
>> reason
>> I get "Name "Value" is not declared"
>>
>> <%
>> dim value as string
>> value = "classname"
>> %>
>> ....
>>
>> <table class="<%=value%>">
>> <tr><td>&nbsp;</td></tr>
>> </table>
>>
>>
>> Any help would be apreciated
>>
>> Corinne

>
> I would use the server-side control <asp:Table>. Then you can just set
> that control's "CssClass" property during PageLoad.
>
> --
> Patrick Steele
> http://weblogs.asp.net/psteele



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I display & change table indexes within a class module? =?Utf-8?B?RGFuIEJsaXNz?= Microsoft Access VBA Modules 1 2nd Jun 2006 07:57 PM
How to change public properties in base class as private in derived class. santel Microsoft C# .NET 4 21st Mar 2006 03:06 PM
table look up value class in base class? hazz Microsoft C# .NET 1 21st Feb 2006 08:24 PM
Change OLE class Kevin Witty Microsoft Access VBA Modules 0 11th Jun 2004 05:03 PM
activex ,money tree dialer,RdxE Class,updaate class,YInstStarter Class damaged RUSSELL Windows XP Performance 1 23rd Nov 2003 02:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:37 PM.