Skip to main content

Posts

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

How to design finger print/ scanner based project in C#

In this article, I will show you, how to compare two images in c#. You can say that how to match prints images in c#. Basically, this types things we can implement in biometric systems like fingerprint etc. If you want to work on this system, follow these mentioned steps to complete this task. Step-1:  Create a windows form project using Visual Studio, you can take any version of visual studio. Step-2:  Design output type form in default added file ie. form1 Step-3:  Copy and Paste mentioned code, according to their controls using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Fingure_print {     public partial class Form2 : Form     {         Bitmap bitmapPictureBox1;         Bitmap bitmapPictureBox2;         public Form2()         {             InitializeComponent();

Blood bank System project in ASP.NET C#

Introduction The blood bank system provides some information about blood bank. A needy person can take some points of blood with their blood groups. By using this system, we provides the information  about donor and takers. These all information are public. Any one  person register in the control panel and after successfully register in the panel. He/She can login in the system. We have a form for donor, in this form, donor fill these mentioned fields. Donor Id :  Int type Name :  nvarchar (100) Blood Group :  nvarchar ( 50) Contact ( Phone Number)  : nvarchar (50) Address : nvarchar(max) Picture:  nvarchar(max) After filling the form, information display on home screen, registered user can see donor information. Project also provide the search facility, through it, registered user can see donor information, according to blood group. It provide the total storage of blood in the bank. Bank takes blood from outer side also vice versa. Total in and out details s

GridView rows details on DetailsView using onSelectedIndexChanged event in ASP.NET C#

Bind Details view using onselectedIndexChanged event of Gridview view. First to Bind the Gridview with select command. By using selectedIndexChanged method you can bind the details view. If you want to bind the DetailsView from Gridview Row then use select command name in GridView's button field name. In the Code behind file, first to bind the Gridview from database table. Retrieve the selected Row data using select command, bind DataTable with Retrieved data. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title> </head> <body>     <form id="form1" runat="server">     <div>         <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false"

Banking Software Application Project in c#

Introduction Purchase Banking software project built in window platform. By using this software, we can do banking task easily. In this project,  I have to provide you banking functionality like Create new account, update customer account, deposit money, transfer money etc. I will give you project executable file to run the project. If you want to learn how to design this project then follow these mentioned steps: [Video Describe full details] Start from Login screen. If admin username exists in database table then loginIn into the system else give failed message. 2. If login success then enter in main screen. 3. Similarly all option which is given in the project. Requirement Software : Visual Studio 2013.  How to run you project Double click on application executable file and run your project. How to design Banking Software First to create a login form for Administrator. After successfully login, administrator can do some work in

How to retrieve items from database table in JAVA using Netbeans

In this article i will explain you, how to retrieve items from database table in Java using Netbeans. In previous article, we have already learned, how to create connection with the derby database using netbeans . Before reading this article, please must to see the previous article for implementations. In this article, i only explain you, how to use executeQuery( ) method and select statement in java. -- How to create connection with database full video tutorial  Code : class abc {     public abc() throws SQLException     {         Connection conn=DriverManager.getConnection("jdbc:derby://localhost:1527/student", "tarun", "tarun");         System.out.println("Connection Created");         Statement st=conn.createStatement();         ResultSet rs=st.executeQuery("select * from USERTABLE");         while(rs.next())         {             System.out.println(rs.getString(2));         }         } } Here, we have a ta

How to use mouseenter( ) and mouseleave( ) method in JQuery

The meaning of mouse enter and mouse leave are, when your cursor enter your object bounary then mouse enter method raised similarly when your cursor goes out of your object boundary then mouse leave method raised. I will give you an example of mouse enter and mouse leave method. Lets see the example, in this, we have division, when your cursor move on your divison boundary then division background changed also text of division will be changed. This also contain mouseleave() method with the same functionality. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default22.aspx.cs" Inherits="Default22" %> <!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>         $(document).ready(function()         {             $('div').mo

How to create Database connection in JAVA using Netbeans

If you want to connect database with your java application then first to need a database. First to create database using Netbeans services tab. This tab available under Windows tab. You can also select this tab by using shortcut CTRL+ 5. Expand the databases tab, select "Create Database." option.  2. Fill fields which are shown under diagram.  3. After filling the form, you have to create database successfully.  4. Right Click on your connection string name, select properties for copy the database URL. 5. Copy Database URL, which is used further. 6. Create a new java project under projects tab.  7. Add a Library in the "Libraries" section of your project. 8. Select Java DB Driver under Add Library section. 9. Open your .java file which is exists in java packages folder of your project.  10. Create a another class object, which is exists in same package. 11. Now, Open the object class, create constructor in it.

ASP.NET ListBox Insert Multiple selected item into database

In this article, I will show you how to insert multiple selected item in  database table. I have already done one projects on this topic i.e online movie ticket booking system. In this project, i selected multiple tickets by using comma symbol in TextBox. The same article i will do in different manner. In this we have a ListBox with multiple selection mode. What i do in code behind : Store the selected of ListBox items to the string type list. For the each item, i will create a Query statement, Suppose your List contain two items i.e "Apple" and "Mango", Both are selected then use String builder class to Append Query. Like "insert into [tablename] (fruitname)values('Apple')";  and for second item  "insert into [tablename] (fruitname)values('mango')"; Source Code <%@ Page Language="C#" AutoEventWireup="true" CodeFile="multipleselect.aspx.cs" Inherits="multipleselect" %>

