At the moment we are extending a classic asp website and a new ASP.NET CMS (let it be website A) is a main part of this upgrade. However significant part of that old ASP website (let it be website B) remains intact and that part is going to serve authorised users only. There is a catch with these requirements – login page to website B should be part of the website A. Ideally website B code should not be changed. These 2 websites ate technically different and belong to different domains.
I’ve found a nice way (and I think elegant enough) to implement these requirements. It may be clearer if displayed in these steps:
New form tag
As ASP.NET pages already contain a default form tag, I’ve created another one just above the normal ASP.NET . The purpose of this form is to submit (http post) data straight to another website.
AJAX login validation
Instead of normal ASP.NET form validation use a javascript based AJAX validation – when Submit button is pressed, go server side with AJAX and check if user name and password are valid. If not – display a message as normal, if it is valid – go to the next step.
Javascript form submit
Use javascript/jquery to insert values into loginForm form inputs and then submit loginForm dynamically. The other website would process your http post request as normal and accept your login credentials.
Related posts:
- Transparent login between ASP.NET web sites
- ASP.NET Button – prevent double clicks
- Is your web site cross browser compatible?
- 10 Tips for user acceptance testing of web applications
- PaceDG Website Launch
Tags: asp.net





