Sitefinity Mvc page redirection issue.
I have developed a page using custom Mvc Sitefinity widgets say Corticon Form Widget and Simple Response Widget.
Here, I fill the Corticon form date and click submit button, then the response will be placed on the same page.
Again I fill the date and click submit button then I was getting an error message as “The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.”
Can someone please help me how to resolve this issue?
Below is the recorded video on above issue for better understand.
Please let me know if need more information.
As i can understand from video, Problem is that first time you submitting the form to /insurance/skydive and second time you trying to submit form to /insurance/skydive/cortionindex url
You are correct.
I was calling Simple Corticon Response Action Result from form submit action result so the URL was changing to /insurance/skydive/cortionindex.
How can I submit form with different inputs?
You have two options:
1) Avoid changing url. Don't redirect to cortionindex, just return necessary view
2) Specify correct action path into your <form> tag
Thank you for your inputs. However, I couldn’t get the solution.
In my response widget, I was returning only view but the same issue happening.
If possible, can you please share code snippet on this issue.
Can you please provide some more info on this issue?
Hi Balu. Sorry for late response.
Inside your controller instead redirecting return View.
I am happy that you have commented.
As per my understanding, you are returning the view. If I use return CorticonIndex (), it gives an error message "CorticonIndex ()" doesn’t exist.
I was redirecting/calling CorticonIndex() of "CorticonResponse" controller from “CorticonForm” Controller with below code snippet.
return RedirectToAction ("CorticonIndex”, CorticonResponse")
And Inside CorticonResponseController, returning CorticonResponse view with CortsiocnResponseModel as parameter.
Hello, I suppose the problem is not how the result is returned but how the submit link is generated. Could you please share the code you use for the submit button? Which widget is handling and "ConrticonIndex" action? Regards, Nikola Zagorchev Telerik by Progress
Thank you for your comment. The issue got resolved.
I have removed Index () method in FormController and modified CorticonIndex action name as Index () and decorated with HttpPost.Now, when I submit form, controller goes to Action () of CorticonResponse controller.
Is it possible to get FormController properties inside Action () method of ResponseController?
Hello, The control properties are saved in the database and loaded with the control. The different controls are not supposed to know about each others properties. If you need to pass some of the property values, I recommend doing this through the Model and the form to submit to the other Controller. Regards, Nikola Zagorchev Telerik by Progress