Skip to main content

Posts

Showing posts from August, 2015

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

how to get data from sql database to gridview by coding

Introduction In this article i will show you how to get data from sql server to GridView by coding. Example of binding gridview with SQL Server database. 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.NET reduce lots of code in binding process, provide binding controls such as SqlDataSource for connecting database. The GridView data control has a built-in capability of sorting ,paging , updating and deleting data. You can also set the column fields through the AutoGenerate property to indicate whether bound

How to insert data into ms access database table in wpf

Introduction In previous article i explained how to create connection with MS-Access database; How to bind DataGrid with access database . In this article i will teach you how to insert item into Access database using WPF. Lets take a simple example of inserting item into access database in WPF. Description First of all create connection with the access database which is already done in previous article. Now, you will do some changes in code of  data grid binding. Like replace DQL query with DML query. Like : cmd.CommandText = "Insert into [tablename](columnName)Values(Data)"; Also do not required to execute the query, use ExecuteNonQuery() method to insert data by the input box. Source Code: <Window x:Class="WpfApplication1.insertingitem"         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"         Title="insertingitem"

How to insert data into MS-Access database table in asp.net c#

Introduction In previous article i explained how to create connection with MS-Access database; How to bind DataGrid with access database . In this article i will teach you how to insert item into Access database using ASP.NET C#. Lets take a simple example of inserting item into access database in asp.net. Description First of all create connection with the access database which is already done in previous article. Now, you will do some changes in code of  GridView binding. Like replace DQL query with DML query. Like : cmd.CommandText = "Insert into [tablename](columnName)Values(Data)"; Also do not required to execute the query, use ExecuteNonQuery() method to insert data by the input box. Source Code: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default7.aspx.cs" Inherits="Default7" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="

How to insert item into MS-access database using windows form c#

