Adding Submenu to Menu in Navbar Using Chat GPT, ASP.NET CORE MVC Part 7

Опубликовано: 16 Июнь 2026
на канале: CodePoweredbyAI
105
3

In the previous video, we customized our navbar by removing the default and creating our own using ChatGPT. Our custom navbar currently has four menu items. Let's begin by replacing these items. To do this, return to Visual Studio and open our project. Navigate within Solution Explorer and open the default view page. Select all the code and copy it by pressing Ctrl + C. Now, return to ChatGPT. Enter the command: "Modify the following code to link three submenu items to the About menu item." Next, paste the copied code within double quotes after the menu item text in the command prompt. Then, click on the 'Send Message' button. ChatGPT will begin generating the necessary code based on your command. Once the code is generated, copy it. Open your 'DefaultView.cshtml' page that we created in video number 5. Remove the existing code and paste the code generated by ChatGPT. Save the file by pressing Ctrl + S. Now, check the output in your browser. You should now see your custom navbar with a submenu linked to the 'About' menu item.

Let's proceed to replace the menu items: 'About', 'Services', and 'Contact'. Return to Visual Studio and navigate to the 'Default.cshtml' page. Press Ctrl + F to open the search popup window. Search for 'About'. Replace 'About' with 'General'. Replace 'Services' with 'Client'. Replace 'Contact' with 'Company'. Now, check the updated result in your browser. Everything should be fine. The menu items have been updated, and the submenu is successfully created. In the next video, we will add some more features to this page, then we will create a client login page.