{"id":1982,"date":"2021-06-15T12:00:00","date_gmt":"2021-06-15T10:00:00","guid":{"rendered":"https:\/\/kindsonthegenius.com\/blog\/build-a-complete-app-with-asp-net-c-sql-lite-part-6\/"},"modified":"2026-07-05T03:25:52","modified_gmt":"2026-07-05T01:25:52","slug":"build-a-complete-app-with-asp-net-c-sql-lite-part-6","status":"publish","type":"post","link":"https:\/\/kindsonthegenius.com\/blog\/build-a-complete-app-with-asp-net-c-sql-lite-part-6\/","title":{"rendered":"Build a Complete App with ASP.Net, C#, SQL Lite \u2013 Part 6"},"content":{"rendered":"<p>In this part, we would plan the navigation of the application. We also setup the navigation sidebar on the left.<\/p>\n<p>For this part, we would mainly be working within the _Layout.cshtml file. So open in and lets take a look.<\/p>\n<ol>\n<li><a href=\"#t1\">Setup the Home Page<\/a><\/li>\n<li><a href=\"#t2\">Plan and Create the Navigation<\/a><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h5><strong id=\"t1\">1. Setup the Home Page<\/strong><\/h5>\n<p>Follow the steps below to setup the home\u00a0 page<\/p>\n<p><strong>Step 1<\/strong> &#8211; Open the index.htm file in the template folder we downloaded in <a href=\"https:\/\/www.kindsonthegenius.com\/build-a-complete-app-with-asp-net-c-part-1\/\" target=\"_blank\" rel=\"noopener\">Part 1<\/a>.<\/p>\n<p><strong>Step 2<\/strong> &#8211; Copy the content of the main section without the &lt;main&gt;&lt;\/main&gt; tags as shown below:<\/p>\n<figure id=\"attachment_14696\" aria-describedby=\"caption-attachment-14696\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/06\/Main-section-of-the-Index-Page.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14696\" src=\"https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/06\/Main-section-of-the-Index-Page-300x99.jpg\" alt=\"Main section of the Index Page\" width=\"300\" height=\"99\" srcset=\"https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/06\/Main-section-of-the-Index-Page-300x99.jpg 300w, https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/06\/Main-section-of-the-Index-Page-600x197.jpg 600w, https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/06\/Main-section-of-the-Index-Page.jpg 676w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-14696\" class=\"wp-caption-text\">Main section of the Index Page<\/figcaption><\/figure>\n<p><strong>Step 3<\/strong> &#8211; Open the home.cshtm file from the Views folder and paste the content you copied below the @ViewData line<\/p>\n<p><strong>Step 4<\/strong> &#8211; Copy all the script tag codes as well and paste it at the end of the file. The content of the index.cshtml file is now as shown below:<\/p>\n<figure id=\"attachment_14697\" aria-describedby=\"caption-attachment-14697\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/06\/New-Content-of-the-index.cshtml-file.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14697\" src=\"https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/06\/New-Content-of-the-index.cshtml-file-300x150.jpg\" alt=\"New Content of the index.cshtml file\" width=\"300\" height=\"150\" srcset=\"https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/06\/New-Content-of-the-index.cshtml-file-300x150.jpg 300w, https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/06\/New-Content-of-the-index.cshtml-file-1024x512.jpg 1024w, https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/06\/New-Content-of-the-index.cshtml-file-768x384.jpg 768w, https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/06\/New-Content-of-the-index.cshtml-file-600x300.jpg 600w, https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/06\/New-Content-of-the-index.cshtml-file.jpg 1132w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-14697\" class=\"wp-caption-text\">New Content of the index.cshtml file<\/figcaption><\/figure>\n<p>Now you can launch the application and visit the home page to check that everything is ok. I recommend you watch the video if you have any challenges. Or maybe you can also mention you challenge in a comment.<\/p>\n<p><strong>Step 5<\/strong> &#8211; Please delete the first two scripts. The ones shown below, else some features may not work<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #007700;\">&lt;script <\/span><span style=\"color: #0000cc;\">src=<\/span><span style=\"background-color: #fff0f0;\">\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.0.1\/dist\/js\/bootstrap.bundle.min.js\"<\/span> <span style=\"color: #0000cc;\">crossorigin=<\/span><span style=\"background-color: #fff0f0;\">\"anonymous\"<\/span><span style=\"color: #007700;\">&gt;&lt;\/script&gt;<\/span>\r\n<span style=\"color: #007700;\">&lt;script <\/span><span style=\"color: #0000cc;\">src=<\/span><span style=\"background-color: #fff0f0;\">\"js\/scripts.js\"<\/span><span style=\"color: #007700;\">&gt;&lt;\/script&gt;<\/span>\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h5><strong id=\"t2\">2. Plan and Create the Navigation<\/strong><\/h5>\n<p>This is important because you need to plan the navigation of your application such that users would be able to get to all parts of the application.<\/p>\n<p>I propose the navigation structure below:<\/p>\n<figure id=\"attachment_14698\" aria-describedby=\"caption-attachment-14698\" style=\"width: 230px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/06\/Sidebar-for-HospitalMS.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14698\" src=\"https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/06\/Sidebar-for-HospitalMS-230x300.jpg\" alt=\"Navigation Sidebar for HospitalMS\" width=\"230\" height=\"300\" srcset=\"https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/06\/Sidebar-for-HospitalMS-230x300.jpg 230w, https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/06\/Sidebar-for-HospitalMS-768x1000.jpg 768w, https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/06\/Sidebar-for-HospitalMS-600x781.jpg 600w, https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/06\/Sidebar-for-HospitalMS.jpg 777w\" sizes=\"auto, (max-width: 230px) 100vw, 230px\" \/><\/a><figcaption id=\"caption-attachment-14698\" class=\"wp-caption-text\">Navigation Sidebar for HospitalMS<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>Now that we have a clear design of the navigation, we would have to implement it.<\/p>\n<p>So open the <em>_Layout.cshtml<\/em> file and adjust the code to reflect the navigation structure we have. For instance, the code below is a snippet for the Patients Record section.<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #007700;\">&lt;div<\/span> <span style=\"color: #0000cc;\">class=<\/span><span style=\"background-color: #fff0f0;\">\"sb-sidenav-menu-heading\"<\/span><span style=\"color: #007700;\">&gt;<\/span>Patient Records<span style=\"color: #007700;\">&lt;\/div&gt;<\/span>\r\n<span style=\"color: #007700;\">&lt;a<\/span> <span style=\"color: #0000cc;\">class=<\/span><span style=\"background-color: #fff0f0;\">\"nav-link\"<\/span> <span style=\"color: #0000cc;\">href=<\/span><span style=\"background-color: #fff0f0;\">\"\/patients\/create\"<\/span><span style=\"color: #007700;\">&gt;<\/span>\r\n    <span style=\"color: #007700;\">&lt;div<\/span> <span style=\"color: #0000cc;\">class=<\/span><span style=\"background-color: #fff0f0;\">\"sb-nav-link-icon\"<\/span><span style=\"color: #007700;\">&gt;&lt;i<\/span> <span style=\"color: #0000cc;\">class=<\/span><span style=\"background-color: #fff0f0;\">\"fas fa-tachometer-alt\"<\/span><span style=\"color: #007700;\">&gt;&lt;\/i&gt;&lt;\/div&gt;<\/span>\r\n    New Patients\r\n<span style=\"color: #007700;\">&lt;\/a&gt;<\/span>\r\n<span style=\"color: #007700;\">&lt;a<\/span> <span style=\"color: #0000cc;\">class=<\/span><span style=\"background-color: #fff0f0;\">\"nav-link\"<\/span> <span style=\"color: #0000cc;\">href=<\/span><span style=\"background-color: #fff0f0;\">\"\/patients\"<\/span><span style=\"color: #007700;\">&gt;<\/span>\r\n    <span style=\"color: #007700;\">&lt;div<\/span> <span style=\"color: #0000cc;\">class=<\/span><span style=\"background-color: #fff0f0;\">\"sb-nav-link-icon\"<\/span><span style=\"color: #007700;\">&gt;&lt;i<\/span> <span style=\"color: #0000cc;\">class=<\/span><span style=\"background-color: #fff0f0;\">\"fas fa-tachometer-alt\"<\/span><span style=\"color: #007700;\">&gt;&lt;\/i&gt;&lt;\/div&gt;<\/span>\r\n    Patient List\r\n<span style=\"color: #007700;\">&lt;\/a&gt;<\/span>\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>So follow the same procedure the create the rest of it. In the next part we would see how to add images to the tables.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this part, we would plan the navigation of the application. We also setup the navigation sidebar on the left. For this part, we would &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"pagelayer_contact_templates":[],"_pagelayer_content":"","footnotes":""},"categories":[311],"tags":[],"class_list":["post-1982","post","type-post","status-publish","format-standard","hentry","category-sql"],"_links":{"self":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/1982","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/comments?post=1982"}],"version-history":[{"count":1,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/1982\/revisions"}],"predecessor-version":[{"id":2150,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/1982\/revisions\/2150"}],"wp:attachment":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/media?parent=1982"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/categories?post=1982"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/tags?post=1982"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}