[CLOSED] embed display logic in ext container

  1. #1

    [CLOSED] embed display logic in ext container

    Hi,

    I have a ext container in my mvc view.

    <ext:Container ID="Container1" runat="server" Layout="hbox" Cls="PanelWizardRow">
    <Items>
    <ext:TextField ID="TextField1" runat="server" FieldLabel="test" Width="210" LabelWidth="30" AllowBlank="false" MsgTarget="side"></ext:TextField>
    </Items>
    </ext:Container>
    but I want to embed some display logic in the container like the following, but I got a parser error:

    <ext:Container ID="Container1" runat="server" Layout="hbox" Cls="PanelWizardRow">
    <Items>
    <% if(Model.IsInactive) { %>
    <ext:TextField ID="TextField1" runat="server" FieldLabel="test" Width="210" LabelWidth="30" AllowBlank="false" MsgTarget="side"></ext:TextField>
    <% } %>
    <% else { %>
    <ext:TextField ID="TextField1" runat="server" FieldLabel="test" Width="210" LabelWidth="30" AllowBlank="false" MsgTarget="side"></ext:TextField>
    <% } %>
    </Items>
    </ext:Container>
    So I am wondering what is the proper way of add display logic in a ext container. Thanks.
    Last edited by geoffrey.mcgill; Aug 26, 2011 at 9:15 PM. Reason: please use [CODE] tags, [CLOSED]
  2. #2
    <%%> synatx cannot be used inside control inner properties
    You have to use code-behind to implement that logic

Similar Threads

  1. [1.0] Zooming in IE breaks screen/window size logic
    By plykkegaard in forum 1.x Help
    Replies: 5
    Last Post: Oct 12, 2012, 4:59 AM
  2. [CLOSED] Container Spacing
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 19, 2010, 8:12 PM
  3. [CLOSED] [1.0] Container issue
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 09, 2010, 8:36 PM
  4. [CLOSED] [1.0] Custom Control - How to embed resources?
    By rcaunt in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 19, 2010, 7:35 AM
  5. Replies: 5
    Last Post: Jan 06, 2010, 2:01 PM

Posting Permissions