你确定在asp.net中有消息吗 [英] Are you sure message in asp.net

查看:77
本文介绍了你确定在asp.net中有消息吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,朋友朋友.

我的页面上有一个超链接.当我单击此超链接(注销)时,我需要使用是"和否"按钮显示一条消息( r u 您确定要注销)

这是我的代码.

  • 注销
  • Hi frnds friends.

    I have a hyperlink on my page. When I click this hyperlink(Logout) I need a message (r u Are you sure you want to logout) with YES and NO button

    This is my code.

    • Logout
    • 推荐答案

      尝试一下:

      Try this:

      OnClientClick="return confirm(''Are you sure you want to Logout ?'');"



      将此添加到HyperLink或链接按钮



      Add this to HyperLink or link button



      试试这个希望对你有帮助的
      Hi ,
      try this hope it help
      <script type="text/javascript">
              function confirmation() {
                  if (confirm('are you sure you want to logout?')) {
                  return true;
                  }else{
                  return false;
                  }
              }
          </script>


      <asp:button id="Button1" runat="server" text="Button" xmlns:asp="#unknown">
              OnClientClick="return confirmation();" onclick="Button1_Click"/></asp:button>


      最好的问候
      M.Mitwalli


      Best Regards
      M.Mitwalli


      You use the code in such a fashion , might be work.........<pre lang="c#">
      
      
      OnClick ="return confirm(''Are you sure you want to Logout ?'');"


      这篇关于你确定在asp.net中有消息吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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