Solved

Add Style directly to vb code

Posted on 2006-07-16
1
234 Views
Last Modified: 2012-05-05
hi

i want to add           style="font: 12px tahoma, verdana, arial; color: blue"           to both "attName1" and "AttributeName" in the following VB code.

how would i code it?

                    Next
                    CType(e.Item.FindControl("attName1"), Label).Visible = True
                    CType(e.Item.FindControl("AttributeName"), DropDownList).Visible = False
                    CType(e.Item.FindControl("AttributeName2"), RadioButtonList).Visible = True
                    rdList = CType(e.Item.FindControl("AttributeName2"), RadioButtonList)
                    rdList.DataSource = oAttribute.AttributeDetails   ' CreateDataSource()
                    rdList.ClearSelection()
                    rdList.SelectedIndex = 0
                    rdList.DataBind()
0
Comment
Question by:naifyboy123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 29

Accepted Solution

by:
David H.H.Lee earned 500 total points
ID: 17119841
naifyboy123 ,
Try this :

Dim lbl as label
lbl=CType(e.Item.FindControl("attName1"), Label)
lbl.visible=true
lbl.attributes.add("style","font: 12px tahoma, verdana, arial; color: blue")

Dim drp as DropDownList
drp=CType(e.Item.FindControl("AttributeName"), DropDownList)
drp.visible=true
drp.attributes.add("style","font: 12px tahoma, verdana, arial; color: blue")

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question