CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2009
    Posts
    3

    How to implement javascript on button, C#?

    Hi,

    I would like to implement a javascipt prompting user when they click on the button. For e.g. "Do you really want to enter?"

    Thanks.

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: How to implement javascript on button, C#?

    Is this on a Web Application or a Windows Forms Application ¿

  3. #3
    Join Date
    Sep 2009
    Posts
    3

    Re: How to implement javascript on button, C#?

    Web application

  4. #4
    Join Date
    Sep 2008
    Location
    Netherlands
    Posts
    865

    Re: How to implement javascript on button, C#?

    You've should have posted this question in the ASP.NET forum.

    Anyway, the answer
    Code:
    <asp:Button ID="Button1" runat="server" OnClientClick="return confirm('Do you really want to enter?');" Text="Button" />

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured