CSS

Easiest way to Add Banner in Website in ASP.NET

banner-in-asp.net
Written by TechPro Free

Create Controller or use already created “Controller” in ASP.NET

 

Controller: 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace WebApplication2.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}

public ActionResult About()
{
ViewBag.Message = “Your application description page.”;

return View();
}

public ActionResult Contact()
{
ViewBag.Message = “Your contact page.”;

return View();
}
}
}

 

 

CSHTML Code:

@{
ViewBag.Title = “Home Page”;
}

<div class=”col-lg-12″>

<div class=”col-lg-12″>

<div id=”my-carousel” class=”carousel slide” data-ride=”carousel”>
<!– Indicators –>
<ol class=”carousel-indicators”>
<li data-target=”#my-carousel” data-slide-to=”0″ class=”active”></li>
<li data-target=”#my-carousel” data-slide-to=”1″></li>
<li data-target=”#my-carousel” data-slide-to=”2″></li>
</ol>

<!– Wrapper for slides –>
<div class=”carousel-inner” role=”listbox”>
<div class=”item active”>
<img alt=”First slide” src=”~/Images/Banner/oop.jpg”>
<div class=”carousel-caption”>
<h3>Heading of Your Banner</h3>
<p>Put Detail Here; For Public.</p>
</div>
</div>
<div class=”item”>
<img alt=”Second slide” src=”~/Images/Banner/oop.jpg”>
<div class=”carousel-caption”>
<h3>Heading of Your Banner</h3>
<p>Put Detail Here; For Public</p>
</div>
</div>
<div class=”item”>
<img alt=”Third slide” src=”~/Images/Banner/oop.jpg”>
<div class=”carousel-caption”>
<h3>Heading of Your Banner</h3>
<p>Put Detail Here; For Public.</p>
</div>
</div>
</div>

<!– Controls –>
<a class=”left carousel-control” href=”#my-carousel” role=”button” data-slide=”prev”>
<span class=”glyphicon glyphicon-chevron-left” aria-hidden=”true”></span>
<span class=”sr-only”>Back</span>
</a>
<a class=”right carousel-control” href=”#my-carousel” role=”button” data-slide=”next”>
<span class=”glyphicon glyphicon-chevron-right” aria-hidden=”true”></span>
<span class=”sr-only”>Next</span>
</a>
</div>

</div>

</div>

About the author

TechPro Free

Techprofree.com is Platform which offers Free download latest project source code in java, android, php, html, c# .net, c/c++, iphone, vb, python, jsp, asp .net, all programming lanugage.

1 Comment

Leave a Comment