I have a master page with name 'principal.Master'. And a form created using the master - 'index.aspx'
I have added the following to 'principal.Master'
<asp:LinkButton id="myid" runat="server" OnClick="LogOut" class="btn btn-default btn-flat" >Sign Out </asp:LinkButton>
But when the link is clicked on 'index.aspx', the function LogOut in 'principal.Master.cs' is not triggered.
Why is this happening? What could be the alternate approach?
请改用ASP按钮,然后检查按钮的放置位置。
<asp:Button runat="server" onclick="Logout" CssClass="btn btn-default btn-flat" id="btnLogout" />
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.