Information générale
Catégorie:
Formulaires Web
>Here's what the ASP version did. I want to duplicate that with .Net and have the code run on the server.
>
>I have a button on the page that when clicked displays a DIV with other DIVs contained therein that are left aligned and act as close as possible to that of a Windows Menu. As each contained DIV is mouseover it highlights the item and on mouseout it reverts to the system menu color. When one of the contained DIVs is clicked it, executes a window.navigate to the appropriate page.
>
>I am still learning .Net and have looked at both User controls and Server controls. I am leaning toward Server control but am not sure if I should subclass the Label or a Custom control and add a Click event to it (if I can).
>
>Any help would be appreciated.
>
>Richard
Hmm... you could go either way on this. It seems like if you have the code for ASP (javascript I assume) that creating a User control and putting the existing HTML in it would solve your problem. If your menu is "hard coded" I would go with this.
However, if your menu pulls it's info from a database or XML file or something I would say use a server control that renders the HTML code you need for the menu.
With the User control it is reusable within the app, with a server control it is reusable in several apps.
BOb
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement