I am using Ajax within MVC to render some partial views and have come across a weird problem. Once I click a tab which submits ajax.beginform to render the tab as a partial view, the following happens:
- from the ajaxOptions, the OnBegin function is called.
- after this it is supposed to go to the function inside the controller which is specified in the BeginForm. However it does not reach that function in the controller and keeps “searching” for the function or gets stuck somewhere.
At first this happened with the ajax calls for just one particular tab. However, afterwards the same problem occurrs when I click on a link (ActionLink) to a particular function in a controller which should render an Index view (.aspx view) that contains some ajax forms. This also never reaches the function in the controller even though it is not an ajax call but an ActionLink. Since this does not reach the function and hence does not see the Index View which contains the ajax forms, therefore can it even be an ajax problem? Though it is clear this problem started after adding the ajax forms.
The weird thing about this is that it only happens sometimes, and initially occurred when a change was made in the controller. After one or a couple of restarts of Visual Studio it normally worked fine. We have also tried deleting temporary asp.net files which also seems to work, but to do this we also restart VS. This problem also exists on the server, and is normally there after a release though randomly without doing anything it starts working fine.
Does anyone have any idea as to what may be going on here?
And does anyone know if there is a way to debug and see where exactly it goes after an ActionLink is selected if it does not reach the function?
Thank you for your response in advance.