如何在弹出页面按钮后面编写代码 [英] How to write code behind to the popup page button

查看:73
本文介绍了如何在弹出页面按钮后面编写代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在asp.net中使用java脚本创建一个登录页面作为弹出页面。但是当我尝试为提交按钮编写代码时,如何用数据库来修改数据



Hi, am tryng to create a login page as popup page using java script in asp.net i done it. but when i try to write the code behind for the submit buttoni cant how tocheck the data with the database

<li><a href="#login-box" class="login-window">Login</a></li>
                                 <div id="login-box" class="login-popup">
                                    <a href="#" class="close"><img src="close_pop.png" class="btn_close" title="Close Window" alt="Close" /></a>
                                    <form method="post" class="signin" action="#">
                                        <fieldset class="textbox">
                                        <label class="username">
                                        <span>Username or email</span>
                                        <input id="username" name="username" value="" type="text" autocomplete="off" placeholder="Username"/>
                                        </label>
                                        <label class="password">
                                        <span>Password</span>
                                        <input id="password" name="password" value="" type="password" placeholder="Password"/>
                                        </label>

                                        <button class="submit button" type="button" >Sign in</button>
                                        <%--<p>
                                        <a class="forgot" href="#">Forgot your password?</a>
                                        </p>   --%>
                                        </fieldset>
                                    </form>
                                </div>





当我小鸡登录链接弹出窗口打开并且登录页面是diplaying但如何编写后面的代码对于页面



when i chick the login link popup will open and login page is diplaying but how to write the code behind for the page

推荐答案

1.是ASP.NET,通常后面的代码与现有的ASPX控件链接,因此对于一个按钮,你应该使用一个ASPX按钮,如下一个例子:

1.Is ASP.NET the code behind normally is linked with an existing ASPX control, so for a button you should use an ASPX button like in the next example:
<asp:Button ID="_cancelButton" runat="server" autopostback="False" Width="80px" Text="Cancel" OnClientClick='OnCancel();' />



2.对于您的情况,我建议使用 ASP.NET AJAX Control Toolkit 。你可以在我的下一篇文章中看到一个使用它的例子:高级ASPX GridView分页和数据实体 [ ^ ]。从我的文章中提供的代码可以扩展到一个真实的应用程序,我也提供了指导步骤。


2.For your case, I recommend to use ASP.NET AJAX Control Toolkit. You could see an example of using it in my next article: Advanced ASPX GridView Pagination and Data Entities[^]. The provided code, from my article, could be extended for a real application and I provided also guiding steps for doing this.


使用


.ajax ()点击提交按钮点击,这将有助于你在代码中调用方法

喜欢
.ajax() on Submit button click that will help you to Call method in code
like


这篇关于如何在弹出页面按钮后面编写代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