Ajax HoverMenu Control
HoverMenu 컨트롤은 Popup 컨트롤과 비슷한 작용을 합니다.
본인이 만든 Demo는 아래와 같습니다. 더 많은 정보를 원하면 관련된 참고 서적을 참고 하시기 바랍니다.
본인은 하나의 asp.net website를 만들고 website 안에 HoverMenu라는 폴더를 만들었고 폴더 안에 HoverMenuTest라는 WebForm을 추가 했습니다.
Result:
==========================================================================
HoverMenuTest.aspx
==============
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="HoverMenuTest.aspx.cs" Inherits="HoverMenu_HoverMenuTest" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>HoverMenu Test</title>
<style type="text/css">
.popupMenu
{
position:absolute;
visibility:hidden;
background-color:#F5F7F8;
}
.hoverPopupMenu
{
background-color:AliceBlue;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
What's your selection? <br />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Panel ID="panel1" runat="server" CssClass="popupMenu" >
<asp:RadioButtonList ID="RadioButtonList1" runat="server"
AutoPostBack="True"
onselectedindexchanged="RadioButtonList1_SelectedIndexChanged">
<asp:ListItem>selection1</asp:ListItem>
<asp:ListItem>selection2</asp:ListItem>
<asp:ListItem>selection3</asp:ListItem>
<asp:ListItem Value="" Text="None of the above"></asp:ListItem>
</asp:RadioButtonList>
</asp:Panel>
<cc1:HoverMenuExtender ID="HoverMenuExtender1" runat="server" TargetControlID="TextBox1" PopupControlID="panel1"
HoverCssClass="hoverPopupMenu" PopupPosition="Right">
</cc1:HoverMenuExtender>
</div>
</form>
</body>
</html>
============================================================================================
HoverMenuTest.aspx.cs
==================
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class HoverMenu_HoverMenuTest : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
{
TextBox1.Text = RadioButtonList1.SelectedValue;
}
}