By using Single LINQ Query retrieve foriegn key table column

In this article, I will explain you, How to retrieve data from two joined table using single LINQ Query. Here we have two joined table in mentioned diagram. Both tables are joined from dept_no, so if you want to retrieve record from both table like: Retrieve emp_id and emp_name who belongs to IT department. employeeEntities empl = new employeeEntities();             var query = from g in empl.emps                         join m in empl.depts on g.dept_no equals m.dept_no                         where m.dept_name == "IT"                         select new                         {                             Emp_Name = g.emp_name,                             Emp_ID = g.emp_id                         };                             dataGridView1.DataSource = query.ToList(); In this code, empl is the context object through which we can access columns of both tables. emp is the foreign key table map with dept table using dept_no column. Emp_Name and Emp_I

[Solved] Rows cannot be programmatically removed unless the DataGridView is data-bound to an IBindingList that supports change notification and allows deletion.

[Solved] Rows cannot be programmatically removed unless the DataGridView is data-bound to an IBindingList that supports change notification and allows deletion. When you bind the Datagridview with List in windows form. You get error when you delete row from it. According to article title, first to implement your List from IBindingList interface, if you want to solve this issue. Suppose, you want to bind your DataGridView with this class, which is mentioned below: public partial class userAccount     {         public decimal Account_No { get; set; }         public string Name { get; set; }          }     } Then you write simple code for this : List<userAccount> ua= new List<userAccount>(); ua.Add(new userAccount(){Account_No=1000000008, Name ="Jacob"}); dataGridView1.DataSource = ua; After binding the DataGridview, you will write the code for remove row from dataGridview. dataGridView1.Rows.RemoveAt(dataGridView1.SelectedRows[0].Index); After th

Login username password saved in cookies

We all know about login form. In it, we have two fields first and second  that are username and password. Both are stored in browser memory via HttpCookie. I mean to say when you first-time login into your account your username and passwords are saved into your browser cache. So, when you come again on your website, it did not ask username and password again, redirect on home page. Before reading this article, if you want to know about cookie then watch mentioned video.Now,  Lets start to save username and password in the cookies.  <%@ Page Language="C#" AutoEventWireup="true" CodeFile="logincookies.aspx.cs" Inherits="logincookies" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title> </head> <body>     <form id="form1" runat="server">     <div>              Use

Refreshing / reloading of pages and delayed redirect using Meta tags in ASP.Net c#

In this article, I will explain you, how to reload page after few seconds. This types of logics appear where web page refresh just after few seconds like yahoo cricket. By using Meta tag, we can implement in web technologies. I will give you an example of it. This article cover such things like : Watch full code video Page Reload/ Refresh after 10 seconds. By using code we can do reload/ refresh page. By using AppendHeader( ) method we can solve this query. Redirect after 5 seconds to new page. Redirect page after session out. By using meta tag's attribute, we can refresh webpage, in which we have two attributes i.e http-equiv and content. Let's, take an example: <head runat="server">     <title>Meta Tags Example</title>      <meta http-equiv="Refresh" content="10" /> </head> We can do this thing by using c# code. By using HtmlMeta class's property, we can also refresh page just after 10

Blocked fake download button websites by Google

Thanks to google for blocking sites which  contain deceptive material and fake download button. Many sites owners focus on ads and fake clicks. So they put download button just after important information, suppose your article is related to project download and you put download advertisement in place of actual download link. When visitor comes on your website and they click on advertisement. The whole deceptive material banned by google's safe browsing tech. By using this ,you can protect yourself or computer from malware and unwanted software. Source : http://arstechnica.com/    Google already banned those site which contain wrong information and unwanted Softwares, you can say which breaks "Social Engg attacks".  

How to use JavaScript in Master Page ContentPlace Holder in ASP.NET

In this article, I will explain you, How to use JavaScript code in ContentPlaceHolder of Master page. If your web page (Web Form=.aspx page)  is inherit from master page then you must to use ClientID of the control to get the value. Like document.getElementById("<%=Label1.ClientID%>"); By using above mentioned code we want to retrieve inner html text of the label. If you are using java script in simple web form which is not inherit from master page then you can use simple id of the control as parameter. Like document.getElementById("Label1"); How to use JavaScript in Master page's Content PlaceHolder Step-1 :  Add a Master page also add web form. Step-2 :  Do Inherit web form from master page. Step-3 :  Write the below mentioned code in the content place holder of the web form. <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">     <asp:TextBox ID="TextBox1&quo

How to use ExecuteScalar method in ASP.NET c#

This method returns integer type value, actually, it returns top tuple no of record from the table. Here I will provide you an example of ExecuteScalar ( )  method. By using this example you can retrieve top tuple no from the record.  Source Code <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title> </head> <body>     <form id="form1" runat="server">     <div>              <asp:Label ID="Label1" runat="server"></asp:Label>         <br />         <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Get Record" />          </div>     </form> </body> </html> CodeBehind Code using System; using System.Collections.Generic; using System.Linq; using System.Web; using Sys