May 19, 2016, 7:06 PM
Calling another controller to do it's job at current page.
Hello everyone.
I really enjoy my adventure with ext.net but I am simultaneously learning ASP.NET so my question might be a little wierd.
I am coding in EXT.NET MVC
What am I trying to achieve :
I want to have Desktop where user can decide what modules (windows mostly) one want to use.
Since user might want one of 100 modules, I can't imagine why I should put all direct methods to controller which manages the desktop. Thus I figured out that I can create one controller per module.
For example: let's create a window with one button and call it WindowA.
WindowA contains only one button and text area. After a button click I want the text area changed to "Text".
After a click on button system goes to a method in WindowAController does this change and then goes back to desktop. And after all this User sees window with a button and text area filled with "Text".
What problems I had :
I tried to use "RedirectToAction", it failed because of two reasons :
returning
Getting RedirectToRoute object and using
How to do it?
I don't know ASP.NET very well so I might be doing something bad if so, please tell me how to approach it in different way.
rgds
I really enjoy my adventure with ext.net but I am simultaneously learning ASP.NET so my question might be a little wierd.
I am coding in EXT.NET MVC
What am I trying to achieve :
I want to have Desktop where user can decide what modules (windows mostly) one want to use.
Since user might want one of 100 modules, I can't imagine why I should put all direct methods to controller which manages the desktop. Thus I figured out that I can create one controller per module.
For example: let's create a window with one button and call it WindowA.
WindowA contains only one button and text area. After a button click I want the text area changed to "Text".
After a click on button system goes to a method in WindowAController does this change and then goes back to desktop. And after all this User sees window with a button and text area filled with "Text".
What problems I had :
I tried to use "RedirectToAction", it failed because of two reasons :
returning
Redirect(Request.UrlReferrer.ToString());
as shown here redirected me to my desktop's Index controller, all of modules were loaded again so field was blank.Getting RedirectToRoute object and using
ExecuteResult(ControllerContext)
did nothing.How to do it?
I don't know ASP.NET very well so I might be doing something bad if so, please tell me how to approach it in different way.
rgds