Skip to main content

Posts

Showing posts from 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 });             }            

JQuery Notification bar on top of the page

JQuery Notification bar on Top of the web page. This is the new thing in the mind i.e when we click on hyperlink then show a division with some message on top of the web page. The logic behind the thing is too much simple, In JQuery we have two method slideUp( ) and slideDown( ) , which are used for animation.  In this article , i have used both. Application of the article: If you want to give special notice on website then you can use it. Use it in Current News Section. <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head>     <title>JQuery: Notification bar Example </title>     <script src="Scripts/jquery-1.10.2.js"></script>     <script>         $(function () {             $("#Button1").click(function () {                 $("#NotificationDiv").slideUp('slow');             });             $("#ShowNotificationBar").click(function () {          

jQuery Autocomplete List appear onFocus TextBox

In this example i will show you, How to show array list when we focus on TextBox. I mean to say that array list contain users name and its show when we focus on TextBox. Here we have a simple example which is contain list of users name, also i have a autocomplete function in Script library . I have a video , you can check for implementation as well as output. <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head>     <title></title>     <link rel="stylesheet" href="//code.jquery.com/ui/1.12.0-rc.2/themes/base/jquery-ui.css">     <script src="//code.jquery.com/jquery-1.11.3.js"></script>     <script src="//code.jquery.com/ui/1.12.0-rc.2/jquery-ui.min.js"></script>     <script>         $(function () {             var users = ['jacob lefore', 'Bill', 'smith wick', 'ammey', 'rodkils', 'BillSmith'];  

How to use FileUpload Control in ASP.NET

Introduction The FileUpload control displays a text box control and a browse button that enable users to browse a file from the local or remote machine to upload it on the Web server. You can upload a file on the Web Server by specifying the full path of the file to be uploaded (for example D:\Myfiles\Test.txt) in the textbox of this control . Alternatively , you can select the file by clicking the browse button , and then locating it in the Choose File dialog box. Top Related article Fileupload control enable disable programmatically in ASP.NET Programmatically change border color of fileupload control in ASP.NET Programmatically change background color of fileupload control in ASP.NET How to validate fileupload control in asp.net also choose selected format How to insert image into database using file upload control Public Properties of the FileUpload Class FileBytes : Obtains an array of the bytes in a file that is specified by using a FileUpload control FileCont

ASP.NET Searching Data using SqlDataSource Control

In this article, i will show you, How to search data from database table using SqlDataSource control. Visual Studio SqlDataSource control have inbuilt many functionality to make dynamic application. By using SqlDataSource control you can do different types of functionality like Sorting, Searching, Insert, Update, Delete data. In this article i will show you an example of searching/filtering data from database table. So first of Design a Database table using Sql Server Explorer. Now, you can take  three tuples in it. I have a Database table schema, you can check. Search Data From Database table using SqlDataSource Control: 1. First to add one TextBox, One Button and a GridView control in a page. 2. By using Show Smart tag you can configure your GridView Control with the database table using SqlDataSource control. 3. When you configure your SqlDataSource control please check the Where clause button. In it you can select Field name, which is used to searching. Operator is &qu

Save and Retrieve Image into database table in ASP.NET MVC

According to my previous article , Which is written in web form. If you are a web form user then try this article. In this article i will show you, How to save image file into database table using ASP.NET MVC, also retrieve image from table to ASP.NET MVC Application. You know that image file saved in the form binary array. So, First to create a table, in which you can take varbinary(max) type field. I will give you an example of simple table. CREATE TABLE [dbo].[Brand] (     [BrandId]    INT             IDENTITY (1, 1) NOT NULL,     [BrandImage] VARBINARY (MAX) NULL,     PRIMARY KEY CLUSTERED ([BrandId] ASC) ); Now, Add a EDMX file to prepare a DataContext as well as model. Now, open a HomeController.cs file to write the code for save file. In this file first to pass model in the view. Add a file control in the view file. @using (Html.BeginForm("AddImage", "Home", FormMethod.Post, new {enctype="multipart/form-data"})) {     @Htm

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.