CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2006
    Posts
    170

    Question How to check if javascript has run in codebehind ( c# )?

    codeInfront:
    Code:
    <input type="button" onclick="JavaScript:clearSelections();" name="clear" value="Delete"/>
    codeBehind:
    Code:
    public void Page_Init( object sende, System.EventArgs e )
    {
       if( ?input button has been klicked? )
       {
           .....
       }
    }
    In my code behind I want to reset an object when the button has been klicked. But how can I see if that has happened?

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: How to check if javascript has run in codebehind ( c# )?

    Remember that code behind is on the server-side. You will have to submit the page in order for information to go back to the server.

    Are you attempting to reset HTML objects on the client-side, or server-side? If client-side, I would suggest using JavaScript instead.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

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