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 }); }
Introduction
In this article i will show you how to show a dialog box when we click on button. I will show you a example of modal window using JQuery in ASP.NET. You can use this concept in every language.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.8.2.js" ></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js" ></script>
<script>
$(function () {
$('#buttonclick').click(function () {
$('#popup').dialog({
title: "JQuery popup model",
width: 450,
height: 250,
modal: true,
button: {
close: function () {
$(this).dialog('close');
}
}
});
});
})
</script>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<div id="popup" title="Model PopUp" style="display:none">
<b>Welcome to dotprogramming.blogspot.com</b>
</div>
<input type="button" id="buttonclick" value="Show Model" />
</div>
</form>
</body>
</html>
Code generate the following output
In this article i will show you how to show a dialog box when we click on button. I will show you a example of modal window using JQuery in ASP.NET. You can use this concept in every language.
Description
In previous article i explained Textbox takes only numeric value, Example of Text ZoomIn and ZoomOut in Jquery.Code of modal window
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default10.aspx.cs" Inherits="Default10" %><!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.8.2.js" ></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js" ></script>
<script>
$(function () {
$('#buttonclick').click(function () {
$('#popup').dialog({
title: "JQuery popup model",
width: 450,
height: 250,
modal: true,
button: {
close: function () {
$(this).dialog('close');
}
}
});
});
})
</script>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<div id="popup" title="Model PopUp" style="display:none">
<b>Welcome to dotprogramming.blogspot.com</b>
</div>
<input type="button" id="buttonclick" value="Show Model" />
</div>
</form>
</body>
</html>
Code generate the following output
Comments
Post a Comment