asp.net mvc - Redirect to another any episerver page from MVC controller? -


how redirect page (eg home) mvc controller in episerver? eg after login - redirect start page.

to redirect mvc action:

public actionresult index() {     return redirecttoaction("index", "home"); } 

redirect configured start page of site:

public actionresult index() {     pagedata startpage =         servicelocator.current.getinstance<icontentrepository>().get<pagedata>(contentreference.startpage);      // url of start page     string startpageurl = servicelocator.current.getinstance<urlresolver>()                 .getvirtualpath(startpage.contentlink, startpage.languagebranch);      return redirect(startpageurl); } 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -