Forums
View unanswered posts | View active topics It is currently Thu Oct 30, 2014 12:15 pm



Reply to topic  [ 1 post ] 
 Adding css from code-behind 
Author Message

Joined: Wed Mar 06, 2013 7:04 pm
Posts: 1
Post Adding css from code-behind
Hi,

I am using VB.NET and adding controls from code-behind with css class that uses PIE. When the controls are renedered, the css applies only partialy (only text color). When I add controls with jQuery, it all works just fine. The browser is IE8.

CSS:
Code:
.resource
{
    padding: 5px;
    background-color: #f2a32a;
    color: White;
    border: 1px solid #3C6F91;
    border-radius: 15px;
    behavior: url('lib/pie/PIE.htc');
}


VB.NET
Code:
Dim lblRes As New Label
            lblRes.CssClass = "resource"
            lblRes.ID = resource.ID
            lblRes.Text = resource.Resource


jQuery
Code:
$('#<%=tblEdit.ClientID%>  tbody > tr:first').after(
                    '<tr class="trRes"><td align="right"><input type="button" id="delete" name="delete" value="Remove" class="deleteRes"></input></td>' +
                    '<td><span class="resource" id="' + res.val() + '"></td></tr>');


The controls are being added in the table. The problem is with <span>.


Wed Mar 06, 2013 7:09 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.