Update css class does not work runtime

  1. #1

    Update css class does not work runtime

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WAY.DataEntry.WEB.WebForm1" %>
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
    <title></title>
    <style type="text/css"> 
    .mia1 
    {
    font-size:25px;
    
    } 
    .mia2
    {
    font-size:50px;
    
    }
    </style>
    
    
    </head>
    <body>
    <form id="form1" runat="server">
    <ext:ResourceManager runat="server" /> 
    <div>
    <ext:Button ID="Button4" runat="server" Text="Click Me">
    <DirectEvents>
    <Click OnEvent="UpdateCss">
    
    </Click>
    </DirectEvents>
    </ext:Button> 
    </div>
    <ext:Panel ID="Panel1" runat="server" Height="300" Title="Title">
    <Items>
    <ext:Label Text="ciao" runat="server" ID="txt1" Cls="mia1"></ext:Label>
    </Items>
    </ext:Panel>
    </form>
    </body>
    </html>




    protected void UpdateCss(object sender, DirectEventArgs e)
    {
    txt1.Cls = "mia2";
    }
    Last edited by geoffrey.mcgill; Jul 21, 2010 at 6:45 PM. Reason: please use [code] tags
  2. #2
    Hi,

    Which browser are you using to post this in the forums?

    Do you copy/paste the code samples directly from Visual Studio into the forum WYSIWYG editor?
    Geoffrey McGill
    Founder
  3. #3
    Fixed.

    The fix has been committed to SVN (Revision #2939) and will be publicly available with the upcoming v1.0 release.

    As a temp work-around, you can call the .AddClass() Method.

    Example

    Panel1.AddClass("mia2");
    If you do not require the "mia1" css class, you can call the .RemoveClass Method.

    Example

    Panel1.RemoveClass("mia1");
    Hope this helps.
    Geoffrey McGill
    Founder

Similar Threads

  1. Runtime Checkbox value update issue.
    By ajviradia in forum 1.x Help
    Replies: 1
    Last Post: Apr 08, 2011, 5:23 PM
  2. Replies: 4
    Last Post: Feb 21, 2011, 10:02 PM
  3. Replies: 0
    Last Post: Sep 22, 2010, 10:43 AM
  4. [CLOSED] AltFormats does not work after update
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Mar 31, 2009, 1:23 PM
  5. Can it work with ASP.NET update panels
    By mthakershi in forum Open Discussions
    Replies: 2
    Last Post: Mar 20, 2009, 1:54 PM

Posting Permissions