Skip to main content

Posts

Showing posts from May, 2016

Featured Post

How to use Tabs in ASP.NET CORE

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 });             }            

Calendar Control with Disabled past date

In this article, i will show you, how to show calendar control with disabled past date. I mean to say that if you select date then calendar control disabled all previous day. Also i will provide you, After select a specific date then you don't move to previous months. Lets see an example. Before example i will teach you about calendar control. If you write following function then you can see full calendar control. If you want to disabled previous date after select specific date then see next example. $(function () {            $("input[id*='calid']").datepicker();        }) Disabled Previous Date:   $(function () {            $("input[id*='calid']").datepicker({                minDate: new Date(2016,6,1)            });        }) <html xmlns="http://www.w3.org/1999/xhtml"> <head>     <title>Calendar Control with Disabled past date</title>     <link rel="stylesheet" href="//c

Anti Xss in ASP.NET MVC

In this ASP.NET MVC Video tutorial i will show you, How to prevent your page from XSS attack. XSS stands for Cross side Scripting attack. Suppose you open your banking website, also open forgery website in other tabs, that sites attack on your banking website also steal your credential information. So, if you are developer then prevent your web page from XSS attacks. Lets see this video:

Import Export project in ASP.NET C#

Project Introduction: In this project, we have some modules, which is related to Import and Export goods services. This project provides online facilities to pickup your goods from any where in the nation. Actually projects is based on packers and movers functionality. Lots of goods transport one place to another place. We all know about import and export. Suppose, you want to bring goods from other places and that place is far from you place. So , you face too much difficulties. So, i design a packer and mover based project in ASP.NET C#. Project modules Project contains lots of things which is related to customer as well as company who pick up goods. So i dived the project in different categories, categories further divided in sub categories. Module: User Module (Who Generate pick up request) Branch Module(Who handle pick up request , i am taking state level branch module) Agent Module (Who deliever the goods) Admin (Who handle all such functionality) Software Req

How to use ImageMap Control in ASP.NET

Introduction An image map is a picture on a webpage that provides various links , called hotspots, to navigate to other web pages , depending on the place where the user click (on single image). Web Designer frequently use image maps in their websites . An image map can be included in your web page by using the ImageMap Control. An ImageMap control exists within the System.Web.UI.WebControls namespace. Image maps are often real maps; for example , you can display the map of the USA and define hotspot regions for each of its state and then navigate to the corresponding page containing the information for the selected state. Public Properties of the ImageMap Class Enable : Obtains or sets a value indicating whether the control can respond to user interaction. HotSpotMode : Obtains or sets the default behavior for the HotSpot objects of an ImageMap control when the HotSpot objects are clicked. HotSpots : Obtains or sets a group of HotSpot objects that represents the defin

How to Bind Hyperlink control in datalist in asp.net

Datalist introduction The Datalist control is a data bound control that displays data by using templates. These templates define controls and HTML elements that should be displayed for an item. The Datalist control exists within the System.Web.UI.WebControl namespace. Related topics How to use Hyperlink control in ASP.NET How to use Hyperlink control in GridView  Some steps for binding Hyperlink control in Datalist Step-1 : Create a DataBase Table with  following fields . Step-2:   Fill this field with following values  DepartmentID           Name                 Description 1                                  IT                     This is first department Name 2                                  CS                    This is Second Department Name Step-3 : Create Procedure for retrieving values. Database.mdf-->Stored Procedures -->Right click -->Add new Stored Procedure CREATE PROCEDURE GetDepartments AS SELECT Depa

Pager Template in FormView Example of ASP.NET C#

In this article i will show you, How to customize paging of FormView using pager template. By using pager template we can changed the structure of paging. I will give you an example of pager template. In this example i will show you, How to prepare paging structure in FormView, after preparing the structure of Edit Item template and Item Template , you can put the structure of pager template. In this example, pager template contain two link button with CommandName and CommandArgument. In CommandName we have single value for both control i.e Page, But CommandArgument contain value i.e "Prev" and "Next". Both CommandArguments are used for specific purpose. I will show you DataBound event, In this, we have pager template information. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default5.aspx.cs" Inherits="Default5" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"&

Code for user registration in ASP.NET MVC

In this video tutorial i will teach you how to insert value into database table. You can say how to register user. If you want to save value into database table then first to create a database table. Check this video to create database in visual studio. After that, you can make a controller class to pass data to the view section. check this video for full demonstration. 

JQuery Bind function handles Click, DblClick, MouseEnter and MouseLeave Event

In this article i will show you how to use Bind( ) function in JQuery. Bind function is used to call events using string or triggers. I mean to say that  either you can pass event directly in the method or externally using triggers. In this example, i will show you click , double click , Mouse Enter and Mouse Leave event directly in Bind Function. In this example i will show you , when cursor moves on paragraph boundary then class toggle with different color. Lets check this example. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default7.aspx.cs" Inherits="Default7" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title>     <style>         p{             background-color:red;             padding:5px;             font-size:larger;         }         .over{             color:white;             background-color:

Windows Forms Events

An event is generated when a user performs an action, such as clicking the mouse or pressing a key. When a user clicks a form, the clicks event is generated for the form. Each form and control has a predefined set of events associated with it. You can instruct an application to perform a specific action when an event takes place. For example, you can write code for adding items to a list as soon as a form is loaded. Click : Occurs when a user clicks anywhere on a form. DoubleClick : Occurs when the component is double-clicked. FormClosed : Occurs when a form is closed. Deactivate : Occurs when a form losses focus and is no longer active. Load : Occurs when a form is loaded in the memory for the first time. This event can be used to initialize variables used in a form. This event can also be used to specify the initial values to be displayed in various controls in a form. MouseMove : Occurs when a mouse is moved over a form. MouseDown : Occurs when the left mouse button

upgraded the Macros for Visual Studio 2013 extension

Macros have always been popular, first as part of the product, and now as an extension. In response to your feedback we have upgraded the Macros for Visual Studio 2013 extension to be compatible with Visual Studio 2015. You can download the upgraded extension from the Visual Studio Gallery. Fore more details :  https://blogs.msdn.microsoft.com/visualstudio/2016/05/11/macros-extension-open-sourced-in-visual-studio-2015/

Open New Browser Tab using AngularJS

In this article, I will show you, How to open new browser tab using ng-click event. This is the same thing in JQuery. In this example, first of all access division tag using angular,module function. In this we have ng-app as parameter. Lets see the example. <!DOCTYPE html> <html> <head>     <title></title> </head> <body>    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.9/angular.min.js"></script>    <script type="text/javascript">        var app = angular.module('FirstApp', [])        app.controller('ControllerPage', function ($scope, $window) {            $scope.NewTab = function () {                $window.open("https://dotprogramming.blogspot.com");            }        });     </script>     <div ng-app="FirstApp" ng-controller="ControllerPage">         <input type="butt

Why you share your Wi-Fi password said Windows 10

Share on Facebook  Tweet  Share  Pin Microsoft is removing part of its disputed Wi-Fi Sense feature from Windows ten. "We have removed the Wi-Fi Sense feature that allows you to share Wi-Fi networks together with your contacts and to be mechanically connected to networks shared by your contacts," says Microsoft's Gabe Aul. "The cost of change the code to keep this feature operating combined with low usage and low demand created this not price any investment." Wi-Fi Sense was originally introduced on Windows Phone and then updated and included with Windows ten. It's a feature that enables you to automatically hook up with open hotspots, and share your Wi-Fi passwords with contacts. Some security experts had expressed issues over Windows ten mechanically connecting to open hotspots, but Microsoft is keeping this feature in place. Wi-Fi Sense's password sharing feature generated superfluous noise from individuals WHO did not comprehend it wasn'

Visual Studio: VS 15 Preview 2 Released leaked

We all used Visual Studio 2015 first preview , User + developers find some bugs in it and send to MICROSOFT. After one month , I mean to say that that day MICROSOFT leaked news for 2 preview. According to MICROSOFT: This preview like the previous one, lays groundwork for the next version of Visual Studio. We primarily targeted on bug fixes and a few feature updates. New features include; creating the account settings dialog additional accessible to screen readers, diagnostics enhancements to facilitate run focus connected problems, Edit and Continue for XAML apps, and simplified debug configuration in Folder read. Preview 2 conjointly includes the latest Visual Studio Tools for Apache Cordova Update nine that supports Cordova six.1.1. MSDN also changed according to visual studio 15 preview 2. So, Carefully to download it. If you are interested to download visual studio 15 preview then click here  

