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 }); }
DropShadowExtender enables you to add a drop shadow to an ASP.NET panel control . Using this extender , you can specify the width and opacity of the drop shadow as well as make the corners of the panel rounded to give the panel looks more attractive and professional .
Lets take an Example
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="dropshadow.aspx.cs" Inherits="dropshadow" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:Panel ID="Panel1" runat="server" Width="269px">
<asp:Login ID="Login1" runat="server"></asp:Login>
</asp:Panel>
<asp:DropShadowExtender ID="DropShadowExtender1" runat="server" TargetControlID ="Panel1" Opacity ="0.7" Rounded ="true" ></asp:DropShadowExtender>
</div>
</form>
</body>
</html>
OutPut:
Properties of DropShadowExtender
TargetControlID : Set the ID of the control or link on which you want to apply the DropShadow effect.
Width : Sets the width of the drop shadow . The default value for the width of the shadow in 5 pixels.
Opacity : Sets the opaqueness of the drop shadow . The value of the drop shadow opaqueness ranges from 0 to 1.0 . The default value for Opacity is 0.5.
TrackPosition : Sets the value to true if you want to track the position of the control to which this extender is attached.
Rounded : Sets the value to True if you want to make the corners of the drop shadow rounded.
Lets take an Example
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="dropshadow.aspx.cs" Inherits="dropshadow" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:Panel ID="Panel1" runat="server" Width="269px">
<asp:Login ID="Login1" runat="server"></asp:Login>
</asp:Panel>
<asp:DropShadowExtender ID="DropShadowExtender1" runat="server" TargetControlID ="Panel1" Opacity ="0.7" Rounded ="true" ></asp:DropShadowExtender>
</div>
</form>
</body>
</html>
Properties of DropShadowExtender
TargetControlID : Set the ID of the control or link on which you want to apply the DropShadow effect.
Width : Sets the width of the drop shadow . The default value for the width of the shadow in 5 pixels.
Opacity : Sets the opaqueness of the drop shadow . The value of the drop shadow opaqueness ranges from 0 to 1.0 . The default value for Opacity is 0.5.
TrackPosition : Sets the value to true if you want to track the position of the control to which this extender is attached.
Rounded : Sets the value to True if you want to make the corners of the drop shadow rounded.
Comments
Post a Comment