Lab 12
Lab 12
</div>
</div>
</div>
Note that the modal div has an id with “modal” value. Remember this id, you will use it later
when toggling modal popups.
11. Under Views/SessionValidation folder, open the Edit.cshtml view.
12. Locate the /*TODO: Add data attributes to toggle a modal popup to link project with
validation session */ comment and add data attributes to the button element as following
o data-toggle: modal
o data-target: #modal
o data-url: use @Url.Action helper to generate url for AddSessionValidationDetails
action in the SessionValidationController with route sessionValidationId having
value from Modal.Id.
13. in the scripts section, locate the portion of code that register an event handler for the
shown.bs.modal event :
Task 3: Running the application and testing partial rendering using ajax
1. Build the solution and ensure there are no errors.
2. Run the solution.
3. In the Application main menu, click Sessions.
4. In the Session validation list, edit any session. In the edit view press F12 to show the developer
toolbar; select the network tab.
5. In the Session details section, click “Associer projet” button and ensure a modal popup is shown
and that the content of the modal is set from the response of the XHR request (ajax request),
you can confirm that in the network tab of the developer toolbar.
6. In the modal popup, without filling any field submit the form and note that the jQuery validation
works correctly.
7. Type at least three characters (Ex:20/) in the Project input and ensure that the autocomplete
works correctly.
8. Submit the form and ensure that the selected project was linked correctly to session and that
the list was refreshed partially without refreshing the all page.
9. From the linked projects list, edit the added project, change the result and click save.
10. Confirm the list was refreshed asynchronously.
11. In the Session details section, click “Associer projet” button to link a new project to the
validation session.
12. In the project field select the same project and submit.
13. Make sure that the business message is displayed in the modal and that the modal has not been
closed.
14. In the linked projects list, click the delete icon button, ensure that the confirm message was
displayed as configured in the data-ajax-confirm attribute.
15. In the confirm dialog, click Ok and ensure that the project was deleted and that the list was
refreshed.
16. Close the browser.
Exercise 2: Improve Web App performance using Caching
Scenario
In this exercise, you will add explore different techniques to improve your pages response time
using Asp.Net Core caching options.