简体   繁体   English

绑定事件on单击asp.net中的引导程序按钮

[英]Binding events onClick on bootstrap buttons in asp.net

ok i'm new to bootstrap themes and all. 好的,我是引导主题和所有主题的新手。 I have downloaded a bootstrap template for the internet and trying to edit it for my personal project. 我已经为互联网下载了引导程序模板,并尝试为我的个人项目对其进行编辑。 I'm running it on asp.net framework. 我在asp.net框架上运行它。 I want to add some action when a bootstrap button is clicked in the cs file but can't find the way. 我想在cs文件中单击引导按钮但找不到办法时添加一些操作。 In the aspx file the button is declared as below: 在aspx文件中,按钮声明如下:

<div class="form-group">
                            <button type="submit" name="login" class="btn btn-primary btn-lg" required="required">Log In</button>
                        </div>

now I want to write some code about what should happen when this button is clicked but can't figure out how to do. 现在,我想编写一些代码,说明单击此按钮时会发生什么,但无法弄清楚该怎么做。

Just do like this: 就是这样:

<asp:Button ID="btnLogin" runat="server" class="btn btn-primary btn-lg" OnClick="btnLogin_Click" Text="Log in" />

You are pointing the class, so it seams to be the same 您正在指向该类,因此接缝是相同的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM