[CLOSED] LoginView with LinkButton

  1. #1

    [CLOSED] LoginView with LinkButton

    Hi,

    I have almost the same error as the thread bellow. The difference is that I am using a linkbutton insde the anonymous template.

    http://forums.ext.net/showthread.php...oginView/page2

    Thanks

    <%@ Page Language="C#" %>
      
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
      
    <script runat="server">
        protected void TestDirectEventHandler(object sender, DirectEventArgs e)
        {
            X.Msg.Alert("DirectEvent", e.ExtraParams["test"]).Show();
        }
    </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 id="Head1" runat="server">
        <title>Ext.NET Example</title>
    </head>
    <body>
        <form id="Form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" />
            <asp:LoginView ID="LoginView1" runat="server">
                 
                <LoggedInTemplate>
                    <ext:HyperLink ID="Button1" runat="server" Text="Click Me">
                        <DirectEvents>
                            <AfterRender OnEvent="TestDirectEventHandler">
                                <EventMask ShowMask="true" />
                                <ExtraParams>
                                    <ext:Parameter Name="test" Value="Hello!" />
                                </ExtraParams>
                            </AfterRender>
                        </DirectEvents>
                    </ext:HyperLink>
                </LoggedInTemplate>
            </asp:LoginView>
        </form>
    </body>
    </html>
    Last edited by Daniil; Jul 06, 2012 at 3:37 PM. Reason: [CLOSED]
  2. #2
    Hi,

    The controls within LoggedInTemplate cannot be found in a standard way.
    http://weblogs.asp.net/sukumarraju/a...w-control.aspx

    We would suggest to set up AfterRender listener + DirectMethod calling instead of the AfterRender DirectEvent.
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi,

    The controls within LoggedInTemplate cannot be found in a standard way.
    http://weblogs.asp.net/sukumarraju/a...w-control.aspx

    We would suggest to set up AfterRender listener + DirectMethod calling instead of the AfterRender DirectEvent.
    Would beforerender be ok?

    Thanks
  4. #4
    Well, it might depend on the logic you need to implement.

    For your simple example the BeforeRender listener should be ok.

Similar Threads

  1. [CLOSED] Error with DirectEventin LoginView
    By marco.morreale in forum 2.x Premium Help
    Replies: 14
    Last Post: Apr 23, 2012, 2:07 PM
  2. [CLOSED] Button in a listview with a loginview
    By SouthDeveloper in forum 1.x Premium Help
    Replies: 10
    Last Post: Nov 18, 2011, 12:00 PM
  3. [CLOSED] underline LinkButton
    By majunior in forum 1.x Premium Help
    Replies: 4
    Last Post: Mar 03, 2011, 12:46 PM
  4. LinkButton Style
    By HzA in forum 1.x Help
    Replies: 0
    Last Post: Feb 08, 2011, 9:53 AM
  5. How to use LoginView with coolite
    By jidaneri in forum 1.x Help
    Replies: 2
    Last Post: Mar 11, 2010, 6:22 PM

Tags for this Thread

Posting Permissions