I've got a web site that was using the masterpage concept and after finding those wonderful updatepanels i started a rebuild and i found a website very user friendly where the user dont see any postback while interacting with it. Great.
The thing is, that after doing it i found myself trying to do the same while changing through the .aspx pages as a fact using masterpages i get a full reload to the next page, so after reading some articles on the internet i started to doing a load of the .aspx in a div container. And i did it i switch pages with the <a> and the content is loaded on the div, that's very good, but i'm now in a deep challenge that i don't know how to solve it,i need to press "enter" and the page refresh to get a, for example, a button click working with the server code like my controls need a postback.
I thought to try to do a full asyncpostback after loading the .aspx to the div, but i dont know how to do it even if it will work.
I really dont want to rebuild my whole page to a new approach like MVC or SPA, i like the flexibility i have with the webforms, just need them to go to one to another smoothly, and i think that im close seeing those div's loading. I'm not an expert or something like that but somehow i think the thing is the viewstate maintains and the controls are atached to the first page i dont know if i am saying anything stupid.
If i tried to change the form action to the new page i can get a post without coming backwards but the controls(buttons) dont do the right thing until aenter, reload.
I ask if is really necessary a full reload... or if something like a full asyncpost will do the trick, and i get new full new page while loading it into a content div. I use pushstate to change the link like is said in pjax. But what i read about pjax don't show me examples that use .aspx files with codebehind code.
Should this help: can you do an asynchronous postback without an update panel? | The ASP.NET Forums ?
Any help, would be great, even if to show another way to do the pages switching. Tks in advance.