How to Redirect From Asp.net Mvc To Html Page
code is below
When I want click button Contact It will Redirect to Html Page
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Sendsms.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
public ActionResult About()
{
return RedirectToRoute("About.html");
}
public ActionResult Contact()
{
var staticPageToRender = new FilePathResult("~/Html/index.html", "text/html");
return staticPageToRender;
// return View();
}
}
}

Yogesh VedpathakPosted Dec 25, 2017, 11:15 PM
Laxmidhar SahooPosted Dec 25, 2017, 5:03 AM