-->

Monday, July 8, 2013

Crime File management System Project in ASP.NET

Crime File management System Project in ASP.NET

Aim of the project
The basic aim of this project is store criminal record ,  search criminal record and find current location of the criminal.

Security of the project :

Project contain username and password field for security with proper validation (client side and server side validation) . Project security screen shot is

crimefile



  <p>
        <h2>Login for security</h2></p>
    <asp:ValidationSummary ID="ValidationSummary1" runat="server" BackColor="#CCCC00" BorderColor="Black" BorderStyle="Solid" BorderWidth="4px" />
        <p>
        Enter member username :&nbsp;
        <asp:TextBox ID="usrtxt" runat="server" Width="182px"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="usrtxt" ErrorMessage="Enter Username" ForeColor="Maroon">*</asp:RequiredFieldValidator>
    </p>
    <p>
        Enter&nbsp; member password : <asp:TextBox ID="pwd" runat="server" TextMode="Password" Width="182px"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="usrtxt" ErrorMessage="Enter password" ForeColor="Maroon">*</asp:RequiredFieldValidator>
    </p>
    <p>
        <asp:Button ID="Button1" runat="server" Text="Member Login" OnClick="Button1_Click" />
    </p>
    <p>
        <asp:Label ID="Label1" runat="server"></asp:Label>


Code behind code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
public partial class welcome : System.Web.UI.Page
{
 SqlDataReader rd;
protected void Page_Load(object sender, EventArgs e)
{
}
 protected void Button1_Click(object sender, EventArgs e)
{
 bool flag=true ;
using (SqlConnection con = new SqlConnection())
{
 con.ConnectionString =ConfigurationManager .ConnectionStrings ["ConnectionString"].ToString ();
con.Open ();
using (SqlCommand cmd=new SqlCommand ())
{
 cmd.CommandText ="select * from [Table]";
cmd.Connection =con;
rd=cmd.ExecuteReader (CommandBehavior .CloseConnection);
while (rd.Read ())
{
 if (rd["username"].ToString ().Equals(usrtxt .Text) && rd["password"].ToString ().Equals (pwd .Text))
{
 flag =false ;
 Session ["username"]=rd["username"].ToString ();
break ;
}
}
 if (flag ==true)
 Label1 .Text ="No record found";
else
 Response .Redirect ("~/admin/securepage.aspx");
}
}
}
}
Software requirements of the project are:
  • Visual studio 2013
How to run this project:
  • Open website in  visual studio 2013
  • Run your project
  • ByDefault your username and password are : admin and admin



Your project will submit after 5 hour 


Read other related articles

Also read other articles

© Copyright 2013 Computer Programming | All Right Reserved