Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi there,

I had problem when when call css class from myFile.aspx.vb
there is not prompt any error message...
just the picture that i want not appear in web page.
below is the code for my project:

myFile.aspx.vb

VB
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
         'Put user code to initialize the page here
            _oPortalInfo = PortalInfo.GetCurrentPortalInfo
            DataUtil.InitDataHelper(_oDal, _oPortalInfo.DataAccess.UserId, 
            _oPortalInfo.DataAccess.Password, _oPortalInfo.DataAccess.SecId)
            CheckLinks()

            If Not IsPostBack Then
                LoadTab()
            End If
End Sub

Private Sub LoadTab()
   'load from database

   _Tabs = New StringBuilder
End Sub

Private Sub AddTab(ByVal Text As String, ByVal ProfileNr As String)
    _Tabs.Append(class=""eviewButtonImage"")
End Sub

CSS
myCssFile.css
.eviewButtonImage{
   background-image:url('myImage.gif')
}



Is it anything wrong? please,i really need your help.
Posted
Updated 10-Mar-10 23:50pm
v2

1 solution

The way you have added the stylesheet in code behind does not look correct.

It should be something like:
VB
lblText.Attributes.CssStyle.Add("background-color", ddBGColor.SelectedValue)


Please refer this article for full detail:
http://www.vbasic.net/detail.aspx?tid=141[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900