Cannot Get Value from Code Behind

  1. #1

    Cannot Get Value from Code Behind

    I have the following code on the markup page, but I cannot seem to get the value from the code behind. Is there a config option I need to set in order to be able to retrieve the value from the code behind?

    Thanks,
    Jon

    <ext:Panel ID="pnlPeriod" runat="server" Layout="RowLayout" AutoScroll="true" Height="380" Padding="5"
        BodyStyle="background-color:InactiveCaptionText">
        <Items>
            <%----------------------------------TOP Field Panel-------------------------%>
            <ext:FieldSet ID="FieldSetTop" runat="server" StyleSpec="padding-left: 5px;" Title="Period Entry"
                BodyStyle="background-color:Transparent;" Layout="ColumnLayout">
                <Items>
                    <ext:NumberField ID="NumberField11" runat="server" Text="0" Cls="numberTop" LabelAlign="Top"
                        FieldLabel="<h3># of Dough Types<br>(Wkly Avg)"  />
                    <ext:NumberField ID="NumberField1" runat="server" Text="0" Cls="numberTop" LabelAlign="Top"
                        FieldLabel="<h3># of FG Items<br>(Wkly Avg)" />
                    <ext:NumberField ID="NumberField2" runat="server" Text="0" Cls="numberTop" LabelAlign="Top"
                        FieldLabel="<h3><br># of Lines" />
                    <ext:NumberField ID="NumberField3" runat="server" Text="0" Cls="numberTop" LabelAlign="Top"
                        FieldLabel="<h3><br># of Plan Types" />
                    <ext:NumberField ID="NumberField4" runat="server" Text="0" Cls="numberTop" LabelAlign="Top"
                        FieldLabel="<h3>Theor. Run Hrs<br> at wrapper" />
                    <ext:NumberField ID="NumberField5" runat="server" Text="0" Cls="numberTop" LabelAlign="Top"
                        FieldLabel="<h3>Transport<br>Trips" />
                    <ext:NumberField ID="NumberField6" runat="server" Text="0" Cls="numberTop" LabelAlign="Top"
                        FieldLabel="<h3>Product<br>Unaccounted For $" />
                </Items>
            </ext:FieldSet>
        </Items>
    </ext:Panel>
    Last edited by geoffrey.mcgill; Jan 16, 2012 at 3:05 PM. Reason: please use [CODE] tags
  2. #2
    Hi,

    The code you have posted appears to be configured correctly. Is your code inside a <form runat="server">?
    Geoffrey McGill
    Founder
  3. #3
    The code is not currently inside a form. Does it need to be in order to get the value from the code behind?
  4. #4
    I tried adding a FormPanel to the outside of the panel, but it does not seem to have an effect.
  5. #5
    If the Controls are not inside a <form>, then the values will not be submitted by the browser. If the values are not submitted by the browser, the server-side will not be able to set the property values corrects (because they're not available).

    Hope this helps.
    Geoffrey McGill
    Founder
  6. #6
    That helped a lot, thank you!

Similar Threads

  1. Replies: 1
    Last Post: May 12, 2012, 1:10 PM
  2. Replies: 2
    Last Post: Apr 12, 2012, 5:44 AM
  3. Replies: 2
    Last Post: Feb 01, 2012, 6:56 AM
  4. Replies: 1
    Last Post: Jul 07, 2011, 8:34 PM
  5. Convert FormPanel from Html-Code to VB.Net Code
    By stephan1985 in forum 1.x Help
    Replies: 1
    Last Post: Jan 27, 2010, 3:47 PM

Tags for this Thread

Posting Permissions