views:

41

answers:

1

i have my login in a fancybox and fancybox div is in a controller. problem is if click the button nothing happens event isnt fired. this is my controller.ascx

<div id="inline1" style="width:400px;">
<ul class="forms">
    <li class="inputfield"><asp:TextBox ID="kullanıcı_adi" runat="server"></asp:TextBox></li>
</ul>
<ul>
    <li><asp:TextBox ID="sifre" runat="server"></asp:TextBox></li>
</ul>
<ul>
    <li>
        <asp:Button ID="Button1" runat="server" Text="Giriş Yap" 
            onclick="Login_Authenticate" />
        <asp:Button ID="Button2" runat="server" Text="Vazgeç"/>
    </li>
</ul>
    </div>

and this is my cotroller.ascx.cs

    protected void Login_Authenticate(object sender, EventArgs e)
    {
        bool authenticated = AuthenticateMe(kullanıcı_adi.Text, sifre.Text, true);

        if (authenticated)
        {
            FormsAuthentication.RedirectFromLoginPage(kullanıcı_adi.Text, true);
        }
    }

and this is the default.aspx

<li class="gallery"><a id="various1" href="#inline1">Üye ol/Giriş Yap</a></li>

<div style="display: none;">
    <co:c_login ID="id_c_login" runat="server" EnableViewState=true />
</div>

I found the solution. Same question asked before. http://stackoverflow.com/questions/2686362/fancybox-asp-net-button-not-working Thank you for your answers.

A: 

See my blog post for the answer:

Have Colorbox Overlay work in an Asp.net Form

Markive
Agh, I've just seen yours is fancy box.. I assume it's the same issue though, the overlay is added to the DOM outside of the <form /> tag so the button won't fire.
Markive