Solved

Add Style directly to vb code

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Vb.net dynamic formulas in runtime 11 74
convert html to string 6 34
Connection String 16 54
https://github.com/willowsystems/jSignature 11 46
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

785 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