Solved

Add Style directly to vb code

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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

730 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