Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6068033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:40:20+00:00 2026-05-23T09:40:20+00:00

ASP.net Page <script type=text/javascript language=javascript> function show_confirm() { var r = confirm(Are you sure

  • 0

ASP.net Page

        <script type="text/javascript" language="javascript">
            function show_confirm() {
                var r = confirm("Are you sure you want to Save this Transaction");
                if (r == true) {
                    $('#<%=btnConfirm.ClientID%>').click();
                }
                else {
                }
            }
        </script>

   <asp:Content ID="detailContent" ContentPlaceHolderID="mainContentPlaceholder"
    runat="server">   
     <asp:LinkButton ID="LinkButton1" runat="server"
                 CssClass="primary positive big button" OnClientClick="return show_confirm();return false"><span class="check icon"></span>Save Transaction</asp:LinkButton> 
            <asp:Button ID="btnConfirm" runat="server" Style="display: none;" onclick="btnConfirm_Click"/>
</content>

This will trigger btnConfirm click if the User click yes on the popup message box.

on page view Source on IE

<a onclick="return show_confirm();return false;" id="ctl00_mainContentPlaceholder_LinkButton1" class="primary positive big button" href="javascript:__doPostBack('ctl00$mainContentPlaceholder$LinkButton1','')">
<span class="check icon"></span>Save Transaction</a> 
<input type="submit" name="ctl00$mainContentPlaceholder$btnConfirm" value="" id="ctl00_mainContentPlaceholder_btnConfirm" style="display: none;" />

Thanks in Regards

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:40:20+00:00Added an answer on May 23, 2026 at 9:40 am

    show_confirm() function does not return a Boolean Value. It should return a value to work properly.

    Why not do it simply like the following, it will do what you are looking for.

    <asp:LinkButton ID="LinkButton1" runat="server"
         CssClass="primary positive big button" OnClick="LinkButton1_Click"
         OnClientClick="return confirm('Are you sure you want to Save this Transaction');">
         <span class="check icon"></span>Save Transaction </asp:LinkButton>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET page which has a script manager on it. <form id=form1
I've got some trouble with jQuery script on my Asp.net page. During first load
ASP.NET 2.0 provides the ClientScript.RegisterClientScriptBlock() method for registering JavaScript in an ASP.NET Page. The
I have a asp.net page, and would like to know whether script1 is already
I have a ASP.NET page with an asp:button that is not visible. I can't
I'll have an ASP.net page that creates some Excel Sheets and sends them to
I have an ASP.Net page that will be hosted on a couple different servers,
During an ASP.NET page load I'm opening and closing multiple System.Data.SqlClient.SqlConnections inside multiple controls
I have a ASP.Net page using ADO to query MS access database and as
I am having an ASP.net page in my page i am having this as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.