0

I have two applications and want to pass data within them. Both applications are on different domains and different technology.

Application-1: www.mydomain.com
Application-2: www1.mydomain.com (Notice the "www1")

Application-1 is in Classic ASP using hidden variables and forms. Application-2 is a SPA in AngularJS.

Requirement: Click on a link from classic ASP which navigates you to AngularJS. Clicking "Cancel" on AngularJS page should redirect you back to classic ASP page.

Problem: I can pass Classic ASP page URL in querystring but this page has 50 hidden form variables which I want to pass as well to AngularJS so that I can redirect back from AngularJS page with those form variables.

1 Answer 1

0

Since there is no issue parsing querystring parameters in Angular, is your issue more around how to easily pass the ~50 form items to your Angular app? If so, you can easily loop through the form elements and append them to a variable like so:

dim queryString

For Each item In Request.Form
   queryString = queryString & "&" item & "=" & request.form(item)
Next 

From there you would append the queryString to the end of your redirect and all of the form elements would be a part of the querystring.

Sign up to request clarification or add additional context in comments.

8 Comments

Except with that many parameters and values they are likely to exceed the maximum length of a URL.
There is no limit in the standard. Browsers do seem to limit, but it's in the tens of thousands of characters the modern ones. Don't know how likely that would be exceeded.
Not tens of thousands, it is 2048 characters for the entire URL if you want to support IE10 stackoverflow.com/questions/417142/…
Yeah I forget about IE. The others have much larger limits.
Thanks for the suggestions people. But, I don't really want to use Query String to pass data so what will be the other option to implement this?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.