how is way to create menus on a aspx page

Simon 306 Reputation points
2024-12-03T15:17:52.7933333+00:00

i am using vb.net 2022 and renamed the extantion of a form to aspx

now

how is posible to create menus on this page

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,561 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,764 questions
0 comments No comments
{count} votes

Accepted answer
  1. Michael Taylor 55,841 Reputation points
    2024-12-03T16:06:00.2366667+00:00

    This is insufficient information for us to help you. ASPX files are only used by Web Forms. What UI framework are you using (Web forms, MVC, etc)? If you're using Web Forms then open the Toolbox window in VS 2022 while you have the designer of the form open and it will show you a list of controls. One of those controls is a menu. Drag and drop it onto your form. The full steps needed to add a menu to a page are beyond what can be reasonably posted in a Q&A forum. You should use the many available online resources to get your answer. Here's a starter link.

    Note also that I don't understand what you mean by "renamed the extension of a form to aspx". You shouldn't be renaming anything and if you did that then you've probably broken stuff. To add a new Web form to an existing project you use the Add New Item menu, find the Web Form item and select it. This auto generates the files needed for a web form page. It is not a single file that you can simply rename. If you did rename an existing file to .aspx then you need to undo those changes.


2 additional answers

Sort by: Most helpful
  1. Albert Kallal 5,331 Reputation points
    2024-12-03T20:36:56.7066667+00:00

    Well, keep in mind that say renaming a word document to have a Excel extension does not then convert the word document to Excel.

    Much the same exists in terms of taking some code or form written for the desktop, and then some renaming to a aspx page will again not convert the page to web based.

    As for creating a menu? I suggest you create a new web site, and choose the default template. It will then create a project with a menu bar, and you can then modify that existing menu bar to/for your needs. In most cases, the markup created is a "bootstrap" menu bar, and it has a typical web site look and feel to such menu bars.

    You don't mention what kind of web project you are creating, but a guess would be a webforms asp.net framework project.

    Hence, this option:

    User's image

    And after above, then this:

    User's image

    And the final result is thus a web page with a menu bar like this:

    User's image

    So, now you can look at, change and modify the created menu bar for your needs. So, in most cases, it is best to create a web site with a "built-in" navigation menu bar that be pre-created for you.

    Thus, you can "study" that menu bar, and even copy it, but in most cases, I found it just makes sense to go and modify the "default" menu bar for your needs.

    0 comments No comments

  2. Simon 306 Reputation points
    2024-12-03T21:29:34.0166667+00:00

    thanks

    i have in fron of me 2 books

    1. asp.net with vb.net from a. Russell Jones
    2. asp.net and vb.net in 30 days from Dr. Pratiyush Guleria both books say to Rename the extantion of the form and it it is wonerful results Thanks for all

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.