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

Forums / Developing with Sitefinity / Front end page - response.redirect

Front end page - response.redirect

3 posts, 1 answered
  1. Dave Mateer
    Dave Mateer avatar
    15 posts
    Registered:
    07 Apr 2010
    29 Jul 2010
    Link to this post
    Hi

    I've created a custom page on the front end.. which does some CRUD stuff.

    However after that is done I would like to redirect to a thank you page, 

    Response.Redirect("~/thanks.aspx");

    Is there a better way of doing this.. eg like the back end:

    Response.Redirect(CreateHostViewCommand("MaterialsListView", null, null));

    protected void InsertMaterial()
        {
            var db = new Materials.MaterialsDataClassesDataContext();
            Material material = new Materials.Material();
            material.MaterialTypeId = new Guid(ddlMaterialType.SelectedValue);
            // blah
      
            db.Materials.InsertOnSubmit(material);
            db.SubmitChanges();
     
            Response.Redirect("~/");
        }


    Regards

    Dave
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    29 Jul 2010
    Link to this post
    Hello Dave Mateer,

    HostView commands and routes can be used only for the backend. Using Response.Redirect looks fine for the font end.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  3. Dave Mateer
    Dave Mateer avatar
    15 posts
    Registered:
    07 Apr 2010
    29 Jul 2010
    Link to this post
    Thanks Ivan.
Register for webinar
3 posts, 1 answered