Click here to Skip to main content
13,736,558 members
Rate this:
 
Please Sign up or sign in to vote.
I want to Design UI For My Application so that It Should be responsive and Also when It is open on computer It Should Display All Menu From Menu Bar
and when It Is open on mobile It Should Hide some of menu from Menu Bar

Using HTML5 and Bootstrap Is this possible
If ther is any solution please provide It.

What I have tried:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="ResponsiveWeb.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta charset="utf-8" />
    <meta name="viewport" content="Width=device-width, initial-scale=1.0" />

    <title>@ViewData["Title"] - WebApplication1</title>
    <environment names="Development">
<link href="css/bootstrap.css" rel="stylesheet" />
        </environment>
     <environment names="Staging,Production">
      <link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.6/css/bootstrap.min.css"

              asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"

              asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />    
     </environment>
</head>
<body>
    <form id="form1" runat="server">
   <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a asp-area="" asp-controller="Home" asp-action="Index" class="navbar-brand">MY Web Application</a>
            </div>
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li><a asp-area="" asp-controller="Home" asp-action="Index">Home</a></li>
                    <li><a asp-area="" asp-controller="Home" asp-action="About">About</a></li>
                    <li><a asp-area="" asp-controller="Home" asp-action="Contact">Contact</a></li>
                    <li><a asp-area="" asp-controller="Home" asp-action="Services">Services</a></li>
                </ul>
                @await Html.PartialAsync("_LoginPartial")
            </div>
        </div>
    </div>

            <div class="container body-content">
        @RenderBody()
        <hr />
        <footer>
            <p>© 2016 - WebApplication1</p>
        </footer>
    </div>

        <environment names="Development">
        <script src="js/jquery-3.0.0.min.js"></script>
            <script src="js/bootstrap.js"></script>

            </environment>

         <environment names="Staging,Production">
        <script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.2.0.min.js"

                asp-fallback-src="~/lib/jquery/dist/jquery.min.js"

                asp-fallback-test="window.jQuery">
        </script>
        <script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.6/bootstrap.min.js"

                asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.min.js"

                asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal">
        </script>
        <script src="~/js/site.min.js" asp-append-version="true"></script>
    </environment>



       <%-- @RenderSection("scripts", required: false)--%>
        
    </form>
</body>
</html>


now when My Website is browse on mobile then I want to display only
MY Web Application
Home
About

But when Website is open on computer then It will display
all menu i.e
MY Web Application
Home
About
Contact
Services
Posted 8-Nov-17 19:03pm
Updated 8-Nov-17 22:42pm
v2

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Using HTML5 and Bootstrap Is this possible?

Yes, It is possible

if you dont know anything about UI then you should start these first, CSS[^] & HTML[^]
Once you are familiar with the UI design then jump into the below
Bootstrap 3 Tutorial[^]
Responsive Web Design Basics  |  Web Fundamentals  |  Google Developers[^]
HTML Responsive Web Design[^]
CSS3 Media Queries - Examples[^]
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web06-2016 | 2.8.180920.1 | Last Updated 9 Nov 2017
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100