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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:12:55+00:00 2026-05-11T19:12:55+00:00

Good Day, We have migrated our web application to ASP.NET 2.0 from ASP.NET 1.1.

  • 0

Good Day,

We have migrated our web application to ASP.NET 2.0 from ASP.NET 1.1.

We have a page that contains a couple of textboxes with their respective Validators.

On .NET 1.1, when a textbox contains an INVALID value, clicking on the “submit” button, will not produce a postback (E.G. Nothing will happen).

However, when we migrated to .NET 2.0, even if there is an INVALID value, the postback will still happen. (E.G. Pressing the “submit” button will perform a postback).

Is there an issue with validation when migrating from 1.1 to 2.0?

Additional Infos:
The “submit” button is an input button:

<input type="button">

Using an <asp:button> in place of the <input> button will work and will fix the problem. However, the <input type="button"> has the capability to call a javascript that will produce a “Wait… Loading” label overlay on the page. Using the asp:button, the “Wait… Loading” overlay javascript will NOT be invoked.

EDIT: Real problem and solution.

Anyway, the real problem is that the on-click validation javascript was broken during migration.

The original and working script is:

<input language="javascript" onclick="{if (typeof(Page_ClientValidate) != 'function' ||  Page_ClientValidate()) __doPostBack('m_bt_Save','')} " name="m_bt_Save" id="m_bt_Save" type="button" value="Save" width="80px" height="24px" />

But ASP.NET 2.0 changed it to:

<input onclick="if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate(''); __doPostBack('m_bt_Save','')" name="m_bt_Save" type="button" id="m_bt_Save" value="Save" width="80px" height="24px" />

So the my solution was, change the INPUT button to an ASP:button, then add the attribute doing page load with the correct ASP.NET 1.1 javascript validation like so:

m_bt_Save.Attributes.Add("OnClick", "if (typeof(Page_ClientValidate) != 'function' ||  Page_ClientValidate()) __doPostBack('m_bt_Save','')");
  • 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-11T19:12:55+00:00Added an answer on May 11, 2026 at 7:12 pm

    One thing you can do, is you can just add your JS that you need to the button.

    Button1.Attributes.Add("OnClick", "do my js stuff here");
    

    That will allow you to have the exact same functionality as the input, and it makes it work.

    Otherwise, my guess is that you will need to modify the way the input button submits to call the validate page method before it does the from submit.

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

Sidebar

Related Questions

Good Day, I have created an asp.net web service on my local machine, and
Good day, I have a ASP.net MVC app that needs to upload files to
Good day all, I have written an application that i require to have a
Good day to you guys I have an application that has a UITabBarController for
Good day, I have a problem in a .NET page where I am using
Good day, I have a script in PHP that gets contents from a URL.
Good day, I have one theoretical question. I have an application that run some
Good day to all, I have an application that creates a report for daily
Good day I have a custom TextBox that has a IndicatorTextBox.ui.xml file as well
Good day, I have a class that implements the LoaderCallbacks, and hence have the

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.