In recent cases, you need to use a drop-down menu, but the problem is that there are various options in it: you can then ask the user to enter the Internet and find a bunch of ready-made controls, however, it takes a lot of time for me to get to know how to use my current system. This time should be similar to the cost of my own work.
Then I 'd better do it myself. I can better understand how it works, and it will be easier to use it later.
My goal is to use this as a control and reduce the coupling of external programs, that is, to minimize the necessary conditions for external programs to use, without forgetting to add any settings, the program will be suspended.
If you may or even want to, you only need to reference one Jquery and other javasrt files are generated by the program.
Finally, I want to use the dynamic controls I mentioned earlier. Today I will first study and use the following small html model to test the feasibility, confirm the error and change it to ASP at the start of construction.. NET.
This program has several important issues that need attention:
The trigger mode of the drop-down menu, how to draw the content of the drop-down menu, how to capture the trigger of the menu event, and where to capture the selected event Value
After the above problem is solved, ASP. NET is used to re-write the code. Therefore, when designing the child model, you must pay attention to whether it can be applied to ASP. NET.
The concept is as follows:
My plan is to design a button that is triggered by its OnClick event. Then JQuery will capture the menu array dynamically generated by ASP. NET to generate menus dynamically,
You must be able to set three events for mouseover mouseout click in the generated menu. The first two events are for the sake of appearance, so that the user can know that there is an action. After the click event is triggered,
Store the selected value in the server control TextBox of asp.net, so that the value can be sent back to the server for processing in PostBack.
The Code is as follows: