Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
Redirect To Static Html Page
Yogesh Vedpathak
Dec 25 2017 3:59 AM
145
Reply
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();
}
}
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
How to integrate Facebook & google for Login with websites ?
3D in c# windows form