[CLOSED] Calling a code-behind function from my aspx page

  1. #1

    [CLOSED] Calling a code-behind function from my aspx page

    Hi,

    I had this code before and for some reason it's not working now. It won't call the MyLanguage function which is in my code behind. Did something change on that level? I didn't see anything in the changelog notes about that.

                    <ext:Panel ID="pnlTimestamps" runat="server" Border="false">
                        <Content>
                            <div style="width:auto;font-size:10px;font-family:Arial,Helvetica;" align="center"><b><% If MyLanguage().Equals("F") Then %>Créé:<% Else %>Created:<%End If%></b> 
                                <ext:Label ID="lblCreateUserID" runat="server" Text="" />&nbsp;&middot; 
                                <ext:Label ID="lblCreateTimestamp" runat="server" Text="" />
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b><% If MyLanguage().Equals("F") Then %>Modifié:<% Else %>Last Updated:<%End If%></b> 
                                <ext:Label ID="lblUpdateUserID" runat="server" Text="" />&nbsp;&middot; 
                                <ext:Label ID="lblUpdateTimestamp" runat="server" Text="" /></div>
                        </Content>
                    </ext:Panel>
    Here is the MyLanguage function:
        Protected Function MyLanguage() As String
            If FollowMe.GetCurrentLanguage() = Language.French Then
                Return "F"
            Else
                Return "E"
            End If
        End Function
    Thanks,
    Bert
    Last edited by Daniil; Jul 11, 2011 at 9:39 AM. Reason: [CLOSED]
  2. #2
    Hi,

    This technique works fine in the example below.

    Example

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected bool IsTrue(bool b)
        {
            return b;
        }
    </script>
    
    <!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>Ext.Net Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Panel runat="server">
                <Content>
                    <% if (IsTrue(true)) { %>True<% } else { %>False<% } %>
                    <br />
                    <% if (IsTrue(false)) { %>True<% } else { %>False<% } %>
                </Content>
            </ext:Panel>
        </form>
    </body>
    </html>
    Can you provide your test case to reproduce the problem?

Similar Threads

  1. Replies: 5
    Last Post: Oct 23, 2012, 2:19 PM
  2. Replies: 7
    Last Post: Jul 31, 2012, 8:31 PM
  3. calling aspx page in tabpanel
    By hsmukunda in forum 1.x Help
    Replies: 1
    Last Post: Oct 04, 2011, 4:29 PM
  4. [CLOSED] Calling a Javascript function of Child page from Popup (inside Frame)
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 27, 2011, 6:00 AM
  5. [CLOSED] Calling js function from parent page
    By Hari_CSC in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: May 03, 2010, 10:50 AM

Posting Permissions