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 8653759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:37:09+00:00 2026-06-12T14:37:09+00:00

Hey all I am designing a website in ASP.net from a PHP designed site.

  • 0

Hey all I am designing a website in ASP.net from a PHP designed site. They do their form checks via JavaScript and then submit all data via Ajax if it passes validation.

Is it possible to fire off a piece of JavaScript from a submit button via code behind and read the returned value before I process to either postback to save the data or do nothing until the user corrects the fields indicated by the JavaScript?

  • 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-06-12T14:37:11+00:00Added an answer on June 12, 2026 at 2:37 pm

    If you are doing the validation in javascript, i would make a hidden submit button that gets clicked by the javascript button if the validation passes:

    <input type="button" value="validate" onclick="Validate()" />
    
    <asp:Button ID="aspButton" class="aspButton" OnClick="CodeBehindMethod" style="display: none;" />
    
    
    <script>
    function Validate() {
        //if validation passes
        $(".aspButton").click(); //This is the reason for the class on this button, since                       
                                 //asp buttons have huge long stupid id names
        //else do some kind of error notification
    }
    
    </script>
    

    If you are validating in code behind, then why not just use a post back from a submit button?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey all, have been working on designing a new database for work. They have
Hey all. I'm reading from one sql-format file to another, and two bytes in
Hey all i am new at classes and arrays in php but need to
Hey all i have the following query: SELECT REPLACE(REPLACE(REPLACE(REPLACE(tmpTable.Caller_Number,'-',''),'(',''),')',''),' ','') FROM tmpTable WHERE EXISTS
Hey all i am trying to delete a key from the registery but i
Hey guys. I'm designing a site that uses the Icefaces framework. I've been reading
Hey all I want to reseed my IDENTITY COLUMN values starting from 1 I
Hey all this is the first time i am calling a stored procedure via
hey all my question about how the developers makes their interface the buttons, slider,
Hey all, I would like some advice from the programming community. I am building

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.