+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Sitefinity Mvc page redirection issue.

Sitefinity Mvc page redirection issue.

11 posts, 0 answered
  1. Balanjaneyulu
    Balanjaneyulu avatar
    35 posts
    Registered:
    11 Feb 2016
    05 Jul
    Link to this post
    Hi All,

    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.

    https://drive.google.com/open?id=0B1Z7d8OTSWR4b2NXWkM1bG8tejA

    Please let me know if need more information.

    Thanks,
    Balu
  2. Victor Leontyev
    Victor Leontyev avatar
    65 posts
    Registered:
    01 Jul 2014
    05 Jul in reply to Balanjaneyulu
    Link to this post

    Hi Balu.

    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

     

  3. Balanjaneyulu
    Balanjaneyulu avatar
    35 posts
    Registered:
    11 Feb 2016
    05 Jul
    Link to this post
    Hi Victor,

    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?

    Thanks,
    Balu
  4. Victor Leontyev
    Victor Leontyev avatar
    65 posts
    Registered:
    01 Jul 2014
    05 Jul in reply to Balanjaneyulu
    Link to this post

    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

  5. Balanjaneyulu
    Balanjaneyulu avatar
    35 posts
    Registered:
    11 Feb 2016
    11 Jul
    Link to this post
    Hi Victor,

    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.

    Thanks,
    Balu
  6. Balanjaneyulu
    Balanjaneyulu avatar
    35 posts
    Registered:
    11 Feb 2016
    23 Jul
    Link to this post
    Hi Victor,

    Can you please provide some more info on this issue?

    Thanks,
    Balu
  7. Victor Leontyev
    Victor Leontyev avatar
    65 posts
    Registered:
    01 Jul 2014
    25 Jul in reply to Balanjaneyulu
    Link to this post

    Hi Balu. Sorry for late response.

    Inside your controller instead redirecting return View.

    Please, replace

    return RedirectToAction("CorticonIndex",controllerName)

    to

    return CorticonIndex()

     

  8. Balanjaneyulu
    Balanjaneyulu avatar
    35 posts
    Registered:
    11 Feb 2016
    25 Jul
    Link to this post
    Hi Victor,

    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.

    FYI.

    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.

    Thanks,
    Balu
  9. Telerik Admin
    Telerik Admin avatar
    188 posts
    Registered:
    02 Oct 2004
    28 Jul
    Link to this post
    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
  10. Balanjaneyulu
    Balanjaneyulu avatar
    35 posts
    Registered:
    11 Feb 2016
    29 Jul in reply to Telerik Admin
    Link to this post
    Hi Nikola,

    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?

    Thanks,
    Balu


  11. Telerik Admin
    Telerik Admin avatar
    188 posts
    Registered:
    02 Oct 2004
    29 Jul
    Link to this post
    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
11 posts, 0 answered