Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,
i am using Asp.net MVC admin bootstrap theme first time. but it cant work, can any body help me, how to use bootstrap admin theme.
Posted

1 solution

1.Inside the View/Shared please create a partial view. Name it as _AdminLayout.cshtml
2.Copy and paste the html code from bootstrap admin template index page.
3.Delete all unwanted html tags ..usually keep header,footer,siderbar menu content reamin there and remove all others.
4.use
C#
@RenderBody()

inside the adminlayout were you need load contents from other views


Eg:
C#
<body>
    <div class="navbar">
		<div class="navbar-inner">
			<div class="container-fluid">
				<a class="btn btn-navbar" data-toggle="collapse" data-target=".top-nav.nav-collapse,.sidebar-nav.nav-collapse">
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</a>
				<a class="brand"><span></span></a>
								
				<!-- start: Header Menu -->
				<div class="nav-no-collapse header-nav">
					<ul class="nav pull-right">
					
						<li class="dropdown">
							<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
								class="halflings-icon white user" href="#"> Profile</a></li>
								<li><a href="#">^__i class="halflings-icon off"> Logout</a></li>
							</ul>
						</li>
						<!-- end: User Dropdown -->
					</ul>
				</div>
				<!-- end: Header Menu -->
				
			</div>
		</div>
	</div> 
<div class="row-fluid">
                 @RenderBody()
         
                 @RenderSection("Scripts", required: false) <!-- for java scripts -->

                </div>
            
<div class="clearfix"></div>
    <footer>
   
                
               © 2014 
          

	</footer></body>
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900