I want to show Components in a tabs , so first of all create few components. In this project we have three components, First View Component public class AllViewComponent : ViewComponent { private readonly UserManager<ApplicationUser> _userManager; public AllViewComponent(UserManager<ApplicationUser> userManager) { _userManager = userManager; } public async Task<IViewComponentResult> InvokeAsync() { List<StudentViewModel> allUsers = new List<StudentViewModel>(); var items = await _userManager.Users.ToListAsync(); foreach (var item in items) { allUsers.Add(new StudentViewModel {Id=item.Id, EnrollmentNo = item.EnrollmentNo, FatherName = item.FatherName, Name = item.Name, Age = item.Age, Birthdate = item.Birthdate, Address = item.Address, Gender = item.Gender, Email = item.Email }); }
DragpanelExtender enables you to drag a panel within the webpage .DragPanelExtender adds a drag effect to the panels of your web page . This makes the panels virtually float on the web page . Using this extender , you can easily drag the panels by clicking their associated drag handles.
lets take an Example
Copy this code and paste your web form ( Before copy you must add ajax control tool kit to your project )
<%@ Page Language="C#" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style >
.dragpanel
{
cursor :move ;
text-align :center ;
font-size :large ;
background-color :Green ;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div>
<asp:Panel ID="Panel1" runat="server">
<asp:Panel ID="Panel2" runat="server">
<div class ="dragpanel">
drag me
</div>
</asp:Panel>
<asp:Panel ID="Panel3" runat="server">
DragpanelExtender enables you to drag a panel within the webpage .DragPanelExtender adds a drag effect to the panels of your web page . This makes the panels virtually float on the web page . Using this extender ,
you can easily drag the panels by clicking their associated drag handles
</asp:Panel>
</asp:Panel>
<asp:DragPanelExtender ID="DragPanelExtender1" runat="server" TargetControlID ="Panel1" DragHandleID ="Panel2">
</asp:DragPanelExtender>
</div>
</form>
</body>
</html>
TargetControlID: Sets the ID of the panel to which you want to drag.
DragHandleID: Sets the ID of the control to which you want to make treat as a drag handle for the panel.
lets take an Example
Copy this code and paste your web form ( Before copy you must add ajax control tool kit to your project )
<%@ Page Language="C#" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style >
.dragpanel
{
cursor :move ;
text-align :center ;
font-size :large ;
background-color :Green ;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div>
<asp:Panel ID="Panel1" runat="server">
<asp:Panel ID="Panel2" runat="server">
<div class ="dragpanel">
drag me
</div>
</asp:Panel>
<asp:Panel ID="Panel3" runat="server">
DragpanelExtender enables you to drag a panel within the webpage .DragPanelExtender adds a drag effect to the panels of your web page . This makes the panels virtually float on the web page . Using this extender ,
you can easily drag the panels by clicking their associated drag handles
</asp:Panel>
</asp:Panel>
<asp:DragPanelExtender ID="DragPanelExtender1" runat="server" TargetControlID ="Panel1" DragHandleID ="Panel2">
</asp:DragPanelExtender>
</div>
</form>
</body>
</html>
OutPut
Properties of DragPanelExtender :
Comments
Post a Comment