I have to POST JSON data to a page and redirect to that page in ASP.NET MVC - asp.net-mvc-2

I have 2 pages "page1" and "page2".
onclick of a button in page1, i have to access 5 input control values and send to page2.
Load page2 with some data based on those input values.

In MVC the common scenario is posting data from page1 to your controller and then controller will redirect to page2 with updated data. You cannot post data directly between MVC views

Related

How IONIC NavController works, when nav.push components?

i have 3 pages in my Ionic 3:
first page : a tabs page which contains a list of articles.
second page: contains information detail of article and a button that will fire third page for commenting the article.
third page : contains a field for comment and a button to submit data to API Server.
the problem is i use navController.push to redirect back to the tabs page (first page) later user submitted the comment and after user commented like 5 articles my ionic application gets more more slow and crash. it really slows to open second page.
i assume that it because of navController.push, if user commented 5 articles n redirected back to first page it means that it will be like 5 stack of component in the stack list.
my question is NavController.push performs by reference or not? and what does make my application slow?
IONIC 3
Look at the documentation, nav controller has pop and popToRoot methods
Each time you push it will create new instance, but even 5 pages in the stack is nothing so probably you have some listeners in code with heavy logic
Look at Lifecycle events, specially in your root page you will probably need to implement ionViewWillEnter to reload articles

Prevent Component reloading - AEM

I have 2 pages in my web application. Lets say an home page and news feed page. When user clicks a hyperlink on home page then she/ he gets redirected to News feed page. I have 2 separate components in each page like
Home Page --- Header Component & Home Page Details Component.
News Feed Page --- Header Component & News Feed Details Component.
Both the pages has a common component Header. Can I prevent component reloading for the header component when users reaches the second page by clicking link on the first page.
By component reloading I mean the HTML code (HTL) code in the component should not be updated again with updated data instead for the second page, I just want to show the same data associated with header component in the first page.
A new page will always be loaded as a whole, because of just how [HTML] page loads work. What you are looking for is a single page application. They are possible with AEM but are a pain to design, especially the authoring mode behaviour.
This is a very common HTML pattern and possible duplicate of related questions such as: How to auto refresh a section of a page
There are two general approaches, the first being far preferred and supported in various frameworks, all based on JavaScript (AJAX):
Break page into different DIV tags that are independently updated (header separate from body sections, each loaded via AJAX such that only part of the page that has changed is updated).
Use iFrames such that effectively there are different pages - each loaded separately from the other.

Redirecting form to current browser url (ATG)

I have a form which is included on all the pages of our website. The dsp:form action attribute is same as the current page url. This works fine for most of our pages but fails when a user submits the form on a page where browser shows a seo friendly url.
For example when a user submits the form on one of our product pages www.mysite.com/products/prdName the page refreshes and redirects user to www.mysite.com/prodSpec/index.jsp
How can i keep user on the same browser url on form sumission?
TIA
Have you considered using therein property value /OriginatingRequest.requestURI as your successUrl value?
OriginatingRequest is a request-scoped component that represents the current HTTP request (specifically, the instance of DynamoHTTPRequest)

How to retain form values while navigating between different jsp in a struts application

I am developing a struts2 application , which includes user to input multiple data on different page.
For different page, i am using different JSP and for capturing data from each page, i have one formbean class.
I can see values are getting set in setters in formbean class when i navigate to another page. however, if enter data on page 1 , go to page 2 and again come back to page 1, the entered values are lost.
How to store values while navigating between different page. Number of fields on my page are many.
Thanks,
Josh

xPages-Notes-redirection-pagination : how to redirect to a certain page number of a paginated view?

I have a classical xPage with view panel (in a custom control) linked to a paginated view, which displays records.
I have more than one page to display. Each one has a key column defined as a link which sends the document to a form edition page.
Then in this page I update the record clicking a 'Save button' which redirects the user to the original view page (which URL has been stored in the sessionScope).
The problem is that it redirects to the first page and not the one which contained the record.
How can I specify the page number to display when coming back to the view page ?
I had to do something similar for one of my applications and instead of using the simple action to redirect to the XPage I used the context.redirectToPage which allowed me to pass the sessionScope variable I had stored with the below code.
var url:XSPUrl;
URL = context.getUrl();
sessionScope.put('your scope name',#RightBack(url.getPath().toString(),"/"));