Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How a SPA application works ?
1. Can i create SPA using asp.net ?
2.For below scenario can i use SPA
Application with one Home page. When user clicks on Login redirect to User page.

Can i do these kind of application using SPA? In above scenario we have two pages HOME and USER Page, so how to do this using SPA ?
I think SPA means single page application so that it will have only one page.So if more than one page is there, how to use SPA ?
Posted

1 solution

1 Yes[^]

2 You can achieve that functionality, but there would be no page redirection. If the user is not authenticated you'd see a login component on the page, and if they are authenticated you'll see your normal site components on the page.
 
Share this answer
 
Comments
Am Gayathri 23-Mar-15 9:19am    
That means if the user is authenticated we need to change the components in the page ?

Can i say like the applications like Facebook is not a SPA since when the user logged in it will redirect you to another page. Application like MSDN or amazon is a SPA because when the user logged in it wont redirect another page but it will change some components(Ex: It may hide login button instead of that it may show logged in user name).

tell me that my understanding is correct or wrong ? just explain.

very much thanks in advance.
F-ES Sitecore 23-Mar-15 9:22am    
Yes if the user is authenticated you need to alter what appears on the page. Neither MSDN nor Amazon are SPAs, showing or hiding the odd thing based on conditions doesn't make your site an SPA. If the url in the address bar never changes it could be considered an SPA.
Am Gayathri 23-Mar-15 9:25am    
So SPA applications will have only one page. We need to modify page content (like hide some controls, hide div , show some other controls etc). Everything should happen in same page.
Then it wont be suitable for large applications right ?
Sergey Alexandrovich Kryukov 23-Mar-15 10:47am    
Basically, that's the answer, 5ed; I recommend the inquirer to accept it.
—SA
Am Gayathri 1-Apr-15 2:43am    
Accepted :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900