JQuery: Show Distinct items of DropdownList

In this article i will show you, how to remove duplicates in DropdownList when it appear on browser window. If you have multiple item in the table and you want to show only distinct items of the table then you can use siblings function of the JQuery. Lets check the simple example: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title>     <script src="Scripts/jquery-1.10.2.js"></script>     <script>         $(function () {             $("select option").each(function () {                 $(this).siblings("[value=" + this.value + "]").remove();             });         });     </script> </head> <body>     <form id="form1" runat="server">         <h2>How to Remove duplicate dropdown option elements with same value</h2>     <div><select name="sel

How to Design Country, State, and City DropDownList using SqlDataSource

In this article i will show you, How to bind Dropdownlist with the Country, State and City table using SqlDataSource. We all that If among tables are related to each other then we can show among tables one by one on indexChanged event. So, First of all design tables following ways: [ CountryTable ] CountryId  int primary_key Identity(1,1) Country_Name nvarchar(100) [ State ] StateId int primary_key Identity(1,1) State_Name nvarchar(100) CountryId int [ City ] CityId int primary_key Identity(1,1) City_Name nvarchar(100) StateId int <%@ Page Language="C#" AutoEventWireup="true" CodeFile="countrystatecity.aspx.cs" Inherits="countrystatecity" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title> </head> <body>     <form id="form1" runat="server">     <div>             Sele

How to Edit picture from FormView using SQLDataSource control in ASP.NET C#

In this ASP.NET article i will show you, How to edit picture using FormView control. We all know that when FormView bind from SqlDataSource control then image have display on label control bydefault. First of all change label control with the image control. If you see the source code then you find that a label control bind with the image column using Eval("column name") method in embedded code block (<%# %> ). If you have to change label text with imageUrl then image will display on that place. Similarly in edit section take a fileupload control for picking file from local computer. Find it (Fileupload control) from Form View control in code file also save file in project folder. Lets see the example :

How to fetch data from database in asp.net

Introduction In this article i will show you how to fetch data from sql server to GridView by coding. Example of binding gridview with SQL Server database. There are many ways to fetch data from database table. I have to mention list of table: Get Data from database using SqlDataReader . Get Data from database using DataSet with SqlDataAdaptor Get Data from Database using SqlDataSource Control . Get Data From Database using EDMX File (Entity Framework) The C# GridView Control The C# GridView control is a Data bound control that displays the values of a data source in the form of a table . In this table , each column represents a field and each row represents a record . The C# GridView control exists within the System.Web.UI.Controls namespace . When you drag and drop the GridView control on the designer page , the following syntax is added to the source view of the page. <asp:gridview id="GridView1" runat="server"> </asp:gridview> ASP.

Online Student Information System in ASP.NET

Introduction "Independent functional unit work together" known as system. Like Computer System, it contains multiple independent units ( Hard disk, mother board , processor etc) But these units are depended on each other. Same thing in Student Information System, which contains different types of module such as Personal Information of students  Progress Card information of student And last one is Current status of student. Brings these module, we will design a System. First of all we discuss about Personal Information. Before reading about this project , you can see my project gallery. Online Course Registration System Project Online Hotel Reservation System Project Finger Print Based System . Online Blood bank Project System Offline Banking System Online Polling System Student and Fees management system Online Mobile Shopping Project College WebSite Project Online Job Project Portal  Online Gym Application Project Student's Personal Informati

Get the Cell value of selected Row From DataGrid in WPF

In this article i will show you, how to get the cell value from datagrid in WPF. We all know that dataGrid is use for storing data in a tabular format. By using AutoGenerateColumns we will show our table columns in it.  If you want to show your customized columns in it the  add DataGridTemplate Column.  In it we have cell template, by using this we can design our dataGrid cells. In the first DataTemplate i will take a button control through it we can show the cell value of dataGrid. <Window x:Class="WpfApplication13.MainWindow"         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"         Title="MainWindow" Height="350" Width="525">     <Grid>         <DataGrid Name="grid1" AutoGenerateColumns="False">             <DataGrid.Columns>                 <DataGridTemplateColumn>