Transfer data across the page

开发工具与关键技术:vs2015  MVC
作者:陈星宇
撰写时间:2019.6.1

When we click on the line, you need to jump to the page for information about how we need to pass across the page ID's.
For example, for example, we choose a college, you want to see information about the grades at college, so we chose to institute click the button he will jump to the next year related to the college.
Here Insert Picture Description
Let's get to the button's ID and then give him a click event, then checkStatus () method to get into the college of our choice.
Here Insert Picture Description
After acquiring the data to, we have to determine whether to acquire the data, if no response is received, indicating that we are viewing is not clicked School of Information, then we need to give respect to the prompt.
If you choose to use the data we href at the location () method of the page jump, jump when it took delivery of our past ID.
Here Insert Picture Description
The method of data transfer from the first to the view controller receives college ID we just passed, then the ID to pass to the view controller method, yet to this view.
We need some way to help and then passed from the controller to the grades page, where we spent ViewBag to transfer data.
Here Insert Picture Description
Then we pass reception in the view of the way with ViewBag college ID.
Here Insert Picture Description
So the basic operation of a cross-page data transfer is complete.

Guess you like

Origin blog.csdn.net/tianxiu11/article/details/90758668