Solved

Add Style directly to vb code

Posted on 2006-07-16
1
190 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
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now