Introduction In previous article i explained how to create connection with MS-Access database; How to bind DataGrid with access database . In this article i will teach you how to insert item into Access database using windows form. Lets take a simple example of inserting item into access database. Description First of all create connection with the access database which is already done in previous article. Now, you will do some changes in code of  datagrid binding. Like replace DQL query with DML query. Like : cmd.CommandText = "Insert into [tablename](columnName)Values(Data)"; Also do not required to execute the query, use ExecuteNonQuery() method to insert data by the input box. using System; using System.Configuration; using System.Data.OleDb; using System.Windows.Forms; namespace ConnectAccessDatabase {     public partial class Form2 : Form     {         public Form2()         {             InitializeComponent();         }         pr

How to bind DataGrid with MS-Access database in WPF

Introduction In Previous article we have already learn that  how to connect MS-Access with windows form . Today we will take a example of binding DataGrid with MS-Access in WPF c#. Also learn how to create connection using OleDbConnection class which is exist in System.Data.OleDb namespace. Description: First to read, How to create Database table in Ms-Access and how to create connection with MS-Access using c#. Now, after creating the database you can create the command using OleDbCommand class which is also available in System.Data.OleDb namespace. Use OleDbDataReader Class which is used to read the database table in forward only mode. Now, Bind the DataGridView with Data Reader. Check the below mentioned code as well as video: Database table Source code :  <Grid>         <DataGrid Name="grid1" HorizontalAlignment="Left" Margin="116,72,0,0" VerticalAlignment="Top" Height="201" Width="215"/&

How to Bind Gridview with Access database in ASP.NET C#

Introduction In Previous article we have already learn that  how to connect MS-Access with windows form . Today we will take a example of binding Gridview with MS-Access in asp.net c#. Also learn how to create connection using OleDbConnection class which is exist in System.Data.OleDb namespace. Description: First to read, How to create Database table in Ms-Access and how to create connection with MS-Access using c#. Now, after creating the database you can create the command using OleDbCommand class which is also available in System.Data.OleDb namespace. Use OleDbDataReader Class which is used to read the database table in forward only mode. Now, Bind the DataGridView with Data Reader. Check the below mentioned code as well as video: Database table Source code :  <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default6.aspx.cs" Inherits="Default6" %> <!DOCTYPE html> <html xmlns="htt

How to Bind DataGridView with MS-Access in windows form c#

Introduction In Previous article we have already learn that how to connect MS-Access with windows form . Today we will take a example of binding DataGridView with MS-Access. Also learn how to create connection using OleDbConnection class which is exist in System.Data.OleDb namespace. Description: First to read, How to create Database table in Ms-Access and how to create connection with MS-Access using c#. Now, after creating the database you can create the command using OleDbCommand class which is also available in System.Data.OleDb namespace. Use DataSet Class which is used to load the database table to in-memory. Now, Bind the DataGridView with DataSet Table. Check the below mentioned code as well as video: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Data.OleDb; using System

How to connect Microsoft Access Database to Windows Form c#

Introduction In this article we will learn how to connect access database to windows form application. Get the MS Access data in windows form application. Access is a database system or you can its a tool of MS-Office. Through this we can store data permanently in it. If you want to store data in it by the help of windows application then you should connect it with the application. Description If you want to connect the database with the windows form application then you must to install the MS- Access in the computer. Also must to install connection drivers properly. Now, follow the instruction to connect ms-access database to windows form c#. First to prepare a database file in MS-Access. Add a windows form project Using Visual Studio 2013 or earlier. Add a Method just after Initializing Component. Like  using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Te

Get the page name example in asp.net c#

In this article i will learn how to get the page name in asp.net. If you are using visual studio 2005 to 2010 then url show page name with extension. But if you are using vs2012 to vs2015 then do not show. Lets check the example of  get page name from page url. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default5.aspx.cs" Inherits="Default5" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title>Get the page name program in asp.net</title> </head> <body>     <form id="form1" runat="server">     <div>         <asp:Button ID="Button1" runat="server" Text="Get Page Name" OnClick="Button1_Click" />         <br />         <br />         <asp:Label ID="lblresult" runat="server" Text=""><

Random password generator software free download

Introduction This software is used to generate random password. Free download random password generator software. Through this password generator you can generator long string password like this Password: Asdfrte,./7864@3k# Example of long/strong/good password. If you want to know about this software that how it work? First to run the executable file and open the software in windows environment and put some number like 15. After entered you get 15 character long string password. How to design the software: First to create a new project in visual studio , File-->New-->Project-->Windows form (c# Language). Design a form with one label, one TextBox, one button control. When you press the button then you get long string password. So put this code on Button click. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.W

ZoomIn and ZoomOut Text Example using JQuery

Introduction:  Here I will explain example of Text ZoomIn or ZoomOut example using JQuery or increase or decrease font size of blog/website dynamically on button click using jQuery in asp.net. Description:    In previous articles I explained ajax password strength validator and checker . This all things are related to Jquery. To read more article about JQuery which is implemented in asp.net . To implement this we need to write the following code in aspx page <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs" Inherits="Default4" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title>     <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>     <script>         $(document).ready(function () {            

Ajax Password Strength and password indicator example in asp.net

Introduction In this article i will learn about password strength control of ajax. Example of password indicator of ajax in asp.net. This example cover all such things which is related to password strength. Description i already explained about Always visible control example in ajax. Example of calendar extender using ajax. Example of Numeric UpDown Extender example using ajax. Example of Resizable control in asp.net. Slider Extender example in AJAX. Source code : <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %> <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title>     <style>         .very{ background-color:gray; color:white;        

TextBox control example in asp.net c#,windows form , wpf , JQuery

Introduction Here  i will explain TextBox control in various technology like asp.net c#, windows form, wpf, Jquery. Given a simple example of TextBox control in asp.net c#, windows form, wpf, Jquery etc. The following are simple example of TextBox: Bind TextBox from comboBox in windows form Example of find TextBox in windows form c# Example of TextBox in asp.net c# Example of Text changed event  of TextBox in asp.net Example of autocomplete type property of textbox control in asp.net Validating textbox in windows form AccessKey property example of TextBox in asp.net c# How to insert record into database table using TextBox in asp.net Text Box example in WPF Spell Check Text Box example in wpf Bind Text Box example in WPF Accept only number by Text Box example in JQuery Confirm password from Password box using eye button JQuery Text Box water mark example Currency TextBox example in windows form  How to reset all TextBox in windows form

How to add StaticResource and DynamicResource style in WPF

Introduction In this article i will explain about style in wpf, How to use staticResources in wpf. Through the windows.Resources tag i will explain how to use style in xaml. Also use the DynamicResources in app.xaml file. Example of DynamicResourcs style in app.xaml file.  Description If you want to do some changes in formatting of your page or control then add some attribute like Background Foreground etc in xaml tag.But if you want to do same changes with 1000 of controls then what to do. There are two options first one is changes in all tags and second one is changes in one place but effect appear in all controls. Now, this example i will use both methods for you. This video cover:  How to add TextBlock in wpf window, How to add inline style in wpf . How to add foreground and background of TextBlock in wpf. Example of TextBlock control in wpf. How to change color of TextBlock in wpf. How to change foreground and background color of button control. How to use window.

How to bind Dropdownlist from all countries name in asp.net c#

In this article i will show you how to bind the dropdownlist to countries name. You can say load dropdownlist from countries names like United State, United Kingdom etc in asp.net c#. By the System.Globalization namespace you can bind dropdownlist to countries name in asp.net c#. In previous article i explained some topics on dropdownlist: Dropdownlist item with image in asp.net c# Tooltip on specific item of dropdownlist Bind dropdownlist with alphabets Validate dropdownlist in asp.net c# Source code of this article: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="BindCountries.aspx.cs" Inherits="BindCountries" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title> </head> <body>     <form id="form1" runat="server">     <div>         <asp:DropDownList ID="D