100% found this document useful (2 votes)
674 views179 pages

Real Esstate

The document discusses a proposed real estate web application project. It describes the existing problems with current real estate websites and systems. The proposed system aims to provide a single global platform for property owners, agents, and seekers to buy and sell properties worldwide. It will also allow property registration, searching, and management to be done online through the new centralized website and database.

Uploaded by

shobhit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
674 views179 pages

Real Esstate

The document discusses a proposed real estate web application project. It describes the existing problems with current real estate websites and systems. The proposed system aims to provide a single global platform for property owners, agents, and seekers to buy and sell properties worldwide. It will also allow property registration, searching, and management to be done online through the new centralized website and database.

Uploaded by

shobhit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 179

An

Industrial Project Report


On

MAX REAL ESTATE


Submitted in partial fulfillment of the requirements for the course of
MASTER OF COMPUTER APPLICATION
From
U.P. TECHNICAL UNIVERSITY, LUCKNOW
Undertaken at
HIGH TECHNOLOGIES SOLUTIONS

By:
Nabeela Khan
(1101414022)
SUBMITTED TO:
M.C.A DEPARTMENT

Shri Ram Murti Smarak College of Engineering & Technology


Bareilly-243202 (Uttar Pradesh)

INDIA

ACKNOWLEDGEMENT
We thank the almighty for giving us the courage & perseverance in completing the project.
This project itself is an acknowledgement for all those who have given us their heart-felt-cooperation in making it a grand success.

We are also thankful to the project guide, Mr. Abhinav Tripathi for extending their
sincere & heartfelt guidance throughout this project work. Without their supervision and many
hours of devoted guidance, stimulating & constructive criticism, this project would never come
out in this form.

Our special thanks to all the lectures of Master in Computer Application, for their
valuable advises at every stage of this work.

Last but not the least; we would like to express our deep sense and earnest thanks giving
to our dear parents for their moral support and heartfelt cooperation in doing the project. We
would also like to thank our friends, whose direct or indirect help has enabled us to complete this
work successfully.
Thanking you!
Nabeela Khan
Roll NO. 1101414022

TABLE OF CONTANTS
Topic:

Page No.

1.
2.
3.
4.

ABSTRACT
INTRODUCTION & PROBLEM STATEMENT
INITIAL REQUIREMENT
SYSTEM ANALYSIS
4.1.
BUSINESS NEEDS
4.2.
OBJECTIVES
4.3.
EXISTING SYSTEM DESCRIPTION
4.4.
PROPOSED SYSTEM
4.5.
BENEFITS
4.6.
FEASIBILITY STUDY
5. SOFTWARE REQUIREMENT
5.1.
OBJECTIVE
5.2.
SCOPE
5.3.
TIME CONSTRAINTS
5.4.
REQUIREMENT NORES/LEGENDS
5.4.1.
PRIORITY OF REQUIREMENT
5.5.
REQUIREMENTS
5.5.1.
FUNCTIONAL REQUIREMENTS
5.5.2.
SECURITY REQIREMENTS
5.5.3.
OUTPUT REQUIREMENTS
5.6.
DATA MANAGEMENT
5.7.
DEPLOYMENT REQUIREMENTS
5.7.1.
SOFTWARE REQUIREMENTS
5.7.2.
HARDWARE REQUIREMENTS

6. SYSTEM DESIGN
6.1.
SOFTWARE PROCESS MODEL
6.1.1.
SCRUM METHODOLOGY
6.1.2.
PHASE STEPS
6.2.
SYSTEM DESIGNING APPROACHES
7. HIGH LEVEL DESIGN
7.1.
ENTITIES INVOLVED
7.1.1.
AGENT
7.1.2.
OWNER
7.1.3.
PROPERTY SEEKER
7.1.4.
ADMINISTRATOR
3

6
8
10

15

20

25

7.2.
7.3.
7.4.
7.5.
7.6.
7.7.

FEATURES OF MAX REAL ESTATE


MODULE OF MAX REAL ESTATE
TOOLS & TECHNOLOGY USED
LANGUAGE FOR PROGRAMMING
FLOW CHART
DATA FLOW DIAGRAM
7.7.1.
CONTEXT LEVEL DATA FLOW DIAGRAM
7.7.2.
LEVEL-1 DATA FLOW DIAGRAM
7.8.
E-R DIAGRAM
7.9.
USE CASE DIAGRAM
8. LOW LEVEL DESIGN
8.1.
DATA DICTIONARY
9. SCREEN SHOTS
10. CODING
11. TESTING
11.1. UNIT TESTING
11.2. INTEGRATION TESTING
12. IMPLEMEMATATION
13. APPLICATION OF THE SYSTEM
14. SOFTWARE MAINTENANCE
15. FUTURE ENHENCEMENT
16. CONCLUSION
17. REFERENCES

44
57
162
165
167
167
170
171
172

INTRODUCTIONS & PROBLEM


STATEMENT

1. Introduction & Problem Statement:


There are large numbers of commercial real estate online information service providers offering a
suite of commercial properties and services tailored to the national and local needs of the
commercial investments industry. These online marketplaces have thousands of commercial real
estate properties for sale and lease under various categories including commercial office space,
industrial, single - family, multi - family, land, etc. both for sale and lease as well. Their purpose it
to attract community of industry professionals including investors, property managers, landlords,
appraisers, local and national Property Seekers to select the properties with desired features.
In this increasingly demanding scenario for a platform which could help Property Seekers to have
a look at the listings of available properties around the world with all its photographs, necessary,
specification and description. Our client needs a web based interface for all Property Seekers and
Property Agent/Owners from whole world to buy as well as sell their properties worldwide.
The project that we developedwas related with the one of the Property Dealing Organizations in
US. Here we are going to have the details description of the project that is implemented. The
primary function of the organization is to satisfy the needs of the Property Agents, Property
Owners and Property Seekers

INITIAL REQUIREMENT
7

2. Initial requirement:
This Real Estate Web application provides functionalities for both Property Agent/Owner and
Property Seeker. The Property Seekers can browse the web site without any security and they can
search for houses based on state/city/price/features. Also they can search the houses based on
state/city/address. For the Property Agent/Owner, a security issue is added. The Property
Agent/Owner needs to create an account in the system and every time he logs in, the previous
advertisements posted by him are presented. He can then delete any of these, and he can add new
ones.
The functionalities are as follows:
1. The Property Seeker can search for houses according to detailed information:
country/state/city/price/property/bedroom/bathroom/additional features.
2. The Property Seeker can search for houses by country/state/city/street name.
3. The website allows being member of it. So a person needs to be registered first in order to
be member of MAX Real Estate.
4. The results are displayed on multiple pages and the Property Seeker can view the next or
previous page.
5. The results can be sorted and viewed by selecting the sorting item and order.
6. When a Property Seeker clicks the link for each listed item, he will be redirected to a page
that lists the detail information for this house.
7. A Property Agent/Owner can create an account in the system, and each Property
Agent/Owner has a username and a password.
8. The Property Agent/Owner can log into the system, and his existing advertisements are
displayed.
9. The Property Agent/Owner can delete existing advertisements from the database.
10. The Property Agent/Owner can add new advertisements and provide the detailed.
11. Property seeker is able to send feedback about particular property thats details has been
listed on the website.
12. The website administer can manage details of users as well as properties listed on web.
13. Property Seeker can plan for tour to see property physically along with agents.

SYSTEM ANALYSIS
9

4.1.
Business
Needs:
Currently
organization
working
India. They
collecting

the
is
in
are
the
10

information provided by the different agents and after that we are storing the information related
to the properties in the online centralized database. The client wanted to improve the productivity
by providing the solution of Online Registration of Agents and Properties. The primary goal of the
client is to introduce a global concept of Property Dealing. It is responsible for storing all the
details about the Property and Owner. The client wants to provide the property to seekers on the
single click event of the user.

4.2. Objectives:
The foremost objective of this project is to provide single global platform to all property
owner, agents and seekers to buy and sell their respective properties.
One of the objective of this project is to give a different visualization styles to the Real
Estate Website which has more features, attractive animations and all together a new look
in contrast to the already existing websites
The next objective of this project Real Estate Web Application is to enable the Property
Seekers to search for property listings online.
The next objective of this application is to design a feature rich search engine which can
make the search of commercial land/properties an easy task.
Registration of the Agents and Property Owner.
Website interface is required in order to provide the users to interact with the properties in
an efficient way. The display format must contain all the details about the property.
Property Details should be uploaded without any difficulty including the pictures related
to the property.
Search criteria must be provided..

11

4.3. Existing System Description:


The purpose of creating this Real Estate Web Application is to outcast the discrepanciesin
hundreds of such existing Real Estate websites on the World Wide Web. Generally most of the
websites on World Wide Web provide property related information of one, two or three countries
there is no website which provides all property related information for all countries of the world.
And our client does not have any website to promote their real estate business.
The existing system has following drawbacks:
1. Currently client does not have such website that provides a single platform for all the
Property Seeker and Property Agent/Owners and centralizes all the information about
available properties worldwide.
2. They dont have centralized database to maintain information related to the properties
from single location, all the information needed about properties are available location
wise.
3.

Actual owner registration for property sell is not possible. Only agent can register so
unnecessary expenses of agent commission, increases the cost of actual property.

4.4. Proposed System:


We proposed complete website solution for the application to create an Online MAX Real Estate
website. The iterative, time bound approach adopted by Company to address the client
requirements that are as follows:

Define To- Be processes


i.
ii.
iii.

Come up with the solution of the existing problem


Go through the regressive reviews by different business process
Prepared user interface requirements

Develop High Level Design and Low Level Design before Execution
i.

Built and design all the processes required by Client


12

ii.
iii.
iv.

Conducted survey of all Property Dealing Websites and documented realities


Developed the architecture of the Software Solution
Developed the project design in detail for the software developer in company

13

4.5. Benefits:
The provided solution will provide complete solution for the client and after this website
launching the basic requirements of the Properties can be easily available for Sale and Purchase.
Some of the other intangible benefits could be:
Property seeker satisfaction as he is getting all the details about the property.
It is providing a better way to upload the properties to provide a global platform.
Provides single global platform to all property owner, agents and seekers to buy and sell
their respective properties.
Give a different visualization styles to the Real Estate Website which has more features,
attractive animations and all together a new look in contrast to the already existing
websites
Property Seekers can search for property listings online.
A feature rich search engine which can make the search of commercial land/properties an
easy task.
Registration of the Agents and Property Owner.
Property Details will be uploaded without any difficulty including the pictures related to
the property.
Search criteria are provided: Quick Search and Advance Search.
Users of website can send feedback about any property.
Also they can post any special query about property or any other thing related to website.
Seeker can plan tours with agents to view the property. Also there should be some
authentication is required for agents safety.

14

4.6. Feasibility Study:


Feasibility study is the measure of how beneficial or practical the development of an information
system will be to an organization. The Feasibility analysis is a cross life cycle activity and should
be continuously performed throughout the system life cycle.
Feasibility tests:
4.6.1. Operational feasibility:
By providing a web based interface for property dealing globally seeker and agent/owner will feel
better. Users will get a very quick service by searching based on various criteria and get details of
properties within seconds. Also client will feel comfortable by reduction of their work. Easy to
handle a large and centralized database. Losing of records will be avoided.
Considering all these factors we can conclude that all the users and end userswill be satisfied by
the system.
4.6.2. Technical feasibility:
For the design and development of the system, several software productshave been
accommodated.
Database design MS SQL Server 20012 (Preferred) or any other DBMS.
Interface design ASP.NET, FLASH.
Coding C# (Preferred) or any other supported Language.
This technology (ASP.NET) has enough efficiency in producing the system. Therefore the project
is technically feasible.
4.6.3. Schedule feasibility:
The duration of time required for the project has been planned appropriately and it is the same as
the duration of time expected by the client. Therefore the websitecan be delivered to the client
within the expected time duration, satisfying the client. Hence the project is feasible in
scheduling.

4.6.4. Economic feasibility:


According to the resources available and the project scheduling process it is estimated that the
expenses allocated for the web application to be developed, by the client is sufficient enough.
Hence the economical factor has been considered feasible.

15

SOFTWARE REQUIREMENT

16

5.1.

Objective:

This document represents the various technical and functional requirements analysis of Real
Estate Web Application and business process requirements of client. This document is produced
prior to Detailed Design and development of the application. It will be used by the design team as
the baseline for establishing systems design and ultimately the development of the system.

5.2.

Scope:

The scope of MAX Real Estate is to provide efficient searching of property information from all
over the world. MAX Real Estate is also providing a common global platform for property
Seekers, Owners and property Agents.
The requirements specified in this document cover the entire necessary and mandatory feature of
application required by the client. The data captured in this process will aid the testing process
during unit testing and deployment. The software is required to fulfill all the functional
requirements to identify by this document.

5.3.

Time Constraints:

The final deployment of this website will not take place until all functional features has tested.

5.4.

Requirement Notes/Legends

5.4.1. Priority of requirement:


C
R
O
SM
EF

Conditionally Required
Required
Optional
System Maintained
External Feature

17

5.5. Requirements:
5.5.1. Functional Requirements:
S.
No.
1

Req. No.

Requirement

R5.1.1

Priorit
y
R

R5.1.2

Web site should be user friendly and secure.

R5.1.3

Quick and Advance search should be customized to


retrieve the information related to that module in fast and
precise manner

R5.1.4

Owner registration should be facilitated by this site

R5.1.5

System should have the capability to handle multiple


databases.

R5.1.6

Database backup and migration feature

R5.1.7

Facility for seeker for planning a tour.

R5.1.8

This web site is being mainly used by four type of user


Agent,Owner,Property seeker, so there must be better
interaction of property seeker with Agents and Owners

R5.1.9

Owner should not be allowed to delete its property


listing, once has uploaded.

10

R5.1.10

Site should provide efficient and easy uploading of


property details, images and other information

11

R5.1.11

Site should contain efficient and easy page navigation

12

R5.1.12

EF

Property seeker must become the member of the site if


want to make his/her for tour of property otherwise can
search out the property information without being login

13

R5.1.13

Administrator can see the status of the user to check its


authentication to use the site

14

R5.1.14

Administrator can see the feedback sent by user and can


resolve their queries

User interface should be web based.

18

5.5.2. Security Requirements:


S.No
.

Requirement

Req.No. Priorit
y
R5.2.1
R

R5.2.2

All the important information of database must be secure


and protected from the malicious user

R5.2.3

All users of the site must have separate login and


authentication, and would be provided different feature in
the application based on their privilege level.

There should be log maintained for login and logout of


administrator

5.5.3. Output Requirements:


S.No
.

Req.No.

Priorit
y

Requirement

R5.3.1

Property listing will display only 8 records at time.

R5.3.2

If user needs to see the details of property then he/she can


do on single click.

R5.3.3

User can see his/her profile

R5.3.4

Administrator can view property listing.

R5.3.5

R5.3.6

Administrator can view registered seeker that want tour


with agents
Administrator can view agent/owner information listing.

19

5.6.Data Management:

The data should be stored in such a way that it is properly and quickly accessed. Separate
folder should be maintained for each and every property wherein the user (agent/owner)
can upload images or videos (if any) related to his/her property. The name of the folder
should have unique name viz.
The searching of property listing should be quick and efficient. Apart from data handling
on users side, the data should be handled more properly on the administrators side. The
administrator should have the power to delete users. If a UserId is deleted it should be
taken care of that all the login details along with basic profile of user should also be
deleted subsequently.

5.7. Deployment Requirements:


5.7.1 Software Requirement:
OPERATING SYSTEM
: Windows 7 and Above
INTERNET BROWSER
: internet explorer 6.0 and Google Chrome
SERVER
: IIS 6 (Internet Information Server)
ENVIRONMENT
: Visual Studio 2012
BACK END
: SQL server 2008 R2
FRONT END
: C# with ASP.NET, JAVA Script
FRAMEWORK
:Microsoft .NET Framework 4.0 or higher

5.7.2 Hardware Requirement:


PROCESSOR
MAIN MEMORY
MONITOR
MOUSE

: PENTIUM 4 or Above
: 1 GB or higher
: 14SVGACOLOR
: Any Plug & Play Mouse

20

SYSTEM DESIGN

21

7. SYSTEM DESIGN
7.1.Software Process Model followed:
7.1.1. SCRUM Methodology:
The SCRUM approach assumes that the analysis, design, and development processes in the Sprint
phase are unpredictable. A control mechanism is used to manage the unpredictability and control
the risk. Flexibility, responsiveness, and reliability are the results.

Characteristics of SCRUM methodology are:

22

The first and last phases (Planning and Closure) consist of defined processes, where all
processes, inputs and outputs are well defined. The knowledge of how to do these processes is
explicit. The flow is linear, with some iterations in the planning phase.
The Sprint phase is an empirical process. Many of the processes in the sprint phase are
unidentified or uncontrolled. It is treated as a black box that requires external controls.
Accordingly, controls, including risk management, are put on each iteration of the Sprint phase
to avoid chaos while maximizing flexibility.
Sprints are nonlinear and flexible. Where available, explicit process knowledge is used;
otherwise tacit knowledge and trial and error is used to build process knowledge. Sprints are
used to evolve the final product.
The project is open to the environment until the Closure phase. The deliverable can be changed
at any time during the Planning and Sprint phases of the project. The project remains open to
environmental complexity, including competitive, time, quality, and financial pressures,
throughout these phases.
The deliverable is determined during the project based on the environment.

7.1.2. Phase Steps:


Each of the phases has the following steps:
Planning:

Development of a comprehensive backlog list.


Definition of the delivery date and functionality of one or more releases.
Selection of the release most appropriate for immediate development.
Mapping of product objects for backlog items in the selected release.
Definition of project team(s) for the building of the new release.
Assessment of risk and appropriate risk controls.
Validation or reselection of development tools and infrastructure.
Estimation of release cost, including development, collateral material, marketing,training,
and rollout.
Verification of management approval and funding.

Architecture/High Level Design

Review assigned backlog items.


Identify changes necessary to implement backlog items.
Perform domain analysis to the extent required to build, enhance, or update the domain
models to reflect the new system context and requirements.
Refine the system architecture to support the new context and requirements.
23

Identify any problems or issues in developing or implementing the changes


Design review meeting, each team presenting approach and changes to implement each
backlog item. Reassign changes as required.

Development (Sprint)
The Development phase is an iterative cycle of development work. The management determines
that time, competition, quality, or functionality is met, iterations are completed and the closure
phase occurs. This approach is also known as Concurrent Engineering. Development consists of
the following macro processes:

Meeting with teams to review release plans.


Distribution, review and adjustment of the standards with which the product will conform.
Iterative Sprints, until the product is deemed ready for distribution.

A Sprint is a set of development activities conducted over a pre-defined period, usually one to
four weeks. The interval is based on product complexity, risk assessment, and degree of oversight
desired. Sprint speed and intensity are driven by the selected duration of the Sprint. Risk is
assessed continuously and adequate risk controls and responses put in place. Each Sprint consists
of one or more teams performing the following:

Develop: Defining changes needed for the implementation of backlog requirements into
packets, opening the packets, performing domain analysis, designing, developing,
implementing, testing, and documenting the changes. Development consists of the micro
process of discovery, invention, and implementation.

Wrap: Closing the packets, creating a executable version of changes and how they
implement backlog requirements.

Review: All teams meeting to present work and review progress, raising and resolving
issues and problems, adding new backlog items. Risk is reviewed and appropriate
responses defined.

Adjust: Consolidating the information gathered from the review meeting into affected
areas, including different look and feel and new properties.

Each Sprint is followed by a review, whose characteristics are:

The whole team and product management are present and participate.
The review can include customers, sales, marketing and others.
Review covers functional, executable systems that encompass the objects assigned to that
team and include the changes made to implement the backlog items.
The way backlog items are implemented by changes may be changed based on the review.

24

New backlog items may be introduced and assigned to teams as part of the review,
changing the content and direction of deliverables.
The time of the next review is determined based on progress and complexity. The Sprints
usually have duration of 1 to 4 weeks.

Closure
When the management team feels that the variables of time, competition, requirements, cost, and
quality concur for a new release to occur, they declare the release closed and enter this phase.
This phase prepares the developed product for general release. Integration, system test, user
documentation, training material preparation, and marketing material preparation are among
closure tasks.

25

7.2. System designing approaches:


Top Down designing:
The top - down designing approach started with major components of the system. It is a stepwise
refinement which starts from an abstract design, in each steps the design is refined two or more
concrete levels until we reach a level where no more refinement is possible or not needed.
Bottom Up designing:
In bottom up designing the most basic and primitive components are designed first, and we
proceed to higher level components. We work with layers of abstractions and abstraction are
implemented until the stage is reached where the operations supported by the layer is complete.

Approach we are following:


In this project we are following Mixed Approachi.e. A combination of top down and bottom
up. We are developing some of the components using top down designing approach (e.g. the
Webpages) and the some components in bottom up designing approach (e.g. the middle tier
classes).

26

HIGH LEVEL DESIGN

27

28

8. HIGH LEVEL DESIGN


8.1. Entities Involved:
The website is basically dealing with following categories of users.
o Agent
o Owner
o Property Seeker
o Administrator

8.1.1. Agent:
Agent is the mediator between property seeker and actual property owner .He/she will register
him/her after paying some required amount to administration and get its login id. Agent will
register him and provide property related information and also upload the images of the property
(if any).Agent will provide his/her personal and contact detail so that he/she can be contacted by
either owner or property seeker.

8.1.2. Owner:
Owner is the actual owner of the property. This site is providing the feature that owner can
register too. Owner can contact to agent also if want to sell his/her property. Like agent, owner too
can upload the property information and related images. Unlike agent, owner cannot delete his list
of property (if has uploaded once).

8.1.3. Property Seeker:


These are those users of this site who can search out the property information based on property
id or feature of the property. They need not to register or login to search out the property listing.
Seeker can book the property or ask for details of property from agent (or owner).He can also
make a query to administrator for details of the property. Also he/she can plan tour with agents.

8.1.4. Administrator:
Administrator is that user who will continuously monitor the working of all other user and will
check out their status and login related information. Administrator is sore responsible for
managing the site. Administrator will also check out the images uploaded by the agent or owner.

29

8.2. Features of MAX Real Estate:


Provides single global platform to all property owner, agents and seekers to buy and sell
their respective properties.
Give a different visualization styles to the Real Estate Website which has more features,
attractive animations and all together a new look in contrast to the already existing
websites
Property Seekers can search for property listings online.
A feature rich search engine which can make the search of commercial land/properties an
easy task.
Registration of the Agents and Property Owner.
Property Details will be uploaded without any difficulty including the pictures related to
the property.
Users of website can send feedback about any property.
Also they can post any special query about property or any other thing related to website.
Also seeker can plan tour with agent.

30

8.3. Modules of MAX Real Estate:


1.
2.
3.
4.
5.
6.
7.

Login Module.
Agent/Owner Information Module.
Property Upload Module.
Property Search Module.
Property Feedback Module.
Property Query Module.
Administrator Module.

Login module:
This module is responsible for validating agent/owner logins and provides authentication for users
of the website. This module consists of following properties and methods:

31

New Password

New Password

nswer
Dob, Hinta

Dob, Hintanswer

Us

User Id, Password

32

Figure - DFD for Login Module

Agent/Owner Information Module:


This module is responsible for managing all user related information whether he/she is an agent or
property owner.This module consists of following properties and methods:

MAX Membership Module:


This module manages all information related to each member of MAX Real Estate.

Property Upload Module:


This module manages all the tasks related to properties and its main tasks are:

Add property information.


Update property information.
Upload properties images on server.
And Delete property information.

Property Search Module:


This particular module is used to perform search for properties according to the query fired by the
various property seekers those are visiting the website.

33

Property Feedback Module:


This module is responsible for gathering comments and feedback about any property.

Property Query Module:


This module is responsible for saving and retrieving any query about any property by the users of
the website.

Administrator Module:
This module is responsible for managing all administrative activities related with the website. It
includes following:

User profile management.


Property information management.
MRE membership management.

7.4. Tools & technology used:


1.
2.
3.
4.

Microsoft .NET framework 4.0 as Application architecture.


Visual Studio 2010
Microsoft SQL Server 2008 for back end database.
Microsoft IIS 6 (Internet Information Services) as web server to host our website.

5.

The Real Estate Web Application will be tested on Windows XP platform.

6. Photoshop CS2, Fireworks and Swishmax for graphics and picture editing and designing.

7.5. Languages for Programming:


1. C# for ASP.NET.
2. JavaScript for Client side validation.

34

7.6. Flow Chart:

35

7.7. DATA FLOW DIAGRAMS


Upload Property Information
Delete Property Information

PROPERTY AGENT

Registration\ Login
Login Message

PROPERTY SEEKER
Request Property
Purchase Property
Acknowledgement

Property Detail Information


Request Result

Conformation of Deletion

MAX REAL ESTATE

Registration\ Login
Upload Property Information

Manage Agent/Owner
Manage Property

Login Message
Confirmation Message
Property Detail Information
Property Detail Information

PROPERTY OWNER

ADMIN

Figure Context Level DFD for Real Estate Web Application

36

37

7.8. E R Diagram

38

7.9. Use Case Diagram:

Manage Property Information


Change Password

Change Agent/ Member Status

View log History

View Queries

Figure Use Case Diagram of the system

View Feedbacks

Manage Profile

39

LOW LEVEL DESIGN


Send Feedback

Delete Property Information

Register / Login

40

8. LOW LEVEL DESIGN


9.1. Data Dictionary
Database Design:
Table Name: AgentTable

Database Design:
Column Name
Name
Country
State
City
Dob
Gender
Contactnumber
DealsIn
WorkExperiance
EmailId
autoid

Data Types
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
Int

Allow Nulls
Checked
Checked
Checked
Checked
Checked
Checked
Checked
Checked
Checked
Checked
Unchecked

Description
Name of the Agent
Name of the country
Name of the State
Name of the city
Date of birth
Agent Gender
Mobile number
City Name
Experience in years
Email id As a unique Key
Primary key

Table Name: BathNumberTable


Column Name
Bathnumber
autoid

Data Types
varchar(50)
Int

Allow Nulls
Checked
Unchecked

Description
Numbers of Bath
Primary key

Table Name: BedsTable


Column Name
BedsNumber
BedsValue
autoid

Data Types
varchar(50)
varchar(50)
int

Allow Nulls
Checked
Checked
Unchecked

Description
Number of Beds
Value of the beds
Primary key

Table Name: BookingTable


Column Name

Data Types

Allow Nulls
41

Description

Name
Address
ContactNumber
EmailId
Loction
Amount
autoid

varchar(50)
varchar(500)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
int

Checked
Checked
Checked
Checked
Checked
Checked
Unchecked

Name of the customer


Address of the customer
Mobile number
Email id as unique key
Current location
Amount in Rs.
Primary key

Allow Nulls
Checked
Checked
Checked
Checked
Checked
Checked
Checked
Checked
Checked
Checked
Unchecked
Unchecked

Description
Name of The builder
Name of the country
Name of the State
Name of The City
Date of Birth
Gender Of builder
Mobile Number
Website URL
City Name
Login Id
Email id as unique key
Primary key

Allow Nulls
Checked
Checked
Checked
Checked
Checked
Checked
Checked
Checked
Checked
Unchecked

Description
First Name
Middle Name
Last Name
Mobile Number
Permanent Address
Gender M/F
Email id as Unique Key
Date of Birth
Resume
Primary key

Table Name: BuilderTable


Column Name
Name
Country
State
City
Dob
Gender
ContactNumber
Web
DealsIn
BuilderId
EmailId
autoid

Data Types
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
int

Table Name: CarrierTable


Column Name
FirstName
MiddleName
LastName
ContactNumber
Address
Gender
EmailId
Dob
FilePath
autoid

Data Types
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(300)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
int

Table Name: CityTable


Column Name
id

Data Types
Int

Allow Nulls
Checked
42

Description
ID of the Table

city_id
city_name
state_id
autoid

varchar(10)
varchar(50)
varchar(10)
Int

Checked
Checked
Checked
Unchecked

ID of the city
City Name
ID of the State
Primary key

Table Name: CountryTable


Column Name
id
country_id
country_name
autoid

Data Types
int
varchar(10)
varchar(30)
int

Allow Nulls
Checked
Checked
Checked
Unchecked

Description
Id of the Tble
OD of The Country
Country Name
Primary key

Table Name: EnquiryTable


Column Name
Name
ContactNumber
EmailId
Message
autoid

Data Types
varchar(50)
varchar(50)
varchar(50)
varchar(500)
int

Allow Nulls
Checked
Checked
Checked
Checked
Unchecked

Description
Name of the Enquire
Mobile Number
Email id
Enquiry Message
Primary key

Table Name: FeedbackTable


Column Name
Name
City
Phone
EmailId
FeedBAck
autoid

Data Types
varchar(50)
varchar(500)
varchar(50)
varchar(50)
varchar(500)
Int

Allow Nulls
Checked
Checked
Checked
Checked
Checked
Unchecked

Description
Name of the feedback person
Name of the city
Mobile Number
Email id of the person
Feedback Message
Primary key

Table Name: LoginTable


Column Name
AutoId
EmailId
Passwd
Type

Data Types
int
varchar(50)
varchar(50)
varchar(20)

Allow Nulls
Unchecked
Checked
Checked
Checked
43

Description
Primary key
EmailId As Unique Key
Password
Type (Builder/Owner/Agent)

Table Name: MemberInfoTable


Column Name
Name
Country
State
City
Dob
Gender
ContactNumber
DealsIn
MemberID
EmailId
autoid

Data Types
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
int

Allow Nulls
Checked
Checked
Checked
Checked
Checked
Checked
Checked
Checked
Checked
Checked
Unchecked

Description
Name of the member
Name of the country
Name of the state
Name of the city
Date of Birth
Gender M/F
Mobile Number
City name
Member Id
Email id as Unique Key
Primary key

Allow Nulls
Checked
Checked
Checked
Checked
Checked
Checked
Checked
Checked
Unchecked

Description
Name of the owner
Name of the country
Name of the State
Name of the city
Date of birth
Gender M/F
Mobile number
Email Id as Unique Key
Primary Key

Table Name: OwnerTable


Column Name
Name
Country
State
City
Dob
Gender
ContactNumber
EmailId
autoid

Data Types
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
int

Table Name: PostRequirementTable


Column Name
Name
ContactNo
Address
Email
State
City
Radius
Price
Type
Landmark

Data Types
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)

Allow Nulls
Checked
Checked
Checked
Checked
Checked
Checked
Checked
Checked
Checked
Checked
44

Description
Name
Mobile Number
Permanent Address
Email Id As Unique Key
Name Of the state
Name of the City
Radius of the land
Price of the land
Type(Land/Appartment/House)
Near LandMark

autoid

int

Unchecked

Primary key

Table Name: PriceRangeTable


Column Name
Price
autoid

Data Types
varchar(50)
int

Allow Nulls
Checked
Unchecked

Description
Price Of the Land
Primary key

Table Name: PriceTable


Column Name
MinimumPrice
Autoid

Data Types
varchar(50)
int

Allow Nulls
Checked
Unchecked

Description
Minimum price of the land
Primary key

Column Name
State
City
PropertyType

Data Types
varchar(50)
varchar(50)
varchar(50)

Allow Nulls
Checked
Checked
Checked

RadiusRange
Radius
PriceRange
Price
ContactPerson
ContactNumber
FilePath
autoid

varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
int

Checked
Checked
Checked
Checked
Checked
Checked
Checked
Unchecked

Description
State Name
City Name
property(Land/House/Apartmen
t)
Appox. Radius
Actual Radius
Appox. Price
Actual Price
Contact Agent Name
Mobile Number of the Agent
Image of the House
Primary key

Allow Nulls
Checked
Checked
Checked
Checked
Checked
Checked

Description
State name
City Name
PIN Code
Multi Listing Service
Appox. Price
Land/House/Apartment

Table Name: Property

Table Name: PropertyInfoTable


Column Name
State
City
Zip
Mls
PriceRange
Type

Data Types
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)

45

Beds
Baths
Radius
RadiusRange
ContactPerson
ContactNumber
ActualPrice
PathFile
autoid

varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(500)
int

Checked
Checked
Checked
Checked
Checked
Checked
Checked
Checked
Unchecked

Number of Beds
Number of Bath
Actual Radius
Appox. Range
Contact Person Name
Mobile Number
Actual Price
Image of the Land
Primary key

Table Name: RadiusRangeTable


Column Name
Radius
autoid

Data Types
varchar(50)
int

Allow Nulls
Checked
Unchecked

Description
Appox. Radius
Primary key

Table Name: SeekerInfoTable


Column Name
Name
Country
State
City
Dob
Gender
ContactNumber
EmailId
autoid

Data Types
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
int

Allow Nulls
Checked
Checked
Checked
Checked
Checked
Checked
Checked
Checked
Unchecked

Description
Name of the Seeker
Country Name
State name
City name
Date of Birth
Gender M/F
Mobile Number
Email Id as Unique key
Primary key

Allow Nulls
Checked
Checked
Checked
Checked
Checked
Checked

Description
Name of the Seeker
Country Name
State name
City name
Date of Birth
Gender M/F

Table Name: SeekerTable


Column Name
Name
Country
State
City
Dob
Gender

Data Types
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)
varchar(50)

46

ContactNumber
EmailId
autoid

varchar(50)
varchar(50)
int

Checked
Checked
Unchecked

Mobile Number
Email Id as Unique key
Primary key

Allow Nulls
Checked
Unchecked

Description
Radius of the Land in Sqft.
Primary Key

Table Name: SpaceAreaTable


Column Name
RadiusInSqFeet
autoid

Data Types
varchar(50)
int

Table Name: StateTable


Column Name
id
state_id
state_name
country_id
autoid

Data Types
int
varchar(10)
varchar(35)
varchar(10)
int

Allow Nulls
Checked
Checked
Checked
Checked
Unchecked

Description
ID of Table
ID of the state
State Name
Country Id
Primary key

Table Name: tblEnquiry


Column Name
Name
ContactNumber
EmailId
Message
Autoid

Data Types
varchar(50)
varchar(15)
varchar(50)
varchar(500)
int

Allow Nulls
Checked
Checked
Checked
Checked
Unchecked

47

Description
Name of the Enquire
Mobile Number
Email Id Of the Enquire
Message Of the Enquiry
Primary Key

48

SCREEN SHOTS OF SYSTEM

Home.aspx

49

About_Us.aspx

registration.aspx
50

feedBack.aspx

Carrier.aspx
51

ContactUs.aspx

SearchProperty.aspx
52

PostRequirement.aspx

53

LoginForm.aspx

forgotpassword.aspx

54

ViewProperty.aspx

AddProperty.aspx

55

QueryView.aspx

ReplyQuery.aspx

56

ViewFeedback.aspx

Carrier.aspx

57

OwnerDetail.aspx

SeekerDetail.aspx

58

AgentDetail.aspx

BuilderDetail.aspx

59

LoginDetails.aspx

viewprofile.aspx

60

changepassword.aspx

updatsseprofile.aspx

61

CODING

62

9.2. Class Design:


connectionManager.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;
///<summary>
/// Summary description for connectionManager
///</summary>
publicclassconnectionManager
{
public connectionManager()
{
//
//
}
privatestaticstring ConnectionStr = @"Data Source=DEVICE;integrted security=SSPI;Persist
Security Info=false;Initial Catalog=MRE";

publicstaticSqlConnection GetConnection()
{
SqlConnection ConnectionDB = newSqlConnection(ConnectionStr);
return ConnectionDB;
}
publicstaticstring ConnectionString()
{
return ConnectionStr;
}
}
Insert.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
63

using System.Data.SqlClient;
using System.Data;
///<summary>
/// Summary description for insert
///</summary>
publicclassinsert
{
publicSqlConnection connectionDB = connectionManager.GetConnection();
public insert()
{
//
// TODO: Add constructor logic here
//
}
publicint tableid(string tablename)
{
try
{
if (connectionDB.State == ConnectionState.Closed)
{
connectionDB.Open();
}
string query = "select count(*) from " + tablename;
SqlCommand command = newSqlCommand(query, connectionDB);
SqlDataReader dr = command.ExecuteReader();
if (dr.Read())
{
returnint.Parse(dr[0].ToString());
}
else
return 0;
}
catch (Exception ex)
{
return 0;
}
finally
{
connectionDB.Close();
}
}
publicbool nonquery(string query)
64

{
try
{

if (connectionDB.State == ConnectionState.Closed)
{
connectionDB.Open();
}
SqlCommand command = newSqlCommand(query, connectionDB);
if (command.ExecuteNonQuery() == 1)
{
returntrue;
}
else
returnfalse;
}
catch (Exception ex)
{
returnfalse;
}
finally
{
connectionDB.Close();
}
}
publicDataSet data(string nonquery)
{

if (connectionDB.State == ConnectionState.Closed)
{
connectionDB.Open();
}
int i = 0;
SqlDataAdapter command = newSqlDataAdapter(nonquery, connectionDB);
DataSet ds = newDataSet();
command.Fill(ds);

65

connectionDB.Close();
return ds;
}
publicstring vendorId(string query)
{
string vendor = "";
try
{
if (connectionDB.State == ConnectionState.Closed)
{
connectionDB.Open();
}
SqlCommand command = newSqlCommand(query, connectionDB);
SqlDataReader dr = command.ExecuteReader();
if (dr.Read())
{
vendor = dr[0].ToString();
return vendor;
}
else
return vendor;
}
catch (Exception ex)
{
return vendor;
}
finally
{
connectionDB.Close();
}
}
}
9.3. CODING:
AddProperty.aspx
<
%@PageTitle=""Language="C#"MasterPageFile="~/Admin/Admin.master"AutoEventWireup="t
rue"CodeFile="AddProperty.aspx.cs"Inherits="Admin_AddProperty"%>
<asp:ContentID="Content1"ContentPlaceHolderID="head"Runat="Server">
66

</asp:Content>
<asp:ContentID="Content2"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">
<center>
<table>
<tr>
<td>State</td>
<td></td>
<td>
<asp:DropDownListID="ddlState"runat="server"AutoPostBack="True"onselectedindexchanged=
"ddlState_SelectedIndexChanged"style="width:165px;height:25px;">
<asp:ListItemSelected="True">-Select-</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidatorID="RequiredFieldValidator1"runat="server"ControlToValidate="dd
lState"ErrorMessage="Select State !"InitialValue="Select-"ValidationGroup="prop"></asp:RequiredFieldValidator>
</td>
<td></td>
<td>City</td>
<td></td>
<td>
<asp:DropDownListID="ddlCity"runat="server"style="width:165px;height:25px;">
</asp:DropDownList>
<asp:RequiredFieldValidatorID="RequiredFieldValidator2"runat="server"ControlToValidate="dd
lCity"ErrorMessage="Select City !"InitialValue="Select-"ValidationGroup="prop"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<tdcolspan="7">
<br/>
</td>
</tr>
<tr>
<td>Zip</td>
<td></td>
<td>
<asp:TextBoxID="txtZip"runat="server"CssClass="validate[required]"style="width:160px;height
:25px;"MaxLength="6"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator3"runat="server"ControlToValidate="txt
Zip"ErrorMessage="Enter Area PIN
Code !"ValidationGroup="prop"></asp:RequiredFieldValidator>
</td>
<td></td>
<td>MLS#</td>
<td></td>
<td>
67

<asp:TextBoxID="txtMls"runat="server"style="width:160px;height:25px;"></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
ControlToValidate="txtMls" ErrorMessage="Enter multiple listing service's !"
ValidationGroup="prop"></asp:RequiredFieldValidator>--%>
</td>
</tr>
<tr>
<tdcolspan="7">
<br/>
</td>
</tr>
<tr>
<td>Price Range</td>
<td></td>
<td>
<asp:DropDownListID="ddlPrice"runat="server"DataSourceID="SqlDataSource1"DataTextField
="Price"DataValueField="Price"style="width:165px;height:25px;">
</asp:DropDownList>
<asp:RequiredFieldValidatorID="RequiredFieldValidator5"runat="server"ControlToValidate="dd
lPrice"ErrorMessage="Select Price !"InitialValue="Select-"ValidationGroup="prop"></asp:RequiredFieldValidator>
<asp:SqlDataSourceID="SqlDataSource1"runat="server"ConnectionString="<%$
ConnectionStrings:MREConnectionString %>"SelectCommand="SELECT * FROM
[PriceRangeTable]"></asp:SqlDataSource>
</td>
<td></td>
<td>Type</td>
<td></td>
<td>
<asp:DropDownListID="ddlType"runat="server"style="width:165px;height:25px;">
<asp:ListItemValue="">-Select</asp:ListItem>
<asp:ListItemValue="1">House</asp:ListItem>
<asp:ListItemValue="2">Bungalow</asp:ListItem>
<asp:ListItemValue="3">Apartment</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidatorID="RequiredFieldValidator6"runat="server"ControlToValidate="dd
lType"ErrorMessage="Select House Type !"InitialValue="Select"ValidationGroup="prop"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<tdcolspan="7">
<br/>
</td>
</tr>
<tr>
68

<td>Beds</td>
<td></td>
<td>
<asp:TextBoxID="txtBeds"runat="server"style="width:160px;height:25px;"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator7"runat="server"ControlToValidate="txt
Beds"ErrorMessage="Enter No. of
Beds !"ValidationGroup="prop"></asp:RequiredFieldValidator>
</td>
<td></td>
<td>Bath</td>
<td></td>
<td>
<asp:TextBoxID="txtBath"runat="server"style="width:160px;height:25px;"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator11"runat="server"ControlToValidate="tx
tBath"ErrorMessage="Enter No. of
Baths !"ValidationGroup="prop"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<tdcolspan="7">
<br/>
</td>
</tr>
<tr>
<td>Radius</td>
<td></td>
<td>
<asp:TextBoxID="txtRadius"runat="server"style="width:160px;height:25px;"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator8"runat="server"ControlToValidate="txt
Radius"ErrorMessage="Enter Radius !"ValidationGroup="prop"></asp:RequiredFieldValidator>
</td>
<td></td>
<td>Radius Range</td>
<td></td>
<td>
<asp:DropDownListID="ddlRadiusRange"runat="server"DataSourceID="SqlDataSource2"DataT
extField="Radius"DataValueField="Radius"style="width:165px;height:25px;">
</asp:DropDownList>
<asp:RequiredFieldValidatorID="RequiredFieldValidator13"runat="server"ControlToValidate="d
dlRadiusRange"ErrorMessage="Select Radius Range !"InitialValue="select-"ValidationGroup="prop"></asp:RequiredFieldValidator>
<asp:SqlDataSourceID="SqlDataSource2"runat="server"ConnectionString="<%$
ConnectionStrings:MREConnectionString %>"SelectCommand="SELECT * FROM
[RadiusRangeTable]"></asp:SqlDataSource>
</td>
</tr>
69

<tr>
<tdcolspan="7">
<br/>
</td>
</tr>
<tr>
<td>Contact Person</td>
<td></td>
<td>
<asp:TextBoxID="txtAgentName"runat="server"style="width:160px;height:25px;"></asp:TextB
ox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator9"runat="server"ControlToValidate="txt
AgentName"ErrorMessage="Enter Contact
Person !"ValidationGroup="prop"></asp:RequiredFieldValidator>
</td>
<td></td>
<td>Contact Number</td>
<td></td>
<td>
<asp:TextBoxID="txtContactNo"runat="server"style="width:160px;height:25px;"MaxLength="1
0"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator12"runat="server"ControlToValidate="t
xtContactNo"ErrorMessage="Enter Contact
No. !"ValidationGroup="prop"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<tdcolspan="7">
<br/>
</td>
</tr>
<tr>
<td>Actual Price</td>
<td></td>
<td>
<asp:TextBoxID="txtActualPrice"runat="server"style="width:160px;height:25px;"></asp:TextBo
x>
<asp:RequiredFieldValidatorID="RequiredFieldValidator10"runat="server"ControlToValidate="t
xtActualPrice"ErrorMessage="Enter Actual
Price !"ValidationGroup="prop"></asp:RequiredFieldValidator>
</td>
<td></td>
<td>Property Image</td>
<td></td>
<td>
<asp:FileUploadID="FileUpload1"runat="server"/>
70

</td>
</tr>
<tr>
<tdcolspan="7">
<br/>
</td>
</tr>
<tr>
<tdalign="center"colspan="7">
<asp:LabelID="msg"runat="server"></asp:Label>
<asp:ButtonID="btnSave"runat="server"onclick="btnSave_Click"style="width:80px;height:30px
;"Text="Save"ValidationGroup="prop"/>
</td>
</tr>
</table>
</center>
</asp:Content>
AddProperty.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
publicpartialclassAdmin_AddProperty : System.Web.UI.Page
{
insert ins = newinsert();
protectedvoid Page_Load(object sender, EventArgs e)
{
if (Session.IsNewSession && Session["Email"] == null)
{
Response.Redirect("LoginForm.aspx");
}
if (!this.IsPostBack)
{
DataSet ds = ins.data("Select * from StateTable");
foreach (DataRow dr in ds.Tables[0].Rows)
{
71

ListItem li = newListItem();
li.Text = dr["state_name"].ToString();
li.Value = dr["state_id"].ToString();
ddlState.Items.Add(li);
}
}
}
protectedvoid ddlState_SelectedIndexChanged(object sender, EventArgs e)
{
DataSet ds = ins.data("Select * from cityTable where state_id='" + ddlState.SelectedItem.Value +
"'");
ddlCity.Items.Clear();
ddlCity.Items.Add("-Select-");
foreach (DataRow dr in ds.Tables[0].Rows)
{
ListItem li = newListItem();
li.Text = dr["city_name"].ToString();
li.Value = dr["city_id"].ToString();
ddlCity.Items.Add(li);
}
}
protectedvoid btnSave_Click(object sender, EventArgs e)
{
string fileExt = System.IO.Path.GetExtension(FileUpload1.FileName);
if (FileUpload1.PostedFile.ContentLength == 0)
{
string message = "Cannot upload zero length file";
string script = "<script language=\"javascript\" type=\"text/javascript\">alert('" + message +
"');</script>";
ScriptManager.RegisterStartupScript(Page, this.GetType(), "AlertMessage", script, false);
FileUpload1.Focus();
return;
}
elseif (fileExt != "")
{
int type = 0;
switch (fileExt.ToLower())
{
case".png":
type = 1;
break;
72

case".jpg":
type = 1;
break;
case".jpeg":
type = 1;
break;
case".gif":
type = 1;
break;
default:
type = 0;
break;
}
if (type != 1)
{
string message = "fileExtension is unknown";
string script = "<script language=\"javascript\" type=\"text/javascript\">alert('" + message +
"');</script>";
ScriptManager.RegisterStartupScript(Page, this.GetType(), "AlertMessage", script, false);
FileUpload1.Focus();
return;
}

else
{
string savePath = Server.MapPath("..\\PropertyImage\\");
if (FileUpload1.HasFile)
{
int count = ins.tableid("PropertyInfoTable");
string fileName = (count + 1).ToString() + fileExt;
savePath += fileName;
FileUpload1.SaveAs(savePath);
string query = "insert into PropertyInfoTable values('" + ddlState.SelectedItem + "','" +
ddlCity.SelectedItem + "','" + txtZip.Text + "','" + txtMls.Text + "','" + ddlPrice.SelectedItem +
"','" + ddlType.SelectedItem + "','" + txtBeds.Text + "','" + txtBath.Text + "','" + txtRadius.Text +
73

"','" + ddlRadiusRange.SelectedItem + "','" + txtAgentName.Text + "','" + txtContactNo.Text +


"','" + txtActualPrice.Text + "','" + fileName + "')";
if (ins.nonquery(query))
{
msg.Text = "Recored Saved";
ddlState.SelectedIndex = 0;
ddlCity.SelectedIndex = 0;
txtZip.Text = "";
txtMls.Text = "";
ddlPrice.SelectedIndex = 0;
ddlType.SelectedIndex = 0;
txtBeds.Text = "";
txtBath.Text = "";
txtRadius.Text = "";
ddlRadiusRange.SelectedIndex = 0;
txtAgentName.Text = "";
txtContactNo.Text = "";
txtActualPrice.Text = "";
}
else
{
ddlState.SelectedIndex = 0;
ddlCity.SelectedIndex = 0;
txtZip.Text = "";
txtMls.Text = "";
ddlPrice.SelectedIndex = 0;
ddlType.SelectedIndex = 0;
txtBeds.Text = "";
txtBath.Text = "";
txtRadius.Text = "";
txtAgentName.Text = "";
txtContactNo.Text = "";
txtActualPrice.Text = "";
msg.Text = "Does not Uploaded";
}
}
}
}
}
}
Admin.master
74

<
%@MasterLanguage="C#"AutoEventWireup="true"CodeFile="Admin.master.cs"Inherits="Admi
n_Admin"%>
<!DOCTYPEhtml>
<htmlxmlns="http://www.w3.org/1999/xhtml">
<headid="Head1"runat="server">
<title>Max Real Estate</title>
<linkhref="css/template.css"rel="stylesheet"type="text/css"/>
<linkhref="css/validationEngine.jquery.css"rel="stylesheet"type="text/css"/>
<scriptsrc="js/jquery-1.6.min.js"type="text/javascript"></script>
<scriptsrc="js/jquery.validationEngine-en.js"type="text/javascript"charset="utf-8"></script>
<scriptsrc="js/jquery.validationEngine.js"type="text/javascript"charset="utf-8"></script>
<scripttype="text/javascript">
jQuery(document).ready(function () {
jQuery("#form1").validationEngine();
});
</script>
<linkrel="stylesheet"href="css/screen.css"type="text/css"media="screen"title="default"/>
<scripttype="text/javascript">
window.history.forward();
function noBack() { window.history.forward(); }
</script>
<asp:ContentPlaceHolderid="head"runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<formid="form1"runat="server">
<divid="page-top-outer">
<divid="page-top">
<divid="logo">
<h1style="color:White">Admin Panel</h1>
</div>
<divid="top-search">
<tableborder="0"cellpadding="0"cellspacing="0">
<tr>
<td></td>
75

<td>
</td>
<td>
</td>
</tr>
</table>
</div>
<divclass="clear"></div>
</div>
</div>
<divclass="clear">&nbsp;</div>
<divclass="nav-outer-repeat">
<divclass="nav-outer">
<divid="nav-right">
<divclass="nav-divider">&nbsp;</div>
<divclass="showhideaccount"><imgsrc="images/shared/nav/nav_myaccount.gif"width="93"height="14"alt=""/></div
>
<divclass="nav-divider">&nbsp;</div>
<ahref="../Default.aspx""id="logout"><imgsrc="images/shared/nav/nav_logout.gif"width="64"h
eight="14"alt=""/></a>
<divclass="clear">&nbsp;</div>

</div>

<!-- start nav -->


<%if (Session["user"] == null)
76

{ %>
<divclass="nav">
<divclass="table">
<ulclass="select"><li><ahref="ViewProperty.aspx"><b>View Property</b><!--[if
IE 7]><!--></a><!--<![endif]-->
</li>
</ul>
<divclass="nav-divider">&nbsp;</div>
<ulclass="current"><li><ahref="AddProperty.aspx"><b>Add Property</b><!--[if
IE 7]><!--></a><!--<![endif]-->
</li>
</ul>
<divclass="nav-divider">&nbsp;</div>
<ulclass="select"><li><ahref="QueryView.aspx"><b>View Query</b><!--[if IE
7]><!--></a><!--<![endif]-->
</li>
</ul>
<divclass="nav-divider">&nbsp;</div>
<ulclass="select"><li><ahref="ViewFeedback.aspx"><b>View FeedBack</b><!-[if IE 7]><!--></a><!--<![endif]-->
</li>
</ul>
<divclass="nav-divider">&nbsp;</div>
<ulclass="select"><li><ahref="Carrier.aspx"><b>Carrier</b><!--[if IE 7]><!--></a><!--<!
[endif]-->
</li>
</ul>
<divclass="nav-divider">&nbsp;</div>

77

<divclass="clear"></div>
</div>
<divclass="clear"></div>
</div>
<!-- end nav -->
<divclass="nav">
<divclass="table">
<ulclass="select"><li><ahref="OwnerDetail.aspx"><b>Owner</b><!--[if IE
7]><!--></a><!--<![endif]-->
</li>
</ul>
<divclass="nav-divider">&nbsp;</div>
<ulclass="current"><li><ahref="SeekerDetail.aspx"><b>Seeker Detail</b><!--[if
IE 7]><!--></a><!--<![endif]-->
</li>
</ul>
<divclass="nav-divider">&nbsp;</div>
<ulclass="select"><li><ahref="AgentDetail.aspx"><b>Agent Detail</b><!--[if IE
7]><!--></a><!--<![endif]-->
</li>
</ul>
<divclass="nav-divider">&nbsp;</div>
<ulclass="select"><li><ahref="BuilderDetail.aspx"><b>Builder Detail</b><!--[if
IE 7]><!--></a><!--<![endif]-->
</li>
</ul>
<divclass="nav-divider">&nbsp;</div>
<ulclass="select"><li><ahref="LoginDetails.aspx"><b>Active Login Detail</b><!--[if IE
7]><!--></a><!--<![endif]-->
</li>
</ul>
<divclass="nav-divider">&nbsp;</div>
78

<divclass="clear"></div>
</div>
<divclass="clear"></div>
</div>
<!-- end nav -->
<%}%>
</div>
<divclass="clear"></div>
<!-- start nav-outer -->
</div>
<!-- start nav-outer-repeat................................................... END -->
<divclass="clear"></div>
<!-- start contentouter ........................................................................................................................START -->
<divid="content-outer">
<!-- start content -->
<divid="content">
<!-- start page-heading -->
<divid="page-heading">
<h1>View </h1>
</div>
<!-- end page-heading -->
<tableborder="0"width="100%"cellpadding="0"cellspacing="0"id="content-table">
<tr>
<throwspan="3"class="sized"><imgsrc="images/shared/side_shadowleft.jpg"width="20"height="
300"alt=""/></th>
<thclass="topleft"></th>
<tdid="tbl-border-top">&nbsp;</td>
<thclass="topright"></th>
<throwspan="3"class="sized"><imgsrc="images/shared/side_shadowright.jpg"width="20"height
="300"alt=""/></th>
</tr>
<tr>
<tdid="tbl-border-left"></td>
<td>

79

<!-- start content-table-inner ...................................................................... START


-->
<divid="content-table-inner">
<!-- start table-content -->
<divid="table-content">
<asp:ContentPlaceHolderid="ContentPlaceHolder1"runat="server">
</asp:ContentPlaceHolder>
</div>
<!-- end table-content -->
<divclass="clear"></div>
</div>
<!-- end content-table-inner ............................................END -->
</td>
<tdid="tbl-border-right"></td>
</tr>
<tr>
<thclass="sized bottomleft"></th>
<tdid="tbl-border-bottom">&nbsp;</td>
<thclass="sized bottomright"></th>
</tr>
</table>
<divclass="clear">&nbsp;</div>
</div>
<!-- end content -->
<divclass="clear">&nbsp;</div>
</div>
<!-- end content-outer........................................................END -->
<divclass="clear">&nbsp;</div>
<!-- start footer -->
<divid="footer">
<!-- <div id="footer-pad">&nbsp;</div> -->
<!-- start footer-left -->
<divid="footer-left">
MAX Real Estate. All rights reserved.</div>
<!-- end footer-left -->
<divclass="clear">&nbsp;</div>
</div>
<!-- end footer -->

80

</form>
</body>
</html>
Admin.master.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
publicpartialclassAdmin_Admin : System.Web.UI.MasterPage
{
protectedvoid Page_Load(object sender, EventArgs e)
{
if (Session.IsNewSession && Session["admin"] == null)
{
Response.Redirect("LoginForm.aspx");
}
}
}
AgentDetail/aspx
<
%@PageTitle=""Language="C#"MasterPageFile="~/Admin/Admin.master"AutoEventWireup="t
rue"CodeFile="AgentDetail.aspx.cs"Inherits="Admin_AgentDetail"%>
<asp:ContentID="Content1"ContentPlaceHolderID="head"Runat="Server">
</asp:Content>
<asp:ContentID="Content2"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">
<asp:GridViewID="GridView1"runat="server"AutoGenerateColumns="False"DataKeyNames="
EmailId"
DataSourceID="SqlDataSource1"EnableModelValidation="True"BackColor="#DEBA84"Border
Color="#DEBA84"BorderStyle="None"BorderWidth="1px"CellPadding="3"CellSpacing="2"He
ight="197px"Width="752px">
<Columns>
<asp:BoundFieldDataField="Name"HeaderText="Name"SortExpression="Name"/>
<asp:BoundFieldDataField="Country"HeaderText="Country"
SortExpression="Country"/>
<asp:BoundFieldDataField="State"HeaderText="State"SortExpression="State"/>
81

<asp:BoundFieldDataField="City"HeaderText="City"SortExpression="City"/>
<asp:BoundFieldDataField="Dob"HeaderText="Dob"SortExpression="Dob"/>
<asp:BoundFieldDataField="Gender"HeaderText="Gender"
SortExpression="Gender"/>
<asp:BoundFieldDataField="ContactNumber"HeaderText="ContactNumber"
SortExpression="ContactNumber"/>
<asp:BoundFieldDataField="DealsIn"HeaderText="DealsIn"
SortExpression="DealsIn"/>
<asp:BoundFieldDataField="WorkExperiance"HeaderText="WorkExperiance"
SortExpression="WorkExperiance"/>
<asp:BoundFieldDataField="EmailId"HeaderText="EmailId"
SortExpression="EmailId"/>
</Columns>
<FooterStyleBackColor="#F7DFB5"ForeColor="#8C4510"/>
<HeaderStyleBackColor="#A55129"Font-Bold="True"ForeColor="White"/>
<PagerStyleForeColor="#8C4510"HorizontalAlign="Center"/>
<RowStyleBackColor="#FFF7E7"ForeColor="#8C4510"/>
<SelectedRowStyleBackColor="#738A9C"Font-Bold="True"ForeColor="White"/>
</asp:GridView>
<asp:SqlDataSourceID="SqlDataSource1"runat="server"
ConnectionString="<%$ ConnectionStrings:MREConnectionString %>"
SelectCommand="SELECT * FROM [AgentTable]">
</asp:SqlDataSource>
</asp:Content>
AgentDetail.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
publicpartialclassAdmin_AgentDetail : System.Web.UI.Page
{
protectedvoid Page_Load(object sender, EventArgs e)
{
if (Session.IsNewSession && Session["Email"] == null)
{
Response.Redirect("LoginForm.aspx");

82

}
}
}
BuilderDetail.aspx
<
%@PageTitle=""Language="C#"MasterPageFile="~/Admin/Admin.master"AutoEventWireup="t
rue"CodeFile="BuilderDetail.aspx.cs"Inherits="Admin_BuilderDetail"%>
<asp:ContentID="Content1"ContentPlaceHolderID="head"Runat="Server">
</asp:Content>
<asp:ContentID="Content2"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">
<asp:GridViewID="GridView1"runat="server"AutoGenerateColumns="False"DataKeyNames="
EmailId"
DataSourceID="SqlDataSource1"EnableModelValidation="True"BackColor="#DEBA84"Border
Color="#DEBA84"BorderStyle="None"BorderWidth="1px"CellPadding="3"CellSpacing="2"He
ight="229px"Width="963px">
<Columns>
<asp:BoundFieldDataField="Name"HeaderText="Name"SortExpression="Name"/>
<asp:BoundFieldDataField="Country"HeaderText="Country"
SortExpression="Country"/>
<asp:BoundFieldDataField="State"HeaderText="State"SortExpression="State"/>
<asp:BoundFieldDataField="City"HeaderText="City"SortExpression="City"/>
<asp:BoundFieldDataField="Dob"HeaderText="Dob"SortExpression="Dob"/>
<asp:BoundFieldDataField="Gender"HeaderText="Gender"
SortExpression="Gender"/>
<asp:BoundFieldDataField="ContactNumber"HeaderText="ContactNumber"
SortExpression="ContactNumber"/>
<asp:BoundFieldDataField="Web"HeaderText="Web"
SortExpression="Web"/>
<asp:BoundFieldDataField="DealsIn"HeaderText="DealsIn"
SortExpression="DealsIn"/>
<asp:BoundFieldDataField="BuilderId"HeaderText="BuilderId"
SortExpression="BuilderId"/>
<asp:BoundFieldDataField="EmailId"HeaderText="EmailId"
SortExpression="EmailId"/>
</Columns>
<FooterStyleBackColor="#F7DFB5"ForeColor="#8C4510"/>
<HeaderStyleBackColor="#A55129"Font-Bold="True"ForeColor="White"/>
<PagerStyleForeColor="#8C4510"HorizontalAlign="Center"/>
<RowStyleBackColor="#FFF7E7"ForeColor="#8C4510"/>
<SelectedRowStyleBackColor="#738A9C"Font-Bold="True"ForeColor="White"/>
</asp:GridView>
<asp:SqlDataSourceID="SqlDataSource1"runat="server"
83

ConnectionString="<%$ ConnectionStrings:MREConnectionString %>"


SelectCommand="SELECT * FROM [BuilderTable]">
</asp:SqlDataSource>
</asp:Content>
BuilderDetail.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
publicpartialclassAdmin_BuilderDetail : System.Web.UI.Page
{
protectedvoid Page_Load(object sender, EventArgs e)
{
if (Session.IsNewSession && Session["Email"] == null)
{
Response.Redirect("LoginForm.aspx");
}
}
}
Carrier.aspx
<
%@PageTitle=""Language="C#"MasterPageFile="~/Admin/Admin.master"AutoEventWireup="t
rue"CodeFile="Carrier.aspx.cs"Inherits="Admin_Carrier"%>
<asp:ContentID="Content1"ContentPlaceHolderID="head"Runat="Server">
</asp:Content>
<asp:ContentID="Content2"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">
<asp:GridViewID="GridView1"runat="server"AutoGenerateColumns="False"AutoGenerateDelet
eButton="True"DataKeyNames="EmailId"DataSourceID="SqlDataSource1"EnableModelValidat
ion="True"BackColor="#DEBA84"BorderColor="#DEBA84"BorderStyle="None"BorderWidth=
"1px"CellPadding="3"CellSpacing="2"Height="125px"Width="666px">
<Columns>
<asp:BoundFieldDataField="FirstName"HeaderText="FirstName"SortExpression="FirstName"/>
<asp:BoundFieldDataField="MiddleName"HeaderText="MiddleName"SortExpression="Middle
Name"/>
<asp:BoundFieldDataField="LastName"HeaderText="LastName"SortExpression="LastName"/>
84

<asp:BoundFieldDataField="ContactNumber"HeaderText="ContactNumber"SortExpression="Co
ntactNumber"/>
<asp:BoundFieldDataField="Address"HeaderText="Address"SortExpression="Address"/>
<asp:BoundFieldDataField="Gender"HeaderText="Gender"SortExpression="Gender"/>
<asp:BoundFieldDataField="EmailId"HeaderText="EmailId"SortExpression="EmailId"/>
<asp:BoundFieldDataField="Dob"HeaderText="Dob"SortExpression="Dob"/>
<asp:BoundFieldDataField="FilePath"HeaderText="FilePath"SortExpression="FilePath"/>
</Columns>
<FooterStyleBackColor="#F7DFB5"ForeColor="#8C4510"/>
<HeaderStyleBackColor="#A55129"Font-Bold="True"ForeColor="White"/>
<PagerStyleForeColor="#8C4510"HorizontalAlign="Center"/>
<RowStyleBackColor="#FFF7E7"ForeColor="#8C4510"/>
<SelectedRowStyleBackColor="#738A9C"Font-Bold="True"ForeColor="White"/>
</asp:GridView>
<asp:SqlDataSourceID="SqlDataSource1"runat="server"ConnectionString="<%$
ConnectionStrings:MREConnectionString %>"SelectCommand="SELECT * FROM
[CarrierTable]"DeleteCommand="delete from CarrierTable where
EmailId=@EmailId"></asp:SqlDataSource>
</asp:Content>

Carrier.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
publicpartialclassAdmin_Carrier : System.Web.UI.Page
{
protectedvoid Page_Load(object sender, EventArgs e)
{
if (Session.IsNewSession && Session["Email"] == null)
{
Response.Redirect("LoginForm.aspx");
}
}
}
LoginDetails.aspx

85

<
%@PageTitle=""Language="C#"MasterPageFile="~/Admin/Admin.master"AutoEventWireup="t
rue"CodeFile="LoginDetails.aspx.cs"Inherits="Admin_LoginDetails"%>
<asp:ContentID="Content1"ContentPlaceHolderID="head"Runat="Server">
</asp:Content>
<asp:ContentID="Content2"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">
<asp:GridViewID="GridView1"runat="server"EnableModelValidation="True"AutoGenerateColu
mns="False"DataKeyNames="EmailId"DataSourceID="SqlDataSource1"AllowPaging="True"Ba
ckColor="#DEBA84"BorderColor="#DEBA84"BorderStyle="None"BorderWidth="1px"CellPad
ding="3"CellSpacing="2"Width="801px">
<Columns>
<asp:BoundFieldDataField="EmailId"HeaderText="EmailId"SortExpression="EmailId"/>
<asp:BoundFieldDataField="Passwd"HeaderText="Passwd"SortExpression="Passwd"/>
<asp:BoundFieldDataField="Type"HeaderText="Type"SortExpression="Type"/>
<asp:CommandFieldShowDeleteButton="True"/>
</Columns>
<FooterStyleBackColor="#F7DFB5"ForeColor="#8C4510"/>
<HeaderStyleBackColor="#A55129"Font-Bold="True"ForeColor="White"/>
<PagerStyleForeColor="#8C4510"HorizontalAlign="Center"/>
<RowStyleBackColor="#FFF7E7"ForeColor="#8C4510"/>
<SelectedRowStyleBackColor="#738A9C"Font-Bold="True"ForeColor="White"/>
</asp:GridView>
<asp:SqlDataSourceID="SqlDataSource1"runat="server"
ConnectionString="<%$ ConnectionStrings:MREConnectionString %>"
SelectCommand="SELECT * FROM [LoginTable]"DeleteCommand="DELETE FROM
LoginTable WHERE (EmailId = @EmailId)">
<DeleteParameters>
<asp:ControlParameterControlID="GridView1"Name="EmailId"PropertyName="SelectedValue"/
>
<asp:ControlParameterControlID="GridView1"Name="Passwd"PropertyName="SelectedValue"/
>
<asp:ControlParameterControlID="GridView1"Name="Type"PropertyName="SelectedValue"/>
</DeleteParameters>
</asp:SqlDataSource>
</asp:Content>
LoginDetails.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
86

using System.Web.UI;
using System.Web.UI.WebControls;
publicpartialclassAdmin_LoginDetails : System.Web.UI.Page
{
protectedvoid Page_Load(object sender, EventArgs e)
{
if (Session.IsNewSession && Session["Email"] == null)
{
Response.Redirect("LoginForm.aspx");
}
}
}
LoginForm.aspx
<
%@PageLanguage="C#"AutoEventWireup="true"CodeFile="LoginForm.aspx.cs"Inherits="Adm
in_LoginForm"%>
<!DOCTYPEhtml>
<htmlxmlns="http://www.w3.org/1999/xhtml">
<headrunat="server">
<title></title>
<linkrel="stylesheet"href="css/screen.css"type="text/css"media="screen"title="default"/>
<linkhref="../css/styles.css"rel="stylesheet"/>
<linkhref="../css/style.css"rel="stylesheet"/>
<linkhref="../css/template.css"rel="stylesheet"/>
<linkhref="../css/validationEngine.jquery.css"rel="stylesheet"/>
<scriptsrc="../js/jquery-1.6.min.js"></script>
<scriptsrc="../js/jquery.validationEngine-en.js"></script>
<scriptsrc="../js/jquery.validationEngine.js"></script>
<styletype="text/css">
.auto-style1 {
width: 277px;
}
</style>
<scripttype="text/javascript">
jQuery(document).ready(function () {
jQuery("#form1").validationEngine();
});
</script>
</head>
87

<bodystyle="background-color:burlywood">
<formid="form1"runat="server">
<divid="login-holder">
<divid="logo-login">
</div>
<divclass="clear"></div>
<divid="loginbox">
<divid="login-inner">
<tableborder="0"cellpadding="0"cellspacing="0">
<tr>
<thclass="auto-style1">Email ID</th>
<td><asp:TextBoxID="txtUsername"runat="server"Width="175px"MaxLength="20"class="login
-inp"Height="29px"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator13"runat="server"ControlToValidate="t
xtUsername"ErrorMessage="Enter Email ID !"FontSize="Medium"></asp:RequiredFieldValidator>
</td><tdwidth="50px"></td>
</tr>
<tr>
<thclass="auto-style1">Password</th>
<td><asp:TextBoxID="txtPwd"runat="server"Width="175px"TextMode="Password"MaxLength
="20"onfocus="this.value=''"class="login-inp"Height="28px"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator14"runat="server"ControlToValidate="t
xtPwd"ErrorMessage="Enter Password !"Font-Size="Medium"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<thclass="auto-style1"></th>
<tdvalign="top"></td>
</tr>
<tr>
<thclass="auto-style1"></th>

88

<td><asp:ButtonID="btnLogin"class="submitlogin"runat="server"Width="81"
Height="30"OnClick="btnLogin_Click1"/></td>
</tr>
<tr><tdclass="auto-style1"><asp:LabelID="lblStatusBar"runat="server"ForeColor="Red"FontBold="True"Font-Size="Medium"></asp:Label></td></tr>
</table>
</div>
<divclass="clear"></div>
<ahref="../forgotpassword.aspx""class="forgot-pwd">&nbsp;&nbsp;&nbsp;&nbsp;Forgot
Password?</a>
</div>
<divclass="clear"></div>
<ahref="../Home.aspx"class="forgot-pwd">Back to Home</a>
</div>

<divid="forgotbox">
<divid="forgotbox-text">Please send us your email and we'll reset your
password.</div>
<divid="forgot-inner">
<tableborder="0"cellpadding="0"cellspacing="0">
<tr>
<th>Email address:</th>
<td></td>
<td><inputtype="text"value=""class="login-inp"/></td>
</tr>
<tr>
<th></th>
<td><inputtype="button"class="submit-login"/></td>
</tr>
</table>
</div>
<divclass="clear"></div>
</div>
</div>
</form>
</body>
89

</html>
LoginForm.aspx.cs
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;
publicpartialclassAdmin_LoginForm : System.Web.UI.Page
{
publicSqlConnection connectionDB = connectionManager.GetConnection();
insert ins = newinsert();
protectedvoid Page_Load(object sender, EventArgs e)
{
txtUsername.Focus();
}
protectedvoid btnLogin_Click1(object sender, EventArgs e)
{
try
{
connectionDB.Open();
string str1 = "select EmailId,passwd,Type from LoginTable where EmailId='" + txtUsername.Text
+ "' and passwd='" + txtPwd.Text + "'";
SqlCommand cmd1 = newSqlCommand(str1, connectionDB);
SqlDataAdapter da = newSqlDataAdapter(cmd1);
DataSet ds = newDataSet();
da.Fill(ds);
if (ds != null)
{
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
if (ds.Tables[0].Rows[i]["EmailId"].ToString() == txtUsername.Text.Trim().ToString() &&
ds.Tables[0].Rows[i]["Passwd"].ToString() == txtPwd.Text.Trim().ToString())
{
Session["Email"] = txtUsername.Text.Trim();
Session["Type"] = ds.Tables[0].Rows[i]["Type"].ToString();

90

if (Session["Type"].ToString() == "Admin")
{
Response.Redirect("ViewProperty.aspx");
}
elseif (Session["Type"].ToString() == "Agent")
{
Response.Redirect("../Agent/viewprofile.aspx");
}
elseif (Session["Type"].ToString() == "Builder")
{
Response.Redirect("../Builder/viewprofile.aspx");
}
elseif (Session["Type"].ToString() == "Seeker")
{
Response.Redirect("../Seeker/viewprofile.aspx");
}
elseif (Session["Type"].ToString() == "Owner")
{
Response.Redirect("../Owner/viewprofile.aspx");
}
}
}
lblStatusBar.Text = "Invalid UserName / Password";
}
}
catch (Exception ex)
{
}
}

}
OwnerDetail.aspx
91

<
%@PageTitle=""Language="C#"MasterPageFile="~/Admin/Admin.master"AutoEventWireup="t
rue"CodeFile="OwnerDetail.aspx.cs"Inherits="Admin_Default"%>
<asp:ContentID="Content1"ContentPlaceHolderID="head"Runat="Server">
</asp:Content>
<asp:ContentID="Content2"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">
<asp:GridViewID="GridView1"runat="server"AutoGenerateColumns="False"
DataSourceID="SqlDataSource1"EnableModelValidation="True"AllowPaging="True"Width="76
0px"BackColor="#DEBA84"BorderColor="#DEBA84"BorderStyle="None"BorderWidth="1px"
CellPadding="3"CellSpacing="2"Height="131px">
<Columns>
<asp:BoundFieldDataField="Name"HeaderText="Name"SortExpression="Name"/>
<asp:BoundFieldDataField="Country"HeaderText="Country"
SortExpression="Country"/>
<asp:BoundFieldDataField="State"HeaderText="State"SortExpression="State"/>
<asp:BoundFieldDataField="Dob"HeaderText="Dob"SortExpression="Dob"/>
<asp:BoundFieldDataField="ContactNumber"HeaderText="ContactNumber"SortExpression="Co
ntactNumber"/>
<asp:BoundFieldDataField="EmailId"HeaderText="EmailId"
SortExpression="EmailId"/>
<asp:BoundFieldDataField="City"HeaderText="City"
SortExpression="City"/>
<asp:BoundFieldDataField="Gender"HeaderText="Gender"
SortExpression="Gender"/>
</Columns>
<FooterStyleBackColor="#F7DFB5"ForeColor="#8C4510"/>
<HeaderStyleBackColor="#A55129"Font-Bold="True"ForeColor="White"/>
<PagerStyleForeColor="#8C4510"HorizontalAlign="Center"/>
<RowStyleBackColor="#FFF7E7"ForeColor="#8C4510"/>
<SelectedRowStyleBackColor="#738A9C"Font-Bold="True"ForeColor="White"/>
</asp:GridView>
<asp:SqlDataSourceID="SqlDataSource1"runat="server"
ConnectionString="<%$ ConnectionStrings:MREConnectionString %>"
SelectCommand="SELECT [Name], [Country], [State], [Dob], [ContactNumber], [EmailId],
[City], [Gender] FROM [OwnerTable]"UpdateCommand="UPDATE OwnerTable SET Name =
@Name, Country = @Country, State = @State, City = @City, Dob = @Dob, Gender = @Gender,
ContactNumber = @ContactNumber, EmailId = EmailId, Password = Password where
EmailId=@EmailId">
</asp:SqlDataSource>
</asp:Content>

92

OwnerDetail.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
publicpartialclassAdmin_Default : System.Web.UI.Page
{
protectedvoid Page_Load(object sender, EventArgs e)
{
if (Session.IsNewSession && Session["Email"] == null)
{
Response.Redirect("LoginForm.aspx");
}
}
}
QueryView.aspx
<
%@PageTitle=""Language="C#"MasterPageFile="~/Admin/Admin.master"AutoEventWireup="t
rue"CodeFile="QueryView.aspx.cs"Inherits="Admin_QuewQuery"%>
<asp:ContentID="Content1"ContentPlaceHolderID="head"Runat="Server">
</asp:Content>
<asp:ContentID="Content2"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">
<table>
<tr><tdalign="center"><h2>View Enquiry</h2></td></tr>
<tr><td>
<asp:LabelID="Label1"runat="server"Text="Label"Visible="false"></asp:Label>
<asp:GridViewID="GridView1"runat="server"AutoGenerateColumns="False"DataKeyNames="
EmailId"
DataSourceID="SqlDataSource1"EnableModelValidation="True"AllowPaging="True"
onselectedindexchanged="GridView1_SelectedIndexChanged"BackColor="#DEBA84"BorderCo
lor="#DEBA84"BorderStyle="None"BorderWidth="1px"CellPadding="3"CellSpacing="2"Heigh
t="63px"Width="544px"
>
<Columns>
<asp:BoundFieldDataField="Name"HeaderText="Name"SortExpression="Name"/>
<asp:BoundFieldDataField="ContactNumber"HeaderText="Contact Number"
93

SortExpression="ContactNumber"/>
<asp:BoundFieldDataField="EmailId"HeaderText="Email Id"
SortExpression="EmailId"/>
<asp:BoundFieldDataField="Message"HeaderText="Message"
SortExpression="Message"/>
<asp:CommandFieldShowSelectButton="True"/>
<asp:CommandFieldShowDeleteButton="True"/>
</Columns>
<FooterStyleBackColor="#F7DFB5"ForeColor="#8C4510"/>
<HeaderStyleBackColor="#A55129"Font-Bold="True"ForeColor="White"/>
<PagerStyleForeColor="#8C4510"HorizontalAlign="Center"/>
<RowStyleBackColor="#FFF7E7"ForeColor="#8C4510"/>
<SelectedRowStyleBackColor="#738A9C"Font-Bold="True"ForeColor="White"/>
</asp:GridView>
<asp:SqlDataSourceID="SqlDataSource1"runat="server"
ConnectionString="<%$ ConnectionStrings:MREConnectionString %>"
SelectCommand="SELECT * FROM [tblEnquiry]"
DeleteCommand="DELETE FROM tblEnquiry WHERE [EmailId] = @EmailId">

<DeleteParameters>
<asp:ControlParameterControlID="GridView1"Name="Name"PropertyName="SelectedValue"/>
<asp:ControlParameterControlID="GridView1"Name="ContactNumber"PropertyName="Selecte
dValue"/>
<asp:ControlParameterControlID="GridView1"Name="EmailId"PropertyName="SelectedValue"/
>
<asp:ControlParameterControlID="GridView1"Name="Message"PropertyName="SelectedValue"
/>
</DeleteParameters>
</asp:SqlDataSource>
</td></tr>
</table>
</asp:Content>

QueryView.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
94

using System.Web.UI.WebControls;
publicpartialclassAdmin_QuewQuery : System.Web.UI.Page
{
protectedvoid Page_Load(object sender, EventArgs e)
{
if (Session.IsNewSession && Session["Email"] == null)
{
Response.Redirect("LoginForm.aspx");
}
}
protectedvoid GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
Label1.Text = GridView1.Rows[GridView1.SelectedIndex].Cells[2].Text;
Session["write"] = Label1.Text;
Response.Redirect("ReplyQuery.aspx");
}
}
ReplyQuery.aspx
<
%@PageTitle=""Language="C#"MasterPageFile="~/Admin/Admin.master"AutoEventWireup="t
rue"CodeFile="ReplyQuery.aspx.cs"Inherits="Admin_ReplyQuery"%>
<asp:ContentID="Content1"ContentPlaceHolderID="head"Runat="Server">
</asp:Content>
<asp:ContentID="Content2"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">
<tablealign="center"style="border:1pxsolid#00407A; width:400px;">
<tr><td>Name</td><td><asp:TextBoxID="txtName"runat="server"Width="189px"ReadOnly="t
rue"></asp:TextBox></td></tr>
<tr><td>phone</td><td><asp:TextBoxID="txtPhone"runat="server"ReadOnly="true"style="mar
gin-right: 2"Width="190px"></asp:TextBox></td></tr>
<tr><td>Email</td><td><asp:TextBoxID="txtEmailId"runat="server"ReadOnly="true"style="m
argin-right: 2"Width="190px"></asp:TextBox></td></tr>
<tr><td>Message</td><td><asp:TextBoxID="txtMessage"ReadOnly="true"runat="server"
TextMode="MultiLine"Height="82px"Width="190px"></asp:TextBox></td></tr>
<tr><td><asp:ButtonID="btnCancel"runat="server"Text="Cancel"OnClick="btnCancel_Click"
/></td><td>
<asp:ButtonID="btnReply"runat="server"Text="Reply"
style="margin-right: 0"onclick="btnReply_Click"/></td></tr></table>
<asp:TableVisible="false"ID="table1"runat="server"><asp:TableRow><asp:TableCell>
<tablealign="center"style="border:1pxsolid#00407A; width:400px;">
95

<tr><td>To:</td><td><asp:TextBoxID="txtTo"runat="server"Width="190px"ReadOnly="true">
</asp:TextBox></td></tr>
<tr><td>From:</td><td><asp:TextBoxID="txtFrom"Width="190px"runat="server"ReadOnly="tr
ue"></asp:TextBox></td></tr>
<tr><td>Reply:</td><td><asp:TextBoxID="txtReply"Height="100px"Width="190px"runat="ser
ver"TextMode="MultiLine"></asp:TextBox></td></tr>
<tr><tdcolspan="2">
<asp:ButtonID="btnSendMail"runat="server"Text="send mail"onclick="btnSendMail_Click"
/></td></tr>
</table></asp:TableCell></asp:TableRow></asp:Table>
</asp:Content>

ReplyQuery.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Net.Mail;
publicpartialclassAdmin_ReplyQuery : System.Web.UI.Page
{
publicSqlConnection connectionDB = connectionManager.GetConnection();
insert ins = newinsert();
protectedvoid Page_Load(object sender, EventArgs e)
{
if (Session.IsNewSession && Session["Email"] == null)
{
Response.Redirect("LoginForm.aspx");
}
try
{
if (connectionDB.State == ConnectionState.Closed)
{
connectionDB.Open();
}
96

SqlCommand cmd = newSqlCommand("Select * from tblEnquiry where EmailId='" +


Session["write"].ToString() + "'", connectionDB);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
txtName.Text = dr["Name"].ToString();
txtPhone.Text = dr["ContactNumber"].ToString();
txtEmailId.Text = dr["EmailId"].ToString();
txtMessage.Text = dr["Message"].ToString();
}
}
catch (Exception ex)
{
}
finally
{
connectionDB.Close();
}
}
protectedvoid btnReply_Click(object sender, EventArgs e)
{
table1.Visible = true;
txtTo.Text = txtEmailId.Text;
txtFrom.Text = "[email protected]";
}
protectedvoid btnSendMail_Click(object sender, EventArgs e)
{
try
{
MailMessage mail = newMailMessage();
mail.To.Add(txtTo.Text);
mail.From = newMailAddress(txtFrom.Text, "MAX Real Estate");
mail.Subject = "Reply to - Your query";
string Body = txtReply.Text;
mail.Body = Body;
mail.IsBodyHtml = true;
SmtpClient smtp = newSmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.Credentials = new System.Net.NetworkCredential
("[email protected]", nabeelakhansrmscet")

97

smtp.EnableSsl = true;
smtp.Send(mail);
bool a = ins.nonquery("delete from tblEnquiry where EmailId='" + Session["write"].ToString() +
"'");
Session["write"] = null;
Page.ClientScript.RegisterStartupScript(GetType(), @"startup", @"<script>alert('Reply
sent successfully!');</script>");

}
catch (Exception ex)
{
Console.WriteLine("{0} Exception caught.", ex);
Page.ClientScript.RegisterStartupScript(GetType(), @"startup", @"<script>alert('Message
not sent!');</script>");
}

}
protectedvoid btnCancel_Click(object sender, EventArgs e)
{
Response.Redirect("QueryView.aspx");
}
}
SeekerDetail.aspx
<
%@PageTitle=""Language="C#"MasterPageFile="~/Admin/Admin.master"AutoEventWireup="t
rue"CodeFile="SeekerDetail.aspx.cs"Inherits="Admin_SeekerDetail"%>
<asp:ContentID="Content1"ContentPlaceHolderID="head"Runat="Server">
</asp:Content>
<asp:ContentID="Content2"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">
<asp:GridViewID="GridView1"runat="server"AutoGenerateColumns="False"DataKeyNames="a
utoid"
DataSourceID="SqlDataSource1"EnableModelValidation="True"BackColor="#DEBA84"Border
Color="#DEBA84"BorderStyle="None"BorderWidth="1px"CellPadding="3"CellSpacing="2"He
ight="238px"Width="961px">
<Columns>
<asp:BoundFieldDataField="Name"HeaderText="Name"SortExpression="Name"/>
<asp:BoundFieldDataField="Country"HeaderText="Country"
SortExpression="Country"/>
98

<asp:BoundFieldDataField="State"HeaderText="State"SortExpression="State"/>
<asp:BoundFieldDataField="City"HeaderText="City"SortExpression="City"/>
<asp:BoundFieldDataField="Dob"HeaderText="Dob"SortExpression="Dob"/>
<asp:BoundFieldDataField="Gender"HeaderText="Gender"
SortExpression="Gender"/>
<asp:BoundFieldDataField="Contactnumber"HeaderText="Contactnumber"
SortExpression="Contactnumber"/>
<asp:BoundFieldDataField="DealsIn"HeaderText="DealsIn"
SortExpression="DealsIn"/>
<asp:BoundFieldDataField="WorkExperiance"HeaderText="WorkExperiance"SortExpression="
WorkExperiance"/>
<asp:BoundFieldDataField="EmailId"HeaderText="EmailId"SortExpression="EmailId"/>
<asp:BoundFieldDataField="autoid"HeaderText="autoid"InsertVisible="False"ReadOnly="True"
SortExpression="autoid"/>
</Columns>
<FooterStyleBackColor="#F7DFB5"ForeColor="#8C4510"/>
<HeaderStyleBackColor="#A55129"Font-Bold="True"ForeColor="White"/>
<PagerStyleForeColor="#8C4510"HorizontalAlign="Center"/>
<RowStyleBackColor="#FFF7E7"ForeColor="#8C4510"/>
<SelectedRowStyleBackColor="#738A9C"Font-Bold="True"ForeColor="White"/>
</asp:GridView>
<asp:SqlDataSourceID="SqlDataSource1"runat="server"
ConnectionString="<%$ ConnectionStrings:MREConnectionString %>"
SelectCommand="SELECT [Name], [Country], [State], [City], [Dob], [Gender],
[Contactnumber], [DealsIn], [WorkExperiance], [EmailId], [autoid] FROM [AgentTable]">
</asp:SqlDataSource>
</asp:Content>

SeekerDetail.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
publicpartialclassAdmin_SeekerDetail : System.Web.UI.Page
{
protectedvoid Page_Load(object sender, EventArgs e)
{
if (Session.IsNewSession && Session["Email"] == null)
99

{
Response.Redirect("LoginForm.aspx");
}
}
}
ViewFeedback.aspx
<
%@PageTitle=""Language="C#"MasterPageFile="~/Admin/Admin.master"AutoEventWireup="t
rue"CodeFile="ViewFeedback.aspx.cs"Inherits="Admin_ViewFeedback"%>
<asp:ContentID="Content1"ContentPlaceHolderID="head"Runat="Server">
</asp:Content>
<asp:ContentID="Content2"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">
<asp:GridViewID="GridView1"runat="server"AutoGenerateColumns="False"DataKeyNames="
EmailId"
DataSourceID="SqlDataSource1"EnableModelValidation="True"BackColor="#DEBA84"Border
Color="#DEBA84"BorderStyle="None"BorderWidth="1px"CellPadding="3"CellSpacing="2"He
ight="124px"Width="564px">
<Columns>
<asp:BoundFieldDataField="Name"HeaderText="Name"SortExpression="Name"/>
<asp:BoundFieldDataField="City"HeaderText="City"SortExpression="City"/>
<asp:BoundFieldDataField="Phone"HeaderText="phone"
SortExpression="ContactNumber"/>
<asp:BoundFieldDataField="EmailId"HeaderText="EmailId"
SortExpression="EmailId"/>
<asp:BoundFieldDataField="FeedBAck"HeaderText="Feedback"
SortExpression="FeedBAck"/>
<asp:CommandFieldHeaderText="CommandButton"ShowDeleteButton="True"
ShowHeader="True"/>
</Columns>
<FooterStyleBackColor="#F7DFB5"ForeColor="#8C4510"/>
<HeaderStyleBackColor="#A55129"Font-Bold="True"ForeColor="White"/>
<PagerStyleForeColor="#8C4510"HorizontalAlign="Center"/>
<RowStyleBackColor="#FFF7E7"ForeColor="#8C4510"/>
<SelectedRowStyleBackColor="#738A9C"Font-Bold="True"ForeColor="White"/>
</asp:GridView>
<asp:SqlDataSourceID="SqlDataSource1"runat="server"
ConnectionString="<%$ ConnectionStrings:MREConnectionString %>"
SelectCommand="SELECT * FROM [FeedbackTable]"DeleteCommand="DELETE FROM
FeedbackTable WHERE (EmailId = @EmailId)">
<DeleteParameters>
100

<asp:ControlParameterControlID="GridView1"Name="Name"PropertyName="SelectedValue"/>
<asp:ControlParameterControlID="GridView1"Name="City"PropertyName="SelectedValue"/>
<asp:ControlParameterControlID="GridView1"Name="Phone"PropertyName="SelectedValue"/>
<asp:ControlParameterControlID="GridView1"Name="EmailId"PropertyName="SelectedValue"/
>
<asp:ControlParameterControlID="GridView1"Name="FeedBAck"PropertyName="SelectedValu
e"/>
</DeleteParameters>
</asp:SqlDataSource>
</asp:Content>

ViewFeedback.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
publicpartialclassAdmin_ViewFeedback : System.Web.UI.Page
{
insert ins = newinsert();
protectedvoid Page_Load(object sender, EventArgs e)
{
if (Session.IsNewSession && Session["Email"] == null)
{
Response.Redirect("LoginForm.aspx");
}
}
protectedvoid GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
String EmailId = GridView1.Rows[e.RowIndex].Cells[3].Text;
string query = "Delete from FeedbackTable where EmailId='" + EmailId + "'";
if (ins.nonquery(query))
{
BindGrid1();
101

}
}
privatevoid BindGrid1()
{
DataSet ds = newDataSet();
ds = ins.data("select * from FeedbackTable");
if (ds != null)
{
GridView1.DataSource = ds.Tables[0];
GridView1.DataBind();
}
else
{
}
}
}
ViewPostRequirement.aspx
<
%@PageTitle=""Language="C#"MasterPageFile="~/Admin/Admin.master"AutoEventWireup="t
rue"CodeFile="ViewPostRequirement.aspx.cs"Inherits="Admin_ViewPostRequirement"%>
<asp:ContentID="Content1"ContentPlaceHolderID="head"Runat="Server">
</asp:Content>
<asp:ContentID="Content2"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">
<asp:GridViewID="GridView1"runat="server"AutoGenerateColumns="False"DataKeyNames="
EmailId"
DataSourceID="SqlDataSource1"EnableModelValidation="True"BackColor="#DEBA84"Border
Color="#DEBA84"BorderStyle="None"BorderWidth="1px"CellPadding="3"CellSpacing="2"He
ight="232px"Width="1099px">
<Columns>
<asp:BoundFieldDataField="Name"HeaderText="Name"SortExpression="Name"/>
<asp:BoundFieldDataField="ContactNumber"HeaderText="ContactNumber"
SortExpression="ContactNumber"/>
<asp:BoundFieldDataField="Address"HeaderText="Address"
SortExpression="Address"/>
<asp:BoundFieldDataField="EmailId"HeaderText="EmailId"
SortExpression="EmailId"/>
<asp:BoundFieldDataField="State"HeaderText="State"SortExpression="State"/>
<asp:BoundFieldDataField="City"HeaderText="City"SortExpression="City"/>
<asp:BoundFieldDataField="Radius"HeaderText="Radius"
SortExpression="Radius"/>
<asp:BoundFieldDataField="Price"HeaderText="Price"SortExpression="Price"/>
102

<asp:BoundFieldDataField="Type"HeaderText="Type"SortExpression="Type"/>
<asp:BoundFieldDataField="LandMark"HeaderText="LandMark"
SortExpression="LandMark"/>
<asp:CommandFieldHeaderText="CommandButton"ShowDeleteButton="True"
ShowHeader="True"ShowSelectButton="True"ShowEditButton="true"/>
</Columns>
<FooterStyleBackColor="#F7DFB5"ForeColor="#8C4510"/>
<HeaderStyleBackColor="#A55129"Font-Bold="True"ForeColor="White"/>
<PagerStyleForeColor="#8C4510"HorizontalAlign="Center"/>
<RowStyleBackColor="#FFF7E7"ForeColor="#8C4510"/>
<SelectedRowStyleBackColor="#738A9C"Font-Bold="True"ForeColor="White"/>
</asp:GridView>
<asp:SqlDataSourceID="SqlDataSource1"runat="server"
ConnectionString="Data Source=DEVICE;Initial Catalog=MRE;User
ID=sa;Password=12345"ProviderName="System.Data.SqlClient"
SelectCommand="SELECT * FROM [PostRequirementTable]"
DeleteCommand="DELETE FROM PostRequirementTable WHERE [EmailID] = @EmailID"
UpdateCommand="UPDATE PostRequirementTable SET Name = @Name, ContactNumber =
@ContactNumber, Address = @Address, EmailId = @EmailId, State = @State, City = @City,
Price = @Price, Type = @Type, Radius = @Radius, LandMark = @LandMark where EmailID =
@EmailID">
<DeleteParameters>
<asp:ParameterName="autoid"Type="Int32"/>
</DeleteParameters>
<UpdateParameters>
<asp:ParameterName="Name"Type="String"/>
<asp:ParameterName="ContactNumber"Type="String"/>
<asp:ParameterName="Address"Type="String"/>
<asp:ParameterName="EmailId"Type="String"/>
<asp:ParameterName="State"Type="String"/>
<asp:ParameterName="City"Type="String"/>
<asp:ParameterName="Radius"Type="String"/>
<asp:ParameterName="price"Type="String"/>
<asp:ParameterName="type"Type="String"/>
<asp:ParameterName="LandMark"Type="String"/>
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>

ViewPostRequirement.aspx.cs
103

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
publicpartialclassAdmin_ViewPostRequirement : System.Web.UI.Page
{
protectedvoid Page_Load(object sender, EventArgs e)
{
if (Session.IsNewSession && Session["Email"] == null)
{
Response.Redirect("LoginForm.aspx");
}
}
}
ViewProperty.aspx
<
%@PageTitle=""Language="C#"MasterPageFile="~/Admin/Admin.master"AutoEventWireup="t
rue"CodeFile="ViewProperty.aspx.cs"Inherits="Admin_ViewProperty"%>
<asp:ContentID="Content1"ContentPlaceHolderID="head"Runat="Server">
</asp:Content>
<asp:ContentID="Content2"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">
<asp:GridViewID="GridView1"runat="server"AutoGenerateColumns="False"DataSourceID="Sq
lDataSource1"
EmptyDataText="There are no data records to display."AllowPaging="True"
EnableModelValidation="True"DataKeyNames="autoid"BackColor="#DEBA84"BorderColor="
#DEBA84"BorderStyle="None"BorderWidth="1px"CellPadding="3"CellSpacing="2"Height="2
99px"Width="1043px">
<Columns>
<asp:BoundFieldDataField="State"HeaderText="State"SortExpression="State"/>
<asp:BoundFieldDataField="City"HeaderText="City"SortExpression="City"/>
<asp:BoundFieldDataField="Zip"HeaderText="Zip"SortExpression="Zip"/>
<asp:BoundFieldDataField="Mls"HeaderText="Mls"SortExpression="Mls"/>
<asp:BoundFieldDataField="PriceRange"HeaderText="PriceRange"SortExpression="PriceRange
"/>
<asp:BoundFieldDataField="Type"HeaderText="Type"SortExpression="Type"/>
<asp:BoundFieldDataField="Beds"HeaderText="Beds"SortExpression="Beds"/>
<asp:BoundFieldDataField="Baths"HeaderText="Baths"SortExpression="Baths"/>
<asp:BoundFieldDataField="Radius"HeaderText="Radius"SortExpression="Radius"/>
104

<asp:BoundFieldDataField="RadiusRange"HeaderText="RadiusRange"SortExpression="Radius
Range"/>
<asp:BoundFieldDataField="ContactPerson"HeaderText="ContactPerson"SortExpression="Cont
actPerson"/>
<asp:BoundFieldDataField="ContactName"HeaderText="ContactName"SortExpression="Contac
tName"/>
<asp:BoundFieldDataField="ActualPrice"HeaderText="ActualPrice"SortExpression="ActualPric
e"/>
<asp:BoundFieldDataField="PathFile"HeaderText="PathFile"SortExpression="PathFile"/>
<asp:BoundFieldDataField="autoid"HeaderText="autoid"InsertVisible="False"ReadOnly="True"
SortExpression="autoid"/>
</Columns>
<FooterStyleBackColor="#F7DFB5"ForeColor="#8C4510"/>
<HeaderStyleBackColor="#A55129"Font-Bold="True"ForeColor="White"/>
<PagerStyleForeColor="#8C4510"HorizontalAlign="Center"/>
<RowStyleBackColor="#FFF7E7"ForeColor="#8C4510"/>
<SelectedRowStyleBackColor="#738A9C"Font-Bold="True"ForeColor="White"/>
</asp:GridView>
<asp:SqlDataSourceID="SqlDataSource1"runat="server"ConnectionString="<%$
ConnectionStrings:MREConnectionString %>"
SelectCommand="SELECT * FROM [PropertyInfoTable]">
</asp:SqlDataSource>
</asp:Content>

ViewProperty.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
publicpartialclassAdmin_ViewProperty : System.Web.UI.Page
{
protectedvoid Page_Load(object sender, EventArgs e)
{
if (Session.IsNewSession && Session["admin"] == null)
{
Response.Redirect("LoginForm.aspx");
}
}
105

}
changepassword.aspx
<
%@PageTitle=""Language="C#"MasterPageFile="~/Agent/MasterPage.master"AutoEventWireu
p="true"CodeFile="changepassword.aspx.cs"Inherits="Agent_changepassword"%>
<asp:ContentID="Content1"ContentPlaceHolderID="head"Runat="Server">
<styletype="text/css">
.Text10
{
font-size:12px;
font-weight:bold;
color:#707070;
font-family:Arial;
padding-left:10px;
padding-top:15px;
}
.auto-style10 {
font-family: Tahoma;
font-size: medium;
color: #B3B3B3;
font-weight: normal;
width: 277px;
}
.auto-style11 {
height: 2px;
width: 277px;
}
.auto-style13 {
height: 48px;
width: 277px;
}
.auto-style14 {
font-family: Tahoma;
font-size: medium;
color: #B3B3B3;
font-weight: normal;
height: 51px;
width: 277px;
}
.auto-style15 {
height: 51px;
}
106

.auto-style16 {
width: 277px;
}
.auto-style17 {
font-family: Tahoma;
font-size: medium;
color: #B3B3B3;
font-weight: normal;
width: 277px;
height: 48px;
}
.auto-style18 {
height: 48px;
}
</style>
</asp:Content>
<asp:ContentID="Content2"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">

<table>
<tr><tdstyle="font-size:17px;font-weight:bold;color:#373737;font-family:Arial;paddingleft:20px;padding-top:15px;">Your Profile Information ::</td></tr>
<tr><tdstyle="padding-left:10px;paddingtop:10px;"><imgsrc="../images/h1.jpg"alt=""/></td></tr>
<tr><tdvalign="top">
<table>
<tr><tdclass="auto-style17">
<asp:LabelID="lblDeal"runat="server"Text="Current
Password"></asp:Label></td><tdclass="auto-style18">
<tdclass="autostyle18"><asp:TextBoxID="txtoldpwd"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;fontfamily:Arial"CssClass="validate[required]"TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator3"runat="server"ControlToValidate="txt
oldpwd"ErrorMessage="Enter Current
Password !"ValidationGroup="chpwd"></asp:RequiredFieldValidator>
<br/>
<br/>
</td></tr>
<tr><tdclass="auto-style10">
<asp:LabelID="Label1"runat="server"Text="New Password"></asp:Label></td><td><td>

107

<asp:TextBoxID="txtnewpwd"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;fontfamily:Arial"CssClass="validate[required]"TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator1"runat="server"ControlToValidate="txt
newpwd"ErrorMessage="Enter New
Password !"ValidationGroup="chpwd"></asp:RequiredFieldValidator>
<br/>
</td></tr>
<tr><tdclass="auto-style14">
<asp:LabelID="Label2"runat="server"Text="Confirm
Password"></asp:Label></td><tdclass="auto-style15">
<tdclass="autostyle15"><asp:TextBoxID="txtcnfrmpwd"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;fontfamily:Arial"CssClass="validate[required]"TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator2"runat="server"ControlToValidate="txt
cnfrmpwd"ErrorMessage="Enter Confirm
Password !"ValidationGroup="chpwd"></asp:RequiredFieldValidator>
</td></tr>
<tr><tdclass="auto-style11"></td></tr>
<tr>
<tdclass="auto-style13">
<asp:ButtonID="btnchangepwd"runat="server"OnClick="btnchangepwd_Click"Text="Change
Password"ValidationGroup="chpwd"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;
<asp:LabelID="lbl_msg"FontBold="True"BackColor="#FFFF66"ForeColor="#FF3300"runat="server"Text=""></asp:Label>
</td></tr>
<tr><tdclass="auto-style10">
&nbsp;</td></tr>
<tr><tdclass="auto-style16">
&nbsp;</td></tr>
<tr><tdclass="auto-style10">
&nbsp;</td></tr>
<tr><tdclass="auto-style16">
&nbsp;</td></tr>
<tr><tdclass="auto-style10">
&nbsp;</td></tr>

108

<tr><tdclass="auto-style16">
&nbsp;</td></tr>
</table>
</td></tr>
</table>
&nbsp;
</asp:Content>

changepassword.aspx.cs
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;
publicpartialclassAgent_changepassword : System.Web.UI.Page
{
publicSqlConnection connectionDB = connectionManager.GetConnection();
string str = null;
SqlCommand com;
byte up;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (Session.IsNewSession && Session["Email"] == null)
{
Response.Redirect("../Admin/LoginForm.aspx");
}
}
protectedvoid btncncl_Click(object sender, EventArgs e)
{
Response.Redirect("changepassword.aspx");
}
protectedvoid btnchangepwd_Click(object sender, EventArgs e)
109

{
connectionDB.Open();
str = "select * from LoginTable ";
com = newSqlCommand(str, connectionDB);
SqlDataReader reader = com.ExecuteReader();
while (reader.Read())
{
if (txtoldpwd.Text == reader["Passwd"].ToString())
{
up = 1;
}
}
reader.Close();
connectionDB.Close();
if (up == 1)
{
connectionDB.Open();
if (txtnewpwd.Text == txtcnfrmpwd.Text)
{
str = "update LoginTable set Passwd=@Passwd where EmailId='" +
Session["Email"].ToString() + "'";
com = newSqlCommand(str, connectionDB);
com.Parameters.Add(newSqlParameter("@Passwd", SqlDbType.VarChar, 50));
com.Parameters["@Passwd"].Value = txtnewpwd.Text;
com.ExecuteNonQuery();
connectionDB.Close();
lbl_msg.Text = "Password changed Successfully";
txtoldpwd.Text = "";
txtnewpwd.Text = "";
txtcnfrmpwd.Text = "";
}
else
{
lbl_msg.Text = "Please enter new password and confirm password must be same.";
txtoldpwd.Text = "";
txtnewpwd.Text = "";
txtcnfrmpwd.Text = "";
}
}
else
{
lbl_msg.Text = "Please enter correct Current password";
txtoldpwd.Text = "";
110

txtnewpwd.Text = "";
txtcnfrmpwd.Text = "";
}
}
}
updateprofile.aspx
<
%@PageTitle=""Language="C#"MasterPageFile="~/Agent/MasterPage.master"AutoEventWireu
p="true"CodeFile="updateprofile.aspx.cs"Inherits="Agent_updateprofile"%>
<asp:ContentID="Content1"ContentPlaceHolderID="head"Runat="Server">
<styletype="text/css">
.Text10
{
font-size:12px;
font-weight:bold;
color:#707070;
font-family:Arial;
padding-left:10px;
padding-top:15px;
}
.auto-style10 {
font-family: Tahoma;
font-size: medium;
color: #B3B3B3;
font-weight: normal;
}
.auto-style12 {
width: 715px;
}
.auto-style13 {
height: 365px;
}
.auto-style14 {
font-family: Tahoma;
font-size: medium;
color: #B3B3B3;
font-weight: normal;
height: 30px;
}
.auto-style15 {
height: 30px;
}
111

</style>
</asp:Content>
<asp:ContentID="Content2"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">
<tableclass="auto-style12">
<tr>
<tdvalign="top">
<tableclass="auto-style13">
<tr>
<tdclass="auto-style10">Name</td>
<td>
<asp:TextBoxID="txtName"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator2"runat="server"ControlToValidate="txt
Name"ErrorMessage="Enter Name !"ValidationGroup="update"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<tdclass="auto-style10">Country</td>
<td>
<asp:TextBoxID="txtcountry"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator3"runat="server"ControlToValidate="txt
country"ErrorMessage="Enter
Country!"ValidationGroup="update"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<tdclass="auto-style10">State</td>
<td>
<asp:TextBoxID="txtState"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator4"runat="server"ControlToValidate="txt
State"ErrorMessage="Enter State !"ValidationGroup="update"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<tdclass="auto-style10">City</td>
<td>
<asp:TextBoxID="txtCity"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator5"runat="server"ControlToValidate="txt
City"ErrorMessage="Enter City !"ValidationGroup="update"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<tdclass="auto-style10">Date of Birth</td>
112

<td>
<asp:TextBoxID="txtDob"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator6"runat="server"ControlToValidate="txt
Dob"ErrorMessage="Enter Date Of
Birth !"ValidationGroup="update"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<tdclass="auto-style14">Contact Number</td>
<tdclass="auto-style15">
<asp:TextBoxID="txtContactNumber"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator7"runat="server"ControlToValidate="txt
ContactNumber"ErrorMessage="Enter Mobile
No. !"ValidationGroup="update"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<tdclass="auto-style10">
<asp:LabelID="lblDeal"runat="server"Text="Deals In"></asp:Label>
</td>
<td>
<asp:TextBoxID="txtDeal"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator8"runat="server"ControlToValidate="txt
Deal"ErrorMessage="Enter City
Name !"ValidationGroup="update"></asp:RequiredFieldValidator>
</td>
</tr>
<tr><tdclass="auto-style10">Email Id</td><td>
<asp:TextBoxID="txtEmailId"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"ReadOnly="True"></asp:TextBox>
<asp:ButtonID="btnupdate"runat="server"Text="Update Profile"style="margin-top:
0px;color:#575757;font-size:16px;font-weight:bold;fontfamily:Arial;"onclick="btnSave_Click"Width="131px"ValidationGroup="update"/>
<asp:LabelID="lblMsg"runat="server"ForeColor="Red"></asp:Label>
</td></tr>
<tr>
<tdalign="right"colspan="2"style="padding-right:25px;">
&nbsp;</td>
</tr>
</table>
</td>
</tr>
113

</table>
</asp:Content>

updateprofile.aspx.cs
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;
publicpartialclassAgent_updateprofile : System.Web.UI.Page
{
publicSqlConnection connectionDB = connectionManager.GetConnection();
SqlDataAdapter da;
DataSet ds;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (Session["Email"] == null)
{
Response.Redirect("../Home.aspx");
}
else
if (!IsPostBack)
fill();
}
publicvoid fill()
{
try
{
connectionDB.Open();
SqlCommand cmd = newSqlCommand("select
Name,Country,State,city,Dob,Contactnumber,DealsIn, EmailId from AgentTable where
EmailId='" + Session["Email"].ToString() + "'", connectionDB);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
txtName.Text = dr.GetString(0);
txtcountry.Text = dr.GetString(1);
txtState.Text = dr.GetString(2);
114

txtCity.Text = dr.GetString(3);
txtDob.Text = dr.GetString(4);
//txtgender.Text = dr.GetString(5);
txtContactNumber.Text = dr.GetString(5);
txtDeal.Text = dr.GetString(6);
//txtSpecialise.Text = dr.GetString(8);
txtEmailId.Text = dr.GetString(7);
}
}
catch (Exception ex)
{
}
}
protectedvoid btnSave_Click(object sender, EventArgs e)
{
try
{
connectionDB.Open();
SqlCommand cmd = newSqlCommand("Update AgentTable set
Name=@name,Country=@con,State=@state,city=@city, Dob=@dob,
Contactnumber=@Contactnumber, DealsIn=@DealsIn, EmailId=@emailid where EmailId='" +
Session["Email"].ToString() + "'", connectionDB);
cmd.Parameters.AddWithValue("@name", txtName.Text);
cmd.Parameters.AddWithValue("@con", txtcountry.Text);
cmd.Parameters.AddWithValue("@state", txtState.Text);
cmd.Parameters.AddWithValue("@city", txtCity.Text);
cmd.Parameters.AddWithValue("@dob", txtDob.Text);
//cmd.Parameters.AddWithValue("@gen", txtgender.Text);
cmd.Parameters.AddWithValue("@Contactnumber", txtContactNumber.Text);
cmd.Parameters.AddWithValue("@DealsIn", txtDeal.Text);
//cmd.Parameters.AddWithValue("@work", txtSpecialise.Text);
cmd.Parameters.AddWithValue("@emailid", txtEmailId.Text);

int result = cmd.ExecuteNonQuery();


if (result == 1)
{
lblMsg.Text = "Details updated Successfully";
}
else
{
lblMsg.Text = "Try Again";
115

}
}
catch (Exception ex)
{
lblMsg.Text = ex.Message;
}
finally
{
connectionDB.Close();
}
}
}
viewprofile.aspx
<
%@PageTitle=""Language="C#"MasterPageFile="~/Agent/MasterPage.master"AutoEventWireu
p="true"CodeFile="viewprofile.aspx.cs"Inherits="Agent_viewprofile"%>
<asp:ContentID="Content1"ContentPlaceHolderID="head"Runat="Server">
<styletype="text/css">
.Text10
{
font-size:12px;
font-weight:bold;
color:#707070;
font-family:Arial;
padding-left:10px;
padding-top:15px;
}
.auto-style10 {
font-family: Tahoma;
font-size: medium;
color: #B3B3B3;
font-weight: normal;
}
.auto-style11 {
font-size: large;
}
.auto-style12 {
width: 636px;
height: 306px;
}
</style>
</asp:Content>
116

<asp:ContentID="Content2"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">

<tableclass="auto-style12">
<tr><tdstyle="font-size:17px;font-weight:bold;color:#373737;font-family:Arial;paddingleft:20px;padding-top:15px;">Your Profile Information ::</td></tr>
<tr><tdstyle="padding-left:10px;paddingtop:10px;"><imgsrc="../images/h1.jpg"alt=""/></td></tr>
<tr><tdvalign="top">
<table>
<tr><tdcolspan="2"style="font-size:17px;font-weight:bold;color:#373737;fontfamily:Arial;padding-left:10px;"valign="top">&nbsp;</tr>
<tr><tdclass="autostyle10">Name</td><td><asp:TextBoxID="txtName"runat="server"style="width:155px;height:2
5px;font-size:16px;color:#575757;fontfamily:Arial"CssClass="validate[required]"ReadOnly="True"></asp:TextBox></td></tr>
<tr><tdclass="auto-style10">Country</td><td>
<asp:TextBoxID="txtcountry"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;fontfamily:Arial"CssClass="validate[required]"ReadOnly="True"></asp:TextBox>
</td></tr>
<tr><tdclass="autostyle10">State</td><td><asp:TextBoxID="txtState"runat="server"style="width:155px;height:25
px;font-size:16px;color:#575757;fontfamily:Arial"CssClass="validate[required]"ReadOnly="True"></asp:TextBox></td></tr>
<tr><tdclass="autostyle10">City</td><td><asp:TextBoxID="txtCity"runat="server"style="width:155px;height:25px
;font-size:16px;color:#575757;font-family:Arial"ReadOnly="True"></asp:TextBox></td></tr>
<tr><tdclass="auto-style10">Date of Birth</td>
<td><asp:TextBoxID="txtDob"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"ReadOnly="True"></asp:TextBox>
</td></tr>
<tr><tdclass="auto-style10">Gender</td><tdclass="auto-style10">
<asp:TextBoxID="txtgender"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"ReadOnly="True"></asp:TextBox>
</td></tr>
<tr><tdclass="auto-style10">Contact Number</td><td>
<asp:TextBoxID="txtContactNumber"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"ReadOnly="True"></asp:TextBox>
</td></tr>
<%--<tr><td class="auto-style10">

117

<asp:Label ID="lblfreeweb" runat="server" Text="Website" ></asp:Label></td><td class="autostyle10">


<asp:TextBox ID="txtWeb" runat="server"
ForeColor="Black" Text=" " style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial; text-align: left;" ReadOnly="True"></asp:TextBox>
</td></tr>--%>
<tr><tdclass="auto-style10">
<asp:LabelID="lblDeal"runat="server"Text="Deals In"></asp:Label></td><td>
<asp:TextBoxID="txtDeal"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"ReadOnly="True"></asp:TextBox>
</td></tr>
<tr><tdclass="auto-style10">
<asp:LabelID="lblSpecialise"runat="server"Text="Specialise
In"></asp:Label></td><tdclass="auto-style10">
<asp:TextBoxID="txtSpecialise"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"ReadOnly="True"></asp:TextBox>
</td></tr>
<tr><tdclass="auto-style10">Email Id</td><td>
<asp:TextBoxID="txtEmailId"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"ReadOnly="True"></asp:TextBox>
</td></tr>
<tr><tdstyle="padding-left:10px;paddingtop:10px;"colspan="2"><imgsrc="../images/h1.jpg"alt=""/></td></tr>
<tr><tdalign="right"colspan="2"style="padding-right:25px;">
<strong><spanclass="autostyle11">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></strong>
</td></tr>
</table>
</td></tr>
</table>
&nbsp;
</asp:Content>

viewprofile.aspx.cs

118

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;
publicpartialclassAgent_viewprofile : System.Web.UI.Page
{
publicSqlConnection connectionDB = connectionManager.GetConnection();
SqlDataAdapter da;
DataSet ds;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (Session["Email"] == null)
{
Response.Redirect("../Home.aspx");
}
else
if(!IsPostBack)
fill();
}
protectedvoid btnSave_Click(object sender, EventArgs e)
{
Response.Redirect("updateprofile.aspx");
}
publicvoid fill()
{
try
{
connectionDB.Open();
SqlCommand cmd = newSqlCommand("select
Name,Country,State,city,Dob,Gender,Contactnumber,DealsIn,WorkExperiance,EmailId from
AgentTable where EmailId='" + Session["Email"].ToString() + "'", connectionDB);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
txtName.Text = dr.GetString(0);
txtcountry.Text = dr.GetString(1);
119

txtState.Text = dr.GetString(2);
txtCity.Text = dr.GetString(3);
txtDob.Text = dr.GetString(4);
txtgender.Text = dr.GetString(5);
txtContactNumber.Text = dr.GetString(6);
txtDeal.Text = dr.GetString(7);
txtSpecialise.Text = dr.GetString(8);
txtEmailId.Text = dr.GetString(9);
}
}
catch (Exception ex)
{
}
}
}
Carrier.aspx
<
%@PageTitle=""Language="C#"MasterPageFile="~/mainMaster.master"AutoEventWireup="true
"CodeFile="Carrier.aspx.cs"Inherits="Carrier"%>
<
%@Registerassembly="AjaxControlToolkit"namespace="AjaxControlToolkit"tagprefix="asp"%
>
<asp:ContentID="Content1"ContentPlaceHolderID="head"Runat="Server">
<styletype="text/css">
.auto-style6 {
width: 254px;
}
.auto-style7 {
font-size: 12px;
font-weight: bold;
color: #707070;
font-family: Arial;
padding-left: 10px;
padding-top: 15px;
width: 254px;
}
.auto-style8 {
width: 134px;
120

height: 370px;
}
</style>
</asp:Content>
<asp:ContentID="Content2"ContentPlaceHolderID="nab"Runat="Server">
<divstyle="width:89%; height:auto;-webkit-border-radius: 20px;-moz-border-radius: 20px;
border-radius: 20px;border:2pxsolid#CCCCCC;background-color:#FFFFFF;-webkit-box-shadow:
#B3B3B33px3px3px;-moz-box-shadow: #B3B3B33px3px3px;
box-shadow: #B3B3B33px3px3px; text-align: left;">
<table>
<tr><tdstyle="font-size:17px;font-weight:bold;color:#373737;font-family:Arial;paddingleft:20px;padding-top:15px;">Carrier</td></tr>
</table>
<table><tr><td>
<table>
<tr>
<tdclass="Text10">
First Name
</td>
<tdclass="auto-style6">
<asp:TextBoxID="txtFirstName"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator6"runat="server"ControlToValidate="txt
FirstName"Display="Static"ValidationGroup="car"ErrorMessage="Enter First
Name !"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<tdclass="Text10">
Middle Name
</td>
<tdclass="auto-style6">
<asp:TextBoxID="txtMiddleName"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"></asp:TextBox>
</td>
</tr>
<tr>
<tdclass="Text10">
Last Name
</td>
<tdclass="auto-style6">
121

<asp:TextBoxID="txtLastName"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator7"runat="server"ControlToValidate="txt
LastName"Display="Static"ValidationGroup="car"ErrorMessage="Enter Last
Name !"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<tdclass="Text10">
Contact Number
</td>
<tdclass="auto-style6">
<asp:TextBoxID="txtContactNumber"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator8"runat="server"ControlToValidate="txt
ContactNumber"Display="Static"ValidationGroup="car"ErrorMessage="Enter Mobile
Number !"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<tdclass="Text10">
Address
</td>
<tdclass="auto-style6">
<asp:TextBoxID="txtAddress"runat="server"TextMode="MultiLine"style="width:155px;height:5
0px;font-size:16px;color:#575757;font-family:Arial"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator9"runat="server"ControlToValidate="txt
FirstName"Display="Static"ValidationGroup="car"ErrorMessage="Enter
Address !"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<tdclass="Text10">
Gender
122

</td>
<tdclass="auto-style7">
<asp:RadioButtonID="rdbMale"runat="server"Text="male"Checked="true"
GroupName="a"/>
<asp:RadioButtonID="rdbFemale"runat="server"Text="female"
GroupName="a"/>
</td>
</tr>
<tr>
<tdclass="Text10">Email Id</td><tdclass="autostyle6"><asp:TextBoxID="txtEmailId"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator10"runat="server"ControlToValidate="t
xtFirstName"Display="Static"ValidationGroup="car"ErrorMessage="Enter
Email !"></asp:RequiredFieldValidator>
</td>
</tr>
<tr><tdclass="Text10">Date Of Birth</td><tdclass="autostyle6"><asp:TextBoxID="txtDob"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"></asp:TextBox>
<asp:CalendarExtenderID="txtDob_CalendarExtender"runat="server"
Enabled="True"TargetControlID="txtDob">
</asp:CalendarExtender>
<asp:RequiredFieldValidatorID="RequiredFieldValidator11"runat="server"ControlToValidate="tx
tDob"Display="Static"ValidationGroup="car"ErrorMessage="Select
Date !"></asp:RequiredFieldValidator>
</td></tr>
<tr>
<tdclass="Text10">
Upload Resume
</td>
<tdclass="auto-style6">
<asp:FileUploadID="FileUpload1"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"/>
</td>
</tr>
<tr><tdalign="center"colspan="2">
123

<asp:ButtonID="btnSave"runat="server"Text="Submit"
style="margin-top: 0px;width:80px;height:25px;color:#575757;font-size:16px;fontweight:bold;font-family:Arial;"
onclick="btnSave_Click"ValidationGroup="car"/>
<asp:ButtonID="btnReset"runat="server"Text="Reset"style="margin-top:
0px;width:80px;height:25px;color:#575757;font-size:16px;font-weight:bold;font-family:Arial;"/>
<asp:LabelID="msg"runat="server"></asp:Label>
</td></tr>
</table></td>
<td><imgsrc="images/career-12.jpg"alt=""class="auto-style8"/></td>
</tr></table>
</div>
</asp:Content>
<asp:ContentID="Content3"ContentPlaceHolderID="abc"Runat="Server">
</asp:Content>

Carrier.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
publicpartialclassCarrier : System.Web.UI.Page
{
insert ins = newinsert();
string Gender;
protectedvoid Page_Load(object sender, EventArgs e)
{
}
protectedvoid btnSave_Click(object sender, EventArgs e)
{
if (rdbMale.Checked == true)
{
Gender = "male";
}
else
124

{
Gender = "female";
}
string fileExt = System.IO.Path.GetExtension(FileUpload1.FileName);
if (FileUpload1.PostedFile.ContentLength == 0)
{
string message = "Cannot upload zero length file";
string script = "<script language=\"javascript\" type=\"text/javascript\">alert('" + message +
"');</script>";
ScriptManager.RegisterStartupScript(Page, this.GetType(), "AlertMessage", script, false);
FileUpload1.Focus();
return;
}
elseif (fileExt != "")
{
int type = 0;
switch (fileExt.ToLower())
{
case".htm":
type = 1;
break;
case".html":
type = 1;
break;
case".txt":
type = 1;
break;
case".doc":
type = 1;
break;
case".docx":
type = 1;
break;
case".pdf":
type = 1;
break;
default:
type = 0;
break;
}
if (type != 1)
125

{
string message = "fileExtension is unknown";
string script = "<script language=\"javascript\" type=\"text/javascript\">alert('" + message +
"');</script>";
ScriptManager.RegisterStartupScript(Page, this.GetType(), "AlertMessage", script, false);
FileUpload1.Focus();
return;
}

else
{
string savePath = Server.MapPath("Resume\\");
if (FileUpload1.HasFile)
{
string fileName = FileUpload1.FileName;
savePath += fileName;
FileUpload1.SaveAs(savePath);
string query = "insert into CarrierTable values('" + txtFirstName.Text + "','" +
txtMiddleName.Text + "','" + txtLastName.Text + "','" + txtContactNumber.Text + "','" +
txtAddress.Text + "','" + Gender + "','" + txtEmailId.Text + "','" + txtDob.Text + "','" + fileName +
"')";
if (ins.nonquery(query))
{
msg.Text = "Uploaded Successful";
txtFirstName.Text = "";
txtMiddleName.Text = "";
txtLastName.Text = "";
txtContactNumber.Text = "";
txtDob.Text = ""; ;
txtEmailId.Text = "";
txtAddress.Text = "";
}
else
{
txtFirstName.Text = "";
txtMiddleName.Text = "";
txtLastName.Text = "";
126

txtContactNumber.Text = "";
txtDob.Text = ""; ;
txtEmailId.Text = "";
txtAddress.Text = "";
msg.Text = "Does not Uploaded";
}
}
}
}
}
}
feedBack.aspx
<
%@PageTitle=""Language="C#"MasterPageFile="~/mainMaster.master"AutoEventWireup="true
"CodeFile="feedBack.aspx.cs"Inherits="feedBack"%>
<asp:ContentID="Content1"ContentPlaceHolderID="head"Runat="Server">
<styletype="text/css">
.auto-style6 {
width: 300px;
}
</style>
</asp:Content>
<asp:ContentID="Content2"ContentPlaceHolderID="nab"Runat="Server">
<divstyle="width:98%;height:auto;-webkit-border-radius: 20px;-moz-border-radius: 20px;
border-radius: 20px;border:2pxsolid#CCCCCC;background-color:#FFFFFF;-webkit-box-shadow:
#B3B3B33px3px3px;-moz-box-shadow: #B3B3B33px3px3px;
box-shadow: #B3B3B33px3px3px;">
<table>
<tr><td>
<table>
<tr><tdstyle="font-size:17px;font-weight:bold;color:#373737;font-family:Arial;paddingleft:20px;padding-top:15px;"colspan="2">FeedBack Form</td></tr>
<tr><tdclass="Text10">Name</td><tdclass="autostyle6"><asp:TextBoxID="txtName"runat="server"CssClass="validate[required]"style="width:15
5px;height:25px;font-size:16px;color:#575757;font-family:Arial"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator6"runat="server"ControlToValidate="txt
Name"ErrorMessage="Enter Name !"ValidationGroup="fbk"></asp:RequiredFieldValidator>
</td></tr>
<tr><tdclass="Text10">City</td><tdclass="autostyle6"><asp:TextBoxID="txtCity"runat="server"CssClass="validate[required]"style="width:155
px;height:25px;font-size:16px;color:#575757;font-family:Arial"></asp:TextBox>

127

<asp:RequiredFieldValidatorID="RequiredFieldValidator7"runat="server"ControlToValidate="txt
City"ErrorMessage="Enter City !"ValidationGroup="fbk"></asp:RequiredFieldValidator>
</td></tr>
<tr><tdclass="Text10">Phone</td><tdclass="autostyle6"><asp:TextBoxID="txtPhone"runat="server"CssClass="validate[required]"style="width:1
55px;height:25px;font-size:16px;color:#575757;font-family:Arial"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator8"runat="server"ControlToValidate="txt
Phone"ErrorMessage="Enter Phone !"ValidationGroup="fbk"></asp:RequiredFieldValidator>
</td></tr>
<tr><tdclass="Text10">Email</td><tdclass="autostyle6"><asp:TextBoxID="txtEmailId"runat="server"CssClass="validate[required]"style="width:
155px;height:25px;font-size:16px;color:#575757;font-family:Arial"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator9"runat="server"ErrorMessage="Enter
Email !"ControlToValidate="txtEmailId"ValidationGroup="fbk"></asp:RequiredFieldValidator>
</td></tr>
<tr><tdclass="Text10">Feedback</td><tdclass="autostyle6"><asp:TextBoxID="txtFeedBack"runat="server"CssClass="validate[required]"TextMode=
"MultiLine"style="width:155px;height:50px;font-size:16px;color:#575757;fontfamily:Arial"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator10"runat="server"ErrorMessage="Enter
Message !"ControlToValidate="txtFeedBack"ValidationGroup="fbk"></asp:RequiredFieldValidat
or>
</td></tr>
<tr><tdalign="center"colspan="2"><asp:Buttonrunat="server"ID="btnSave"
Text="Submit"
style="margin-top: 0px;width:100px;height:30px;color:#575757;font-size:16px;fontweight:bold;font-family:Arial;"
onclick="btnSave_Click"ValidationGroup="fbk"/>
<asp:LabelID="msg"runat="server"></asp:Label>
</td></tr>
</table>
</td><td>
<imgsrc="images/feedback.jpg"alt=""/>
</td></tr>
</table>
</div>
</asp:Content>
<asp:ContentID="Content3"ContentPlaceHolderID="abc"Runat="Server">
</asp:Content>

feedBack.aspx.cs
using System;
using System.Collections.Generic;
128

using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
publicpartialclassfeedBack : System.Web.UI.Page
{
insert ins = newinsert();
protectedvoid Page_Load(object sender, EventArgs e)
{
}
protectedvoid btnSave_Click(object sender, EventArgs e)
{
string query = "insert into FeedbackTable values('" + txtName.Text + "','" + txtCity.Text + "','" +
txtPhone.Text + "','" + txtEmailId.Text + "','" + txtFeedBack.Text + "')";
if (ins.nonquery(query))
{
msg.Text = "Thanks For Feedback";
txtName.Text = "";
txtCity.Text = "";
txtPhone.Text = "";
txtEmailId.Text = "";
txtFeedBack.Text = "";
}
}
}
forgotpassword.aspx
<
%@PageLanguage="C#"AutoEventWireup="true"CodeFile="forgotpassword.aspx.cs"Inherits="_
Default"%>
<!DOCTYPEhtml>
<htmlxmlns="http://www.w3.org/1999/xhtml">
<headid="Head1"runat="server">
<title></title>
<linkhref="css/template.css"rel="stylesheet"/>
<linkhref="css/validationEngine.jquery.css"rel="stylesheet"/>
<scriptsrc="js/jquery-1.6.min.js"></script>
<scriptsrc="js/jquery.validationEngine-en.js"></script>
<scriptsrc="js/jquery.validationEngine.js"></script>
<linkhref="Admin/css/screen.css"rel="stylesheet"/>
129

<linkhref="css/style.css"rel="stylesheet"/>
<styletype="text/css">
.auto-style1 {
width: 193px;
}
</style>
<scripttype="text/javascript">
jQuery(document).ready(function () {
jQuery("#form1").validationEngine();
});
</script>
</head>
<bodystyle="background-color:burlywood">
<formid="form1"runat="server">
<divid="login-holder">
<divid="logo-login">
</div>
<divclass="clear">&nbsp;&nbsp;</div>
<divid="loginbox">
<divid="login-inner">
<tableborder="0"cellpadding="0"cellspacing="0">
<tr>
<thclass="auto-style1">Enter Email Id</th>
<td><asp:TextBoxID="txtUserId"runat="server"Width="175px"MaxLength="50"class="logininp"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator13"runat="server"ControlToValidate="t
xtUserId"ErrorMessage="Enter Email ID !"Font-Size="Medium"></asp:RequiredFieldValidator>
</td><tdwidth="50px"></td>
</tr>
<tr>
<thclass="auto-style1">&nbsp;</th>
<td>&nbsp;</td>
</tr>
<tr>
<thclass="auto-style1"></th>
130

<tdvalign="top"></td>
</tr>
<tr>
<thclass="auto-style1"></th>
<td><asp:ButtonID="btnLogin"class="submitlogin"runat="server"Width="81"
Height="30"OnClick="btnLogin_Click"/></td>
</tr>
<tr><tdclass="auto-style1">&nbsp;</td></tr>
</table>
</div>
<divclass="clear"></div>
<ahref="Admin/LoginForm.aspx"class="forgot-pwd">&nbsp;&nbsp;&nbsp;&nbsp;Back
to Login ...</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:LabelID="lblStatusBar"runat="se
rver"ForeColor="Red"Font-Bold="True"Font-Size="Medium"></asp:Label>
</div>
<divclass="clear"></div>
<ahref="../Home.aspx"class="forgot-pwd">Back to Home</a>
</div>

<divid="forgotbox">
<divid="forgotbox-text">Please send us your email and we'll reset your
password.</div>
<divid="forgot-inner">
<tableborder="0"cellpadding="0"cellspacing="0">
<tr>
<th>Email address:</th>
<td></td>
<td><inputtype="text"value=""class="login-inp"/></td>
</tr>
<tr>
<th></th>
<td><inputtype="button"class="submit-login"/></td>
</tr>
</table>
</div>
<divclass="clear"></div>
</div>
131

</div>
</form>
</body>
</html>
forgotpassword.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net.Mail;
using System.Data.SqlClient;
using System.Data;
publicpartialclass_Default : System.Web.UI.Page
{
publicSqlConnection connectionDB = connectionManager.GetConnection();
insert ins = newinsert();
protectedvoid Page_Load(object sender, EventArgs e)
{
}
protectedvoid btnLogin_Click(object sender, EventArgs e)
{
try
{
SqlCommand cmd = newSqlCommand("select UserId,passwd from AdminLoginTable where
email='" + txtUserId.Text.Trim() + "'", connectionDB);
SqlDataAdapter da = newSqlDataAdapter(cmd);
DataSet ds = newDataSet();
da.Fill(ds);
if (ds.Tables[0].Rows.Count > 0)
{
MailMessage mail = newMailMessage();
mail.To.Add(txtUserId.Text);
mail.From = newMailAddress("[email protected]");
mail.Subject = " Your MAX Real Estate ID Details";

132

string Body = "Hi, Welcome to MAX Real Estate <br/>Please check your Login
Details<br/><br/>Your Username: " + ds.Tables[0].Rows[0]["UserId"] + "<br/><br/>Your
Password: " + ds.Tables[0].Rows[0]["Passwd"] + "<br/><br/>";
mail.Body = Body;
mail.IsBodyHtml = true;
SmtpClient smtp = newSmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.Credentials = new System.Net.NetworkCredential
("[email protected]", "nabeelakhansrmscet");
smtp.EnableSsl = true;
smtp.Send(mail);
lblStatusBar.Text = "Please Check Your Email-id for Password";
txtUserId.Text = "";
}
else
{
lblStatusBar.Text = "The Email you entered not exists.";
}
}
catch (Exception ex)
{
Console.WriteLine("{0} Exception caught.", ex);
lblStatusBar.Text = "Having some problem ..Please try again...!!";
}
}
}
mainMaster.master
<
%@MasterLanguage="C#"AutoEventWireup="true"CodeFile="mainMaster.master.cs"Inherits="
mainMaster"%>
<
%@RegisterAssembly="AjaxControlToolkit"Namespace="AjaxControlToolkit"TagPrefix="asp"
%>
<!DOCTYPEhtml>
<htmlxmlns="http://www.w3.org/1999/xhtml">
<headrunat="server">
<title>Max Real Estate</title>

133

<linkhref="css/styles.css"rel="stylesheet"/>
<linkhref="css/template.css"rel="stylesheet"/>
<linkhref="css/validationEngine.jquery.css"rel="stylesheet"/>
<scriptsrc="js/jquery.validationEngine-en.js"></script>
<scriptsrc="js/jquery-1.6.min.js"></script>
<scriptsrc="js/jquery.validationEngine.js"></script>
<metahttp-equiv="Content-Type"content="text/html; charset=iso-8859-1">
<!-- ImageReady Preload Script (index.psd) -->
<scripttype="text/javascript">
jQuery(document).ready(function () {
jQuery("#form1").validationEngine();
});
</script>
<scripttype="text/javascript">
<!-function newImage(arg) {
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}
function changeImages() {
if (document.images && (preloadFlag == true)) {
for (var i = 0; i < changeImages.arguments.length; i += 2) {
document[changeImages.arguments[i]].src = changeImages.arguments[i + 1];
}
}
}
var preloadFlag = false;
function preloadImages() {
if (document.images) {
about_us_over = newImage("images/about-us-over.jpg");
find_a_home_over = newImage("images/find-a-home-over.jpg");
rental_over = newImage("images/rental-over.jpg");
moving_over = newImage("images/moving-over.jpg");
support_over = newImage("images/support-over.jpg");
contacts_over = newImage("images/contacts-over.jpg");
preloadFlag = true;
}
}

134

// -->
</script>
<!-- End Preload Script -->
<asp:ContentPlaceHolderid="head"runat="server">
</asp:ContentPlaceHolder>
<styletype="text/css">
.auto-style1 {
height: 44px;
width: 377px;
}
.auto-style2 {
height: 44px;
width: 201px;
}
.auto-style3 {
width: 201px;
}
.auto-style5 {
width: 1189px;
}
.auto-style6 {
height: 44px;
width: 305px;
}
</style>
</head>
<bodybgcolor="#FFFFFF"onload="preloadImages();">
<formid="form1"runat="server">
<center><tableid="Table_01"border="0"cellpadding="0"cellspacing="0"style="width:1150px;
height:auto;">
<%--<tr>
<td rowspan="22" style="backgroundimage:url('images/m1.jpg');width:36px;height:auto;">
</td>
<td colspan="12" style="background-image:url('images/title1.jpg')" >
<!--<img src="images/title.jpg" width="700" height="38" alt="">-->
<a href="Admin/LoginForm.aspx" style="padding-left:610px;fontsize:16px;color:#06A8E6">User Login</a>
</td>
<td rowspan="22" style="backgroundimage:url('images/m22.jpg');width:39px;height:auto">
</td>
<td>
135

<img src="images/spacer.gif" width="1" height="38" alt=""></td>


</tr>--%>
<tr>
<td>
<ahref="Home.aspx"
onmouseover="window.status='about us'; changeImages('about_us',
'images/about-us-over.jpg'); return true;"
onmouseout="window.status=''; changeImages('about_us',
'images/about-us.jpg'); return true;"
onmousedown="changeImages('about_us', 'images/about-usover.jpg'); return true;"
onmouseup="changeImages('about_us', 'images/about-us-over.jpg');
return true;">
<imgname="about_us"src="images/aboutus.jpg"width="238"height="54"border="0"alt="about us"/></a></td>
<tdcolspan="3"rowspan="6"style="width: 960px;height:300px;">
<!--<img src="images/m3.jpg" width="462" height="202" alt="">-->
<embedsrc="slider/index.html"style="width: 960px;height:300px"/>
</td>
<td>
<imgsrc="images/spacer.gif"width="1"height="54"alt=""></td>
</tr>
<tr>
<td>
<ahref="About_Us.aspx"
onmouseover="window.status='find a home';
changeImages('find_a_home', 'images/find-a-home-over.jpg'); return true;"
onmouseout="window.status=''; changeImages('find_a_home',
'images/find-a-home.jpg'); return true;"
onmousedown="changeImages('find_a_home', 'images/find-ahome-over.jpg'); return true;"
onmouseup="changeImages('find_a_home', 'images/find-a-homeover.jpg'); return true;">
<imgname="find_a_home"src="images/find-ahome.jpg"width="238"height="32"border="0"alt="find a home"></a></td>
<td>
<imgsrc="images/spacer.gif"width="1"height="32"alt=""></td>
</tr>
<tr>
<td>
<ahref="registration.aspx"
onmouseover="window.status='rental'; changeImages('rental',
'images/rental-over.jpg'); return true;"
onmouseout="window.status=''; changeImages('rental',
'images/rental.jpg'); return true;"

136

onmousedown="changeImages('rental', 'images/rental-over.jpg');
return true;"
onmouseup="changeImages('rental', 'images/rental-over.jpg'); return
true;">
<imgname="rental"src="images/rental.jpg"width="238"height="31"border="0"alt="rental"></a>
</td>
<td>
<imgsrc="images/spacer.gif"width="1"height="31"alt=""/></td>
</tr>
<tr>
<td>
<ahref="feedBack.aspx"
onmouseover="window.status='moving'; changeImages('moving',
'images/moving-over.jpg'); return true;"
onmouseout="window.status=''; changeImages('moving',
'images/moving.jpg'); return true;"
onmousedown="changeImages('moving', 'images/movingover.jpg'); return true;"
onmouseup="changeImages('moving', 'images/moving-over.jpg');
return true;">
<imgname="moving"src="images/moving.jpg"width="238"height="31"border="0"alt="moving"
></a></td>
<td>
<imgsrc="images/spacer.gif"width="1"height="31"alt=""></td>
</tr>
<tr>
<td>
<ahref="Carrier.aspx"
onmouseover="window.status='support'; changeImages('support',
'images/support-over.jpg'); return true;"
onmouseout="window.status=''; changeImages('support',
'images/support.jpg'); return true;"
onmousedown="changeImages('support', 'images/supportover.jpg'); return true;"
onmouseup="changeImages('support', 'images/support-over.jpg');
return true;">
<imgname="support"src="images/support.jpg"width="238"height="31"border="0"alt="support">
</a></td>
<td>
<imgsrc="images/spacer.gif"width="1"height="31"alt=""></td>
137

</tr>
<tr>
<tdrowspan="2">
<ahref="ContactUs.aspx"
onmouseover="window.status='contacts'; changeImages('contacts',
'images/contacts-over.jpg'); return true;"
onmouseout="window.status=''; changeImages('contacts',
'images/contacts.jpg'); return true;"
onmousedown="changeImages('contacts', 'images/contactsover.jpg'); return true;"
onmouseup="changeImages('contacts', 'images/contacts-over.jpg');
return true;">
<imgname="contacts"src="images/contacts.jpg"width="238"height="40"border="0"alt="contacts
"></a></td>
<td>
<imgsrc="images/spacer.gif"width="1"height="23"alt=""></td>
</tr>
<tr>
<tdrowspan="2"style="background-image:url('images/m4.jpg');"class="autostyle6">
<ahref="SearchProperty.aspx"style="font-size:16px;padding-left:30px;font-family:Arial">Search
Property</a>
<!--<img src="images/m4.jpg" width="301" height="44" alt="">--></td>
<tdrowspan="2"style="background-image:url('images/m4.jpg');"class="auto-style2">
<ahref="PostRequirement.aspx"style="font-size:16px;padding-left:30px;font-family:Arial">Post
Requirement</a>
</td>
<%--<td>
<img src="images/spacer.gif" width="1" height="17" alt="" /></td>--%>
<tdrowspan="2"style="background-image:url('images/m4.jpg');"class="auto-style2">
<ahref="Admin/LoginForm.aspx"style="font-size:16px;padding-left:30px;fontfamily:Arial">&nbsp;Login</a></td>
</tr>
<tr>
<td>
<imgsrc="images/m5.jpg"width="238"height="27"alt=""/></td>
<td>
<imgsrc="images/spacer.gif"width="1"height="27"alt=""/></td>
</tr>
<tr><tdcolspan="2"valign="top"style="padding:10px5px0px10px;text-align:justify">

138

<asp:ContentPlaceHolderID="nab"runat="server">
</asp:ContentPlaceHolder>
</td><tdcolspan="2"style="vertical-align:top;padding-top:15px;"class="auto-style3">
<table>
<tr><tdclass="auto-style1">
<asp:ToolkitScriptManagerID="ToolkitScriptManager1"runat="server">
</asp:ToolkitScriptManager>
<fieldset>
<legendstyle="color:#1E50A0;font-size:13px;font-family:Verdana;font-weight:bold">
Online Enquiry
</legend>
<table>
<tr><td><asp:TextBoxrunat="server"CssClass="validate[required]"ID="txtName"style="width:1
28px;height:25px;font-size:14px;color:#646464;"></asp:TextBox>
<asp:TextBoxWatermarkExtenderID="txtName_TextBoxWatermarkExtender"
runat="server"Enabled="True"TargetControlID="txtName"WatermarkText="Enter Your Name">
</asp:TextBoxWatermarkExtender>
<asp:RequiredFieldValidatorID="RequiredFieldValidator1"runat="server"ErrorMessage="Enter
Your
Name !"ControlToValidate="txtName"Display="Static"ValidationGroup="enq"></asp:RequiredFi
eldValidator>
</td></tr>
<tr><td><asp:TextBoxrunat="server"CssClass="validate[required]"ID="txtContactNo"style="wi
dth:128px;height:25px;font-size:14px;color:#646464;"MaxLength="10"></asp:TextBox>
<asp:TextBoxWatermarkExtenderID="txtContactNo_TextBoxWatermarkExtender"
runat="server"Enabled="True"TargetControlID="txtContactNo"WatermarkText="Contact
Number">
</asp:TextBoxWatermarkExtender>
<asp:RequiredFieldValidatorID="RequiredFieldValidator2"runat="server"ErrorMessage="Enter
Mobile
Number !"ControlToValidate="txtContactNo"Display="Static"ValidationGroup="enq"></asp:Req
uiredFieldValidator>
</td></tr>
<tr><td><asp:TextBoxrunat="server"ID="txtEmailId"style="width:128px;height:25px;fontsize:14px;color:#646464;"></asp:TextBox>
<asp:TextBoxWatermarkExtenderID="txtEmailId_TextBoxWatermarkExtender"
runat="server"Enabled="True"TargetControlID="txtEmailId"WatermarkText="Your EmailId">
</asp:TextBoxWatermarkExtender>
<asp:RequiredFieldValidatorID="RequiredFieldValidator5"runat="server"ErrorMessage="Enter
Valid Email
Id !"ControlToValidate="txtEmailId"Display="Static"ValidationGroup="enq"></asp:RequiredFiel
dValidator>
</td></tr>
<tr><td><asp:TextBoxrunat="server"ID="txtMessage"style="width:128px;height:65px;fontsize:14px;color:#646464;"TextMode="MultiLine"></asp:TextBox>
139

<asp:TextBoxWatermarkExtenderID="txtMessage_TextBoxWatermarkExtender"
runat="server"Enabled="True"TargetControlID="txtMessage"WatermarkText="Your Message">
</asp:TextBoxWatermarkExtender>
<asp:RequiredFieldValidatorID="RequiredFieldValidator4"runat="server"ErrorMessage="Enter
Yor
Message !"ControlToValidate="txtMessage"Display="Static"ValidationGroup="enq"></asp:Requ
iredFieldValidator>
</td></tr>
<tr><tdstyle="paddingleft:60px;"><asp:LabelID="lblMsg"runat="server"></asp:Label><asp:ButtonID="btnSave"runat
="server"
Text="Submit"style="width:75px;height:25px;color:#1E50A0"
onclick="btnSave1_Click"ValidationGroup="enq"/></td></tr>
</table>
</fieldset>
</td></tr>
</table>
</td></tr>
<tr><tdcolspan="4"valign="top"style="padding:10px5px0px10px;text-align:justify">
<asp:ContentPlaceHolderID="abc"runat="server">
</asp:ContentPlaceHolder>
</td></tr>
<tr>
<tdcolspan="4">
<imgsrc="images/dn1.jpg"height="26"alt=""class="auto-style5"/></td>
<td>
<imgsrc="images/spacer.gif"width="1"height="26"alt=""/></td>
</tr>
<tr>
<tdcolspan="4"align="center"valign="middle"bgcolor="#90959B"class="text6">
<ahref="Home.aspx">Home</a> | <ahref="About_Us.aspx">About
Us</a> | <ahref="registration.aspx">Registration</a> | <ahref="PostRequirement.aspx">Post
Requirement</a> | <ahref="SearchProperty.aspx">Search Property</a> |
<ahref="feedBack.aspx">FeedBack</a> | <ahref="ContactUs.aspx">Contact US</a><br/>
<br/>
Copyright &copy; maxrealestate.com<br/>
</td>
</tr>
</table>

140

</center>
</form>
</body>
</html>
mainMaster.master.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
publicpartialclassmainMaster : System.Web.UI.MasterPage
{
insert ins = newinsert();
protectedvoid Page_Load(object sender, EventArgs e)
{
}
protectedvoid btnSave1_Click(object sender, EventArgs e)
{
string query = "insert into tblEnquiry values('" + txtName.Text + "','" + txtContactNo.Text + "','" +
txtEmailId.Text + "','" + txtMessage.Text + "')";
if (ins.nonquery(query))
{
Response.Write("<script type=\"text/javascript\">alert('Your details successfully
submitted');</script>");
txtName.Text = "";
txtContactNo.Text = "";
txtEmailId.Text = "";
txtMessage.Text = "";
}
}
}
PostRequirement.aspx

141

<
%@PageTitle=""Language="C#"MasterPageFile="~/mainMaster.master"AutoEventWireup="true
"CodeFile="PostRequirement.aspx.cs"Inherits="PostRequirement"%>
<asp:ContentID="Content1"ContentPlaceHolderID="head"Runat="Server">
<styletype="text/css">
.auto-style7 {
width: 216px;
height: 493px;
}
.auto-style8 {
width: 346px;
}
</style>
</asp:Content>
<asp:ContentID="Content2"ContentPlaceHolderID="nab"Runat="Server">
<divstyle="width:98%;height:auto;-webkit-border-radius: 20px;-moz-border-radius: 20px;
border-radius: 20px;border:2pxsolid#CCCCCC;background-color:#FFFFFF;-webkit-box-shadow:
#B3B3B33px3px3px;-moz-box-shadow: #B3B3B33px3px3px;
box-shadow: #B3B3B33px3px3px;">
<tablewidth="98%">
<tr>
<tdvalign="top">
<table>
<tr>
<tdalign="center"style="font-size:17px;font-weight:bold;color:#373737;fontfamily:Arial;padding-left:20px;padding-top:15px;"colspan="2">Post Requirements</td>
</tr>
<tr><tdclass="Text10">Name</td><tdclass="auto-style8"><asp:TextBoxID="txtName"
runat="server"
style="width:150px;height:25px;font-size:16px;color:#575757;font-family:Arial"
></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator12"runat="server"ControlToValidate="t
xtName"ErrorMessage="Enter Name !"ValidationGroup="pr"></asp:RequiredFieldValidator>
</td></tr>
<tr><tdclass="Text10">Contact Number</td><tdclass="autostyle8"><asp:TextBoxID="txtContactNo"
runat="server"
style="width:150px;height:25px;font-size:16px;color:#575757;font-family:Arial"
></asp:TextBox>

142

<asp:RequiredFieldValidatorID="RequiredFieldValidator13"runat="server"ControlToValidate="t
xtContactNo"ErrorMessage="Enter Mobile
No. !"ValidationGroup="pr"></asp:RequiredFieldValidator>
</td></tr>
<tr><tdclass="Text10">Address</td><tdclass="auto-style8"><asp:TextBoxID="txtAddress"
runat="server"
style="width:150px;height:50px;font-size:16px;color:#575757;fontfamily:Arial"TextMode="MultiLine"
></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator14"runat="server"ControlToValidate="t
xtAddress"ErrorMessage="Enter
Address !"ValidationGroup="pr"></asp:RequiredFieldValidator>
</td></tr>
<tr><tdclass="Text10">EmailId</td><tdclass="auto-style8"><asp:TextBoxID="txtEmailId"
runat="server"
style="width:150px;height:25px;font-size:16px;color:#575757;font-family:Arial"
></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator15"runat="server"ControlToValidate="t
xtEmailId"ErrorMessage="Enter Email !"ValidationGroup="pr"></asp:RequiredFieldValidator>
</td></tr>
<tr><tdclass="Text10">State</td><tdclass="auto-style8">
<asp:DropDownListID="ddlState"runat="server"
style="width:155px;height:25px;font-size:16px;color:#575757;font-family:Arial"
AutoPostBack="True"onselectedindexchanged="ddlState_SelectedIndexChanged"
>
<asp:ListItemSelected="True">-Select-</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidatorID="RequiredFieldValidator16"runat="server"ControlToValidate="d
dlState"ErrorMessage="Elect State !"InitialValue="Select-"ValidationGroup="pr"></asp:RequiredFieldValidator>
</td></tr>
<tr><tdclass="Text10">City</td><tdclass="autostyle8"><asp:DropDownListID="ddlCity"runat="server"
style="width:155px;height:25px;font-size:16px;color:#575757;font-family:Arial">
</asp:DropDownList>

143

<asp:RequiredFieldValidatorID="RequiredFieldValidator17"runat="server"ControlToValidate="d
dlCity"ErrorMessage="Select City !"InitialValue="Select-"ValidationGroup="pr"></asp:RequiredFieldValidator>
</td></tr>
<tr><tdclass="Text10">Radius</td><tdclass="auto-style8"><asp:DropDownListID="ddlRadius"
runat="server"
style="width:155px;height:25px;font-size:16px;color:#575757;font-family:Arial"
DataSourceID="SqlDataSource1"DataTextField="Radius"
DataValueField="Radius">
</asp:DropDownList>
<asp:RequiredFieldValidatorID="RequiredFieldValidator18"runat="server"ControlToValidate="d
dlRadius"ErrorMessage="Select Radius !"InitialValue="select-"ValidationGroup="pr"></asp:RequiredFieldValidator>
<asp:SqlDataSourceID="SqlDataSource1"runat="server"ConnectionString="<%$
ConnectionStrings:MREConnectionString %>"SelectCommand="SELECT * FROM
[RadiusRangeTable]"></asp:SqlDataSource>
</td></tr>
<tr><tdclass="Text10">Price</td><tdclass="auto-style8"><asp:DropDownListID="ddlPrice"
runat="server"
style="width:155px;height:25px;font-size:16px;color:#575757;font-family:Arial"
DataSourceID="SqlDataSource2"DataTextField="Price"
DataValueField="Price">
</asp:DropDownList>
<asp:RequiredFieldValidatorID="RequiredFieldValidator19"runat="server"ControlToValidate="d
dlPrice"ErrorMessage="Select Price !"InitialValue="Select-"ValidationGroup="pr"></asp:RequiredFieldValidator>
<asp:SqlDataSourceID="SqlDataSource2"runat="server"ConnectionString="<%$
ConnectionStrings:MREConnectionString %>"SelectCommand="SELECT * FROM
[PriceRangeTable]"></asp:SqlDataSource>
</td></tr>
<tr><tdclass="Text10">Property Type</td><tdclass="auto-style8"><asp:TextBoxID="txtType"
runat="server"
style="width:150px;height:25px;font-size:16px;color:#575757;font-family:Arial"
Text="Land"ReadOnly="True"></asp:TextBox>
</td></tr>
<tr><tdclass="Text10">Land Mark</td><tdclass="auto-style8"><asp:TextBoxID="txtLandMark"
runat="server"
style="width:150px;height:25px;font-size:16px;color:#575757;font-family:Arial"
></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator20"runat="server"ControlToValidate="t
xtLandMark"ErrorMessage="Enter Land
Mark !"ValidationGroup="pr"></asp:RequiredFieldValidator>
144

</td></tr>
<tr><tdcolspan="2"><br/></td></tr>
<tr><tdalign="center"colspan="2"><asp:ButtonID="btnSearch"runat="server"
Text="Submit"ToolTip="click me"
style="margin-top: 0px;width:80px;height:25px;color:#575757;font-size:16px;fontweight:bold;font-family:Arial;font-size:16px;color:#575757;fontfamily:Arial"onclick="btnSearch_Click"ValidationGroup="pr"
/><asp:LabelID="lblmsg"runat="server"></asp:Label></td></tr>
</table>
</td><tdvalign="top">
<table>
<tr>
<td><imgsrc="images/post-requirements.jpg"alt=""class="auto-style7"/></td>
</tr>
</table>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</asp:Content>
<asp:ContentID="Content3"ContentPlaceHolderID="abc"Runat="Server">
</asp:Content>

PostRequirement.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
publicpartialclassPostRequirement : System.Web.UI.Page
{
insert ins = newinsert();
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
145

{
DataSet ds = ins.data("Select * from StateTable");
foreach (DataRow dr in ds.Tables[0].Rows)
{
ListItem li = newListItem();
li.Text = dr["state_name"].ToString();
li.Value = dr["state_id"].ToString();
ddlState.Items.Add(li);
}
}
}
protectedvoid btnSearch_Click(object sender, EventArgs e)
{
string query = "insert into PostRequirementTable values('" + txtName.Text + "','" +
txtContactNo.Text + "','" + txtAddress.Text + "','" + txtEmailId.Text + "','" +
ddlState.SelectedItem + "','" + ddlCity.SelectedItem + "','" + ddlRadius.SelectedItem + "','" +
ddlPrice.SelectedItem + "','" + txtType.Text + "','" + txtLandMark.Text + "')";
if (ins.nonquery(query))
{
lblmsg.Text = "Send";
txtName.Text = "";
txtContactNo.Text = "";
txtAddress.Text = "";
txtEmailId.Text = "";
ddlState.SelectedIndex = 0;
ddlCity.SelectedIndex = 0;
ddlRadius.SelectedIndex = 0;
ddlPrice.SelectedIndex = 0;
txtLandMark.Text = "";
}
}
protectedvoid ddlState_SelectedIndexChanged(object sender, EventArgs e)
{
DataSet ds = ins.data("Select * from cityTable where state_id='" + ddlState.SelectedItem.Value +
"'");
ddlCity.Items.Clear();
ddlCity.Items.Add("-Select-");
foreach (DataRow dr in ds.Tables[0].Rows)
{
ListItem li = newListItem();
li.Text = dr["city_name"].ToString();
li.Value = dr["city_id"].ToString();
ddlCity.Items.Add(li);
}
146

}
}
registration.aspx
<
%@PageTitle=""Language="C#"MasterPageFile="~/mainMaster.master"AutoEventWireup="true
"CodeFile="registration.aspx.cs"Inherits="registration"%>
<
%@Registerassembly="AjaxControlToolkit"namespace="AjaxControlToolkit"tagprefix="asp"%
>
<asp:ContentID="Content1"ContentPlaceHolderID="head"Runat="Server">
<styletype="text/css">
.auto-style5 {
font-size: 12px;
font-weight: bold;
color: #707070;
font-family: Arial;
width: 28px;
padding-left: 10px;
padding-top: 15px;
}
.auto-style6 {
font-size: 12px;
font-weight: bold;
color: #707070;
font-family: Arial;
height: 38px;
padding-left: 10px;
padding-top: 15px;
}
.auto-style7 {
font-size: 12px;
font-weight: bold;
color: #707070;
font-family: Arial;
width: 145px;
padding-left: 10px;
padding-top: 15px;
}
.auto-style8 {
font-size: 12px;
font-weight: bold;
color: #707070;
font-family: Arial;
147

height: 38px;
padding-left: 10px;
padding-top: 15px;
width: 145px;
}
.auto-style9 {
font-size: 12px;
font-weight: bold;
color: #707070;
font-family: Arial;
width: 145px;
padding-left: 10px;
padding-top: 15px;
height: 35px;
}
.auto-style10 {
height: 35px;
}
</style>
</asp:Content>
<asp:ContentID="Content2"ContentPlaceHolderID="nab"Runat="server">
<divstyle="width:100%; height:auto;-webkit-border-radius: 20px;-moz-border-radius: 20px;
border-radius: 20px;border:2pxsolid#CCCCCC;background-color:#FFFFFF;-webkit-box-shadow:
#B3B3B33px3px3px;-moz-box-shadow: #B3B3B33px3px3px;
box-shadow: #B3B3B33px3px3px;">

<table>
<tr><tdstyle="font-size:17px;font-weight:bold;color:#373737;font-family:Arial;paddingleft:20px;padding-top:15px;"colspan="4">Select Profile</td></tr>
<tr><tdclass="Text10"style="paddingleft:15px;"><asp:RadioButtonID="rdbSeeker"runat="server"
Text="Seeker"GroupName="a"AutoPostBack="True"
oncheckedchanged="rdbSeeker_CheckedChanged"/></td>
<tdclass="Text10"><asp:RadioButtonID="rdbAgent"runat="server"Text="Agent"
GroupName="a"AutoPostBack="true"oncheckedchanged="rdbAgent_CheckedChanged"/></td>
<tdclass="Text10">
<asp:RadioButtonID="rdbBuilder"runat="server"Text="Builder"
GroupName="a"AutoPostBack="True"oncheckedchanged="rdbBuilder_CheckedChanged"Check
ed="true"/></td>
<tdclass="auto-style5">
<asp:RadioButtonID="rdbQwner"runat="server"Text="Owner"

148

GroupName="a"AutoPostBack="True"oncheckedchanged="rdbQwner_CheckedChanged"/></td
>
</tr>
<tr><tdstyle="padding-left:10px;paddingtop:10px;"colspan="4"><imgsrc="images/h1.jpg"alt=""/></td></tr>
<tr><tdcolspan="4"valign="top">
<table>
<tr><tdcolspan="2"style="font-size:17px;font-weight:bold;color:#373737;fontfamily:Arial;padding-left:10px;"valign="top">Your Information</tr>
<tr><tdclass="auto-style9">Name</td><tdclass="autostyle10"><asp:TextBoxID="txtName"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"CssClass="validate[required]"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator10"runat="server"ErrorMessage="Enter
Your
Name !"ControlToValidate="txtName"Display="Static"SetFocusOnError="False"ValidationGrou
p="reg"></asp:RequiredFieldValidator>
</td></tr>
<tr><tdclass="auto-style7">Country</td><td>
<asp:DropDownListID="ddlCountrty"runat="server"
AutoPostBack="true"
style="width:160px;height:25px;font-size:16px;color:#575757;font-family:Arial"
onselectedindexchanged="ddlCountrty_SelectedIndexChanged">
<asp:ListItemSelected="True">-Select-</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidatorID="RequiredFieldValidator11"runat="server"ErrorMessage="Select
Your Country !"InitialValue="Select-"ControlToValidate="ddlCountrty"Display="Static"SetFocusOnError="False"ValidationGr
oup="reg"></asp:RequiredFieldValidator>
</td></tr>
<tr><tdclass="auto-style7">State</td><td><asp:DropDownListID="ddlState"runat="server"
style="width:160px;height:25px;font-size:16px;color:#575757;font-family:Arial">
<asp:ListItemSelected="True">-Select-</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidatorID="RequiredFieldValidator12"runat="server"ErrorMessage="Select
Your State !"InitialValue="Select-"ControlToValidate="ddlState"Display="Static"SetFocusOnError="False"ValidationGroup
="reg"></asp:RequiredFieldValidator>
</td></tr>
<tr><tdclass="autostyle7">City</td><td><asp:TextBoxID="txtCity"runat="server"style="width:155px;height:25px;
font-size:16px;color:#575757;font-family:Arial"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator13"runat="server"ErrorMessage="Enter
Your City
Name !"ControlToValidate="txtName"Display="Static"SetFocusOnError="False"ValidationGrou
p="reg"></asp:RequiredFieldValidator>
149

</td></tr>
<tr><tdclass="auto-style7">Date of Birth</td>
<td><asp:TextBoxID="txtDob"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"></asp:TextBox>
<asp:CalendarExtenderID="txtDob_CalendarExtender"runat="server"
Enabled="True"TargetControlID="txtDob">
</asp:CalendarExtender>
<asp:RequiredFieldValidatorID="RequiredFieldValidator14"runat="server"ErrorMessage="Select
Date Of
Birth !"ControlToValidate="txtDob"Display="Static"SetFocusOnError="False"ValidationGroup=
"reg"></asp:RequiredFieldValidator>
</td></tr>
<tr><tdclass="auto-style8">Gender</td><tdclass="auto-style6">
<asp:RadioButtonID="rdbMale"runat="server"Text="Male"GroupName="b"Checked="true"/>
<asp:RadioButtonID="rdbFemale"
runat="server"Text="Female"GroupName="b"/></td></tr>
<tr><tdclass="auto-style7">Contact Number</td><td>
<asp:TextBoxID="txtContactNumber"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"MaxLength="10"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator15"runat="server"ErrorMessage="Enter
Mobile
Number !"ControlToValidate="txtContactNumber"Display="Static"SetFocusOnError="False"Vali
dationGroup="reg"></asp:RequiredFieldValidator>
</td></tr>
<tr><tdclass="auto-style7">
<asp:LabelID="lblfreeweb"runat="server"Text="Website"></asp:Label></td><tdclass="Text10"
>
<asp:TextBoxID="txtWeb"runat="server"
ForeColor="Black"Text=" "style="width:155px;height:25px;font-size:16px;color:#575757;fontfamily:Arial; text-align: left;"></asp:TextBox>
<br/>
<asp:TextBoxWatermarkExtenderID="TextBoxWatermarkExtender1"
runat="server"Enabled="True"TargetControlID="txtWeb"WatermarkText="....Website....">
</asp:TextBoxWatermarkExtender>
&nbsp;
<asp:LabelID="lbltext1"runat="server"
Text="Enter company name eg: http://www.maxrealestate.com"></asp:Label>
</td></tr>
<tr><tdclass="auto-style7">
<asp:LabelID="lblDeal"runat="server"Text="Deals In"></asp:Label></td><td>
150

<asp:TextBoxID="txtDeal"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"></asp:TextBox>
<asp:TextBoxWatermarkExtenderID="txtDeal_TextBoxWatermarkExtender"
runat="server"Enabled="True"TargetControlID="txtDeal"WatermarkText="....City Area....">
</asp:TextBoxWatermarkExtender>
<asp:RequiredFieldValidatorID="RequiredFieldValidator16"runat="server"ErrorMessage="Enter
Your Deals
Location !"ControlToValidate="txtDeal"Display="Static"SetFocusOnError="False"ValidationGro
up="reg"></asp:RequiredFieldValidator>
</td></tr>
<tr><tdclass="auto-style7">
<asp:LabelID="lblSpecialise"runat="server"Text="Specialise
In"></asp:Label></td><tdclass="Text10">
<asp:RadioButtonID="rdbResidential"runat="server"GroupName="c"
Text=" Residential "/>
<asp:RadioButtonID="rdbLand"runat="server"GroupName="c"
Text=" Land "/>
<asp:RadioButtonID="rdbBoth"runat="server"GroupName="c"Text="Both"Checked="true"/>
</td></tr>

<tr><tdclass="auto-style7">Email Id</td><td>
<asp:TextBoxID="txtEmailId"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator17"runat="server"ErrorMessage="Enter
Your User
ID !"ControlToValidate="txtEmailId"Display="Static"SetFocusOnError="False"ValidationGroup
="reg"></asp:RequiredFieldValidator>
</td></tr>
<tr><tdclass="auto-style7">Password</td><td>
<asp:TextBoxID="txtpwd"runat="server"style="width:155px;height:25px;fontsize:16px;color:#575757;font-family:Arial"TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator18"runat="server"ErrorMessage="Enter
Password !"ControlToValidate="txtpwd"Display="Static"SetFocusOnError="False"ValidationGro
up="reg"></asp:RequiredFieldValidator>
</td></tr>
<tr><tdstyle="padding-left:10px;paddingtop:10px;"colspan="2"><imgsrc="images/h1.jpg"alt=""/></td></tr>
<tr><tdcolspan="2"class="Text10">
151

<asp:CheckBoxID="Ch1"runat="server"/>I confirm that I have read and agreed to


<ahref="#"style="color:Blue;">Privacy Policy</a> and
Terms of Use of maxrealestate.com. </td></tr>
<tr><tdalign="right"colspan="2"style="padding-right:25px;">
<asp:LabelID="msg"runat="server"></asp:Label>
<asp:ButtonID="btnSave"runat="server"Text="Save"style="margin-top:
0px;width:100px;height:30px;color:#575757;font-size:16px;font-weight:bold;fontfamily:Arial;"onclick="btnSave_Click"ValidationGroup="reg"/>
</td></tr>
</table>
</td></tr>
</table>
</div>
</asp:Content>
<asp:ContentID="Content3"ContentPlaceHolderID="abc"Runat="Server">
</asp:Content>

registration.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
publicpartialclassregistration : System.Web.UI.Page
{
insert ins = newinsert();
string Gender;
string property;
string Type;
publicSqlConnection connectionDB = connectionManager.GetConnection();
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{

152

DataSet ds = ins.data("Select * from CountryTable");


foreach (DataRow dr in ds.Tables[0].Rows)
{
ListItem li = newListItem();
li.Text = dr["country_Name"].ToString();
li.Value = dr["country_Id"].ToString();
ddlCountrty.Items.Add(li);
}
}
}
protectedvoid btnSave_Click(object sender, EventArgs e)
{
if (rdbMale.Checked == true)
{
Gender = "male";
}
else
{
Gender = "female";
}
//-------------------------------------------------if (rdbLand.Checked == true)
{
property = "land";
}
elseif (rdbResidential.Checked == true)
{
property = "Residencial";
}
elseif (rdbBoth.Checked == true)
{
property = "Both";
}
//-------------------------------------------------if(rdbAgent.Checked==true)
{
Type="Agent";
}
elseif(rdbBuilder.Checked==true)
{
Type="Builder";
}
elseif(rdbSeeker.Checked==true)
153

{
Type="Seeker";
}
elseif(rdbQwner.Checked==true)
{
Type="Owner";
}
//---------------------------------------------------if (Ch1.Checked == true)
{
if (rdbSeeker.Checked == true)
{
string query = "insert into SeekerTable values('" + txtName.Text + "','" +
ddlCountrty.SelectedItem + "','" + ddlState.SelectedItem + "','" + txtCity.Text + "','" + txtDob.Text
+ "','" + Gender + "','" + txtContactNumber.Text + "','" + txtEmailId.Text + "')";
connectionDB.Open();
string str = "insert into LoginTable values('" + txtEmailId.Text + "','" + txtpwd.Text + "','" + Type
+ "')";
SqlCommand cmd = newSqlCommand(str, connectionDB);
cmd.ExecuteNonQuery();
if (ins.nonquery(query))
{
msg.Text = "Data Saved";
txtName.Text = "";
ddlCountrty.SelectedIndex = 0;
ddlState.SelectedIndex = 0;
txtCity.Text = "";
txtDob.Text = "";
txtContactNumber.Text = "";
txtEmailId.Text = "";
txtpwd.Text = "";
}
}
elseif (rdbAgent.Checked == true)
{
string query = "insert into AgentTable values('" + txtName.Text + "','" + ddlCountrty.SelectedItem
+ "','" + ddlState.SelectedItem + "','" + txtCity.Text + "','" + txtDob.Text + "','" + Gender + "','" +
txtContactNumber.Text + "','" + txtDeal.Text + "','" + property + "','" + txtEmailId.Text + "' )";
connectionDB.Open();
string str = "insert into LoginTable values('" + txtEmailId.Text + "','" + txtpwd.Text + "','" + Type
+ "')";
154

SqlCommand cmd = newSqlCommand(str, connectionDB);


cmd.ExecuteNonQuery();
if (ins.nonquery(query))
{
msg.Text = "Data Saved";
txtName.Text = "";
ddlCountrty.SelectedIndex = 0;
ddlState.SelectedIndex = 0;
txtCity.Text = "";
txtDob.Text = "";
txtContactNumber.Text = "";
txtEmailId.Text = "";
txtpwd.Text = "";
txtDeal.Text = "";
}
}
elseif (rdbBuilder.Checked == true)
{
string query = "insert into BuilderTable values('" + txtName.Text + "','" +
ddlCountrty.SelectedItem + "','" + ddlState.SelectedItem + "','" + txtCity.Text + "','" + txtDob.Text
+ "','" + Gender + "','" + txtContactNumber.Text + "','" + txtWeb.Text + "','" + txtDeal.Text + "','"
+ property + "','" + txtEmailId.Text + "' )";
connectionDB.Open();
string str = "insert into LoginTable values('" + txtEmailId.Text + "','" + txtpwd.Text + "','" + Type
+ "')";
SqlCommand cmd = newSqlCommand(str, connectionDB);
cmd.ExecuteNonQuery();
if (ins.nonquery(query))
{
msg.Text = "Data Saved";
txtName.Text = "";
ddlCountrty.SelectedIndex = 0;
ddlState.SelectedIndex = 0;
txtCity.Text = "";
txtDob.Text = "";
txtContactNumber.Text = "";
txtEmailId.Text = "";
txtpwd.Text = "";
}
}
elseif (rdbQwner.Checked == true)
{
string query = "insert into OwnerTable values('" + txtName.Text + "','" +
ddlCountrty.SelectedItem + "','" + ddlState.SelectedItem + "','" + txtCity.Text + "','" + txtDob.Text
+ "','" + Gender + "','" + txtContactNumber.Text + "','" + txtEmailId.Text + "' )";
connectionDB.Open();
155

string str = "insert into LoginTable values('" + txtEmailId.Text + "','" + txtpwd.Text + "','" + Type
+ "')";
SqlCommand cmd = newSqlCommand(str, connectionDB);
cmd.ExecuteNonQuery();
if (ins.nonquery(query))
{
msg.Text = "Data Saved";
txtName.Text = "";
ddlCountrty.SelectedIndex = 0;
ddlState.SelectedIndex = 0;
txtCity.Text = "";
txtDob.Text = "";
txtContactNumber.Text = "";
txtEmailId.Text = "";
txtpwd.Text = "";
}
}
else
{
string message = "Please check the CheckBox..";
string script = "<script language=\"javascript\" type=\"text/javascript\">alert('" + message +
"');</script>";
ScriptManager.RegisterStartupScript(Page, this.GetType(), "AlertMessage", script, false);
}
//--------------------------------------------------// Response.Redirect("logindetails.aspx");
}
}

protectedvoid rdbSeeker_CheckedChanged(object sender, EventArgs e)


{
if (rdbSeeker.Checked == true)
{
lblfreeweb.Visible = false;
txtWeb.Visible = false;
lblDeal.Visible = false;
txtDeal.Visible = false;
lblSpecialise.Visible = false;
rdbResidential.Visible = false;
rdbLand.Visible = false;
rdbBoth.Visible = false;
156

lbltext1.Visible = false;
}
}
protectedvoid rdbQwner_CheckedChanged(object sender, EventArgs e)
{
if (rdbQwner.Checked == true)
{
lblfreeweb.Visible = false;
txtWeb.Visible = false;
lblDeal.Visible = false;
txtDeal.Visible = false;
lblSpecialise.Visible = false;
rdbResidential.Visible = false;
rdbLand.Visible = false;
rdbBoth.Visible = false;
lbltext1.Visible = false;
}
}
protectedvoid rdbAgent_CheckedChanged(object sender, EventArgs e)
{
if (rdbQwner.Checked == true)
{
lblfreeweb.Visible = false;
txtWeb.Visible = false;
lblDeal.Visible = true;
txtDeal.Visible = true;
lblSpecialise.Visible = true;
rdbResidential.Visible = true;
rdbLand.Visible = true;
rdbBoth.Visible = true;
lbltext1.Visible = false;
}
else
{
lblfreeweb.Visible = false;
txtWeb.Visible = false;
lbltext1.Visible = false;
lblDeal.Visible = true;
txtDeal.Visible = true;
lblSpecialise.Visible = true;
rdbResidential.Visible = true;
rdbLand.Visible = true;
157

rdbBoth.Visible = true;
}
}
protectedvoid rdbBuilder_CheckedChanged(object sender, EventArgs e)
{
if (rdbBuilder.Visible == true)
{
lblfreeweb.Visible = true;
txtWeb.Visible = true;
lblDeal.Visible = true;
txtDeal.Visible = true;
lblSpecialise.Visible = true;
rdbResidential.Visible = true;
rdbLand.Visible = true;
rdbBoth.Visible = true;
lbltext1.Visible = true;
}
}
protectedvoid ddlCountrty_SelectedIndexChanged(object sender, EventArgs e)
{
DataSet ds = ins.data("Select * from StateTable where country_id='" +
ddlCountrty.SelectedItem.Value + "'");
ddlState.Items.Clear();
ddlState.Items.Add("-Select-");
foreach (DataRow dr in ds.Tables[0].Rows)
{
ListItem li = newListItem();
li.Text = dr["state_Name"].ToString();
li.Value = dr["state_Id"].ToString();
ddlState.Items.Add(li);
}
}
}
SearchProperty.aspx
<
%@PageTitle=""Language="C#"MasterPageFile="~/mainMaster.master"AutoEventWireup="true
"CodeFile="SearchProperty.aspx.cs"Inherits="SearchProperty"%>
<asp:ContentID="Content1"ContentPlaceHolderID="head"Runat="Server">
<styletype="text/css">
a
{
158

color:Blue;
}
.auto-style5 {
width: 339px;
}
</style>
</asp:Content>
<asp:ContentID="Content2"ContentPlaceHolderID="nab"Runat="Server">
<divstyle="width:98%;height:auto;-webkit-border-radius: 20px;-moz-border-radius: 20px;
border-radius: 20px;border:2pxsolid#CCCCCC;background-color:#FFFFFF;-webkit-box-shadow:
#B3B3B33px3px3px;-moz-box-shadow: #B3B3B33px3px3px;
box-shadow: #B3B3B33px3px3px;">
<tablestyle="width: 80%">
<tr>
<tdvalign="top">
<table>
<tr>
<tdalign="center"style="font-size:17px;font-weight:bold;color:#373737;fontfamily:Arial;padding-left:20px;padding-top:15px;"colspan="2">Search Property</td>
</tr>
<tr><tdclass="Text10">State</td><td><asp:DropDownListID="ddlState"runat="server"
style="width:155px;height:25px;font-size:16px;color:#575757;font-family:Arial"
AutoPostBack="True"
onselectedindexchanged="ddlState_SelectedIndexChanged">
<asp:ListItemSelected="True">-Select-</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidatorID="RequiredFieldValidator11"runat="server"ControlToValidate="d
dlState"ErrorMessage="Select State !"InitialValue="Select-"ValidationGroup="sp"></asp:RequiredFieldValidator>
</td></tr>
<tr><tdclass="Text10">City</td><td><asp:DropDownListID="ddlCity"runat="server"
style="width:155px;height:25px;font-size:16px;color:#575757;font-family:Arial">
</asp:DropDownList>
<asp:RequiredFieldValidatorID="RequiredFieldValidator12"runat="server"ControlToValidate="d
dlCity"ErrorMessage="Select State !"InitialValue="Select-"ValidationGroup="sp"></asp:RequiredFieldValidator>
</td></tr>
<tr><tdclass="Text10">Radius</td><td><asp:DropDownListID="ddlRadius"
159

runat="server"
style="width:155px;height:25px;font-size:16px;color:#575757;font-family:Arial"
DataSourceID="SqlDataSource1"DataTextField="Radius"
DataValueField="Radius">
</asp:DropDownList>
<asp:RequiredFieldValidatorID="RequiredFieldValidator13"runat="server"ControlToValidate="d
dlRadius"ErrorMessage="Select Radius !"InitialValue="select-"ValidationGroup="sp"></asp:RequiredFieldValidator>
<asp:SqlDataSourceID="SqlDataSource1"runat="server"ConnectionString="<%$
ConnectionStrings:MREConnectionString %>"SelectCommand="SELECT * FROM
[RadiusRangeTable]"></asp:SqlDataSource>
</td></tr>
<tr><tdclass="Text10">Price</td><td><asp:DropDownListID="ddlPrice"
runat="server"
style="width:155px;height:25px;font-size:16px;color:#575757;font-family:Arial"
DataSourceID="SqlDataSource2"DataTextField="Price"
DataValueField="Price">
</asp:DropDownList>
<asp:RequiredFieldValidatorID="RequiredFieldValidator14"runat="server"ControlToValidate="d
dlPrice"ErrorMessage="Select Price !"InitialValue="Select-"ValidationGroup="sp"></asp:RequiredFieldValidator>
<asp:SqlDataSourceID="SqlDataSource2"runat="server"ConnectionString="<%$
ConnectionStrings:MREConnectionString %>"SelectCommand="SELECT * FROM
[PriceRangeTable]"></asp:SqlDataSource>
</td></tr>
<tr><tdclass="Text10">Property Type</td><td><asp:TextBoxID="txtType"
runat="server"
style="width:150px;height:25px;font-size:16px;color:#575757;font-family:Arial"
Text="Land"ReadOnly="True"></asp:TextBox>
</td></tr>
<tr><tdcolspan="2"><br/></td></tr>
<tr><tdalign="center"colspan="2"><asp:ButtonID="btnSearch"runat="server"
Text="Submit"ToolTip="click me"
style="margin-top: 0px;width:80px;height:25px;color:#575757;font-size:16px;fontweight:bold;font-family:Arial;font-size:16px;color:#575757;fontfamily:Arial"onclick="btnSearch_Click"ValidationGroup="sp"
/></td></tr>
</table>
</td><tdvalign="top"class="auto-style5">
160

<table>
<tr>
<td><imgsrc="images/Real-Estate (2).jpg"alt=""/></td>
</tr>
</table>
</td>
</tr>
<tr><tdcolspan="2"style="font-size:17px;font-weight:bold;color:#373737;fontfamily:Arial;padding-left:20px;paddingtop:15px;"align="center"><asp:LabelID="lblViewRlt"runat="server"Text="view Search
Result"></asp:Label></td></tr>
<tr><tdcolspan="2"style="background-image:url('images/h1.jpg')"></td></tr>
<tr><tdcolspan="2"><br/><br/></td></tr>
<tr><tdcolspan="2"><asp:PlaceHolderID="PlaceHolder1"runat="server"></asp:PlaceHolder></t
d></tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</asp:Content>
<asp:ContentID="Content3"ContentPlaceHolderID="abc"Runat="Server">
</asp:Content>

SearchProperty.apx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
publicpartialclassSearchProperty : System.Web.UI.Page
{
insert ins = newinsert();
int i = 1;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
DataSet ds = ins.data("Select * from StateTable");
foreach (DataRow dr in ds.Tables[0].Rows)
161

{
ListItem li = newListItem();
li.Text = dr["state_name"].ToString();
li.Value = dr["state_id"].ToString();
ddlState.Items.Add(li);
}
}
}
protectedvoid ddlState_SelectedIndexChanged(object sender, EventArgs e)
{
DataSet ds = ins.data("Select * from cityTable where state_id='" + ddlState.SelectedItem.Value +
"'");
ddlCity.Items.Clear();
ddlCity.Items.Add("-Select-");
foreach (DataRow dr in ds.Tables[0].Rows)
{
ListItem li = newListItem();
li.Text = dr["city_name"].ToString();
li.Value = dr["city_id"].ToString();
ddlCity.Items.Add(li);
}
}
protectedvoid btnSearch_Click(object sender, EventArgs e)
{
string query = "select * from Property where State like '%" + ddlState.SelectedItem + "%' and
City like'%" + ddlCity.SelectedItem + "%' and RadiusRange like'%" + ddlRadius.SelectedItem +
"%' and PriceRange like'%" + ddlPrice.SelectedItem + "%' and PropertyType like'%" +
txtType.Text + "%' ";
DataSet ds = ins.data(query);
foreach (DataRow dr in ds.Tables[0].Rows)
{
PlaceHolder1.Controls.Add(newLiteralControl("<table>"));
PlaceHolder1.Controls.Add(newLiteralControl("<tr><td><table><tr><td>Property(" + i +
") : </td></tr>"));
PlaceHolder1.Controls.Add(newLiteralControl("<tr><td><tr><td>City:" +
dr["City"].ToString() + "</td></tr>"));
PlaceHolder1.Controls.Add(newLiteralControl("<tr><td>Radius:" +
dr["Radius"].ToString() + "</td></tr>"));
PlaceHolder1.Controls.Add(newLiteralControl("<tr><td>Price:" + dr["Price"].ToString()
+ "</td></tr>"));
PlaceHolder1.Controls.Add(newLiteralControl("<tr><td> Contact Person:" +
dr["ContactPerson"].ToString() + "</td></tr>"));

162

PlaceHolder1.Controls.Add(newLiteralControl("<tr><td> Contact Number:" +


dr["ContactNumber"].ToString() + "</td></tr></table></td>"));
PlaceHolder1.Controls.Add(newLiteralControl("<td valign=top><a href='PropertyImage/"
+ dr["FilePath"].ToString() + "'><img src='PropertyImage/" + dr["FilePath"].ToString() + "'
width=100px/></a>"));
PlaceHolder1.Controls.Add(newLiteralControl("</td></tr>"));
PlaceHolder1.Controls.Add(newLiteralControl("<br/>"));
PlaceHolder1.Controls.Add(newLiteralControl("<tr><td></td></tr><tr><td></td></tr>"));
//PlaceHolder1.Controls.Add(new LiteralControl("<tr><td>More Detail:</td><td><a href=''
style='color:blue' ></a></td></tr>"));
PlaceHolder1.Controls.Add(newLiteralControl("<tr><td colspan=2><hr width=100%
color=grey /></td></tr>"));
i++;
}
PlaceHolder1.Controls.Add(newLiteralControl("</table>"));
}
}
Web.config
<?xmlversion="1.0"?>
<!-Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\vx.x\Config
-->
<configuration>
<configSections>
<sectionGroupname="system.web.extensions"type="System.Web.Configuration.SystemWebExte
nsionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<sectionGroupname="scripting"type="System.Web.Configuration.ScriptingSectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<sectionname="scriptResourceHandler"type="System.Web.Configuration.ScriptingScriptResourc
eHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
163

PublicKeyToken=31BF3856AD364E35"requirePermission="false"allowDefinition="MachineTo
Application"/>
<sectionGroupname="webServices"type="System.Web.Configuration.ScriptingWebServicesSecti
onGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<sectionname="jsonSerialization"type="System.Web.Configuration.ScriptingJsonSerializationSe
ction, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"requirePermission="false"allowDefinition="Everywhere
" />
<sectionname="profileService"type="System.Web.Configuration.ScriptingProfileServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"requirePermission="false"allowDefinition="MachineTo
Application" />
<sectionname="authenticationService"type="System.Web.Configuration.ScriptingAuthentication
ServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"requirePermission="false"allowDefinition="MachineTo
Application" />
<sectionname="roleService"type="System.Web.Configuration.ScriptingRoleServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"requirePermission="false"allowDefinition="MachineTo
Application" />
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>

<connectionStrings>
<addname="maxrealestateConnectionString"connectionString=" User ID=sa;Initial
Catalog=MRE;Data Source=DEVICE; "
providerName="System.Data.SqlClient" />
<addname="ConnectionString"connectionString="Data Source=DEVICE; User
ID=sa;Paasword=12345;AttachDbFilename=|DataDirectory|\MRE.mdf;User Instance=True"
providerName="System.Data.SqlClient" />
<addname="MREConnectionString"connectionString="Data Source=DEVICE;Initial
Catalog=MRE;Persist Security Info=True;User ID=SA;Password=12345"
providerName="System.Data.SqlClient" />
<addname="MREConnectionString2"connectionString="Data Source=DEVICe;Initial
Catalog=MRE;Persist Security Info=True;User ID=sa;Password=12345"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<!-Set compilation debug="true" to insert debugging
164

symbols into the compiled page. Because this


affects performance, set this value to true only
during development.
-->
<sessionStatemode="InProc"timeout="1"cookieless="false">
</sessionState>
<anonymousIdentificationcookieless="AutoDetect"enabled="false" />
<compilationdebug="true">
<assemblies>
<addassembly="System.Core, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=B77A5C561934E089"/>
<addassembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<addassembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=B77A5C561934E089"/>
<addassembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
<!-The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authenticationmode="None" />
<!-The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<pages>
<controls>
<addtagPrefix="asp"namespace="System.Web.UI"assembly="System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<addtagPrefix="asp"namespace="System.Web.UI.WebControls"assembly="System.Web.Extensi
ons, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls>
</pages>
165

<httpHandlers>
<removeverb="*"path="*.asmx"/>
<addverb="*"path="*.asmx"validate="false"type="System.Web.Script.Services.ScriptHandlerFac
tory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<addverb="*"path="*_AppService.axd"validate="false"type="System.Web.Script.Services.Script
HandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<addverb="GET,HEAD"path="ScriptResource.axd"type="System.Web.Handlers.ScriptResource
Handler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"validate="false"/>
</httpHandlers>
<httpModules>
<addname="ScriptModule"type="System.Web.Handlers.ScriptModule, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules>
</system.web>
<system.codedom>
<compilers>
<compilerlanguage="c#;cs;csharp"extension=".cs"warningLevel="4"
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089">
<providerOptionname="CompilerVersion"value="v3.5"/>
<providerOptionname="WarnAsError"value="false"/>
</compiler>
<compilerlanguage="vb;vbs;visualbasic;vbscript"extension=".vb"warningLevel="4"
type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089">
<providerOptionname="CompilerVersion"value="v3.5"/>
<providerOptionname="OptionInfer"value="true"/>
<providerOptionname="WarnAsError"value="false"/>
</compiler>
</compilers>
</system.codedom>
<!-The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
<system.webServer>
<validationvalidateIntegratedModeConfiguration="false"/>
<modules>
<removename="ScriptModule" />
<addname="ScriptModule"preCondition="managedHandler"type="System.Web.Handlers.Script
Module, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
166

</modules>
<handlers>
<removename="WebServiceHandlerFactory-Integrated"/>
<removename="ScriptHandlerFactory" />
<removename="ScriptHandlerFactoryAppServices" />
<removename="ScriptResource" />
<addname="ScriptHandlerFactory"verb="*"path="*.asmx"preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<addname="ScriptHandlerFactoryAppServices"verb="*"path="*_AppService.axd"preCondition=
"integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<addname="ScriptResource"preCondition="integratedMode"verb="GET,HEAD"path="ScriptRes
ource.axd"type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</handlers>
</system.webServer>
<runtime>
<assemblyBindingappliesTo="v2.0.50727"xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentityname="System.Web.Extensions"publicKeyToken="31bf3856ad364e35"/>
<bindingRedirectoldVersion="1.0.0.0-1.1.0.0"newVersion="3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentityname="System.Web.Extensions.Design"publicKeyToken="31bf3856ad364e35
"/>
<bindingRedirectoldVersion="1.0.0.0-1.1.0.0"newVersion="3.5.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

167

TESTING

168

Testing Methodology
This module is tested by the following testing methods
Unit Testing
Integration Testing

12.1. Unit Testing:


Unit testing is a procedure used to validate that individual units of source code are working
properly. A unit is the smallest testable part of an application. In procedural programming a unit
may be an individual program, function, procedure, etc., while in object-oriented programming,
the smallest unit is a method, which may belong to a base/super class, abstract class or
derived/child class.
Ideally, each test case is independent from the others; mock or fake objects as well as test
harnesses can be used to assist testing a module in isolation. Unit testing is typically done by
software developers to ensure that the code they have written meets software requirements and
behaves as the developer intended.
Unit testing provides a sort of living documentation of the system. Developers looking to learn
what functionality is provided by a unit and how to use it can look at the unit tests to gain a basic
understanding of the unit API.
Unit test cases embody characteristics that are critical to the success of the unit. These
characteristics can indicate appropriate/inappropriate use of a unit as well as negative behaviors
that are to be trapped by the unit. A unit test case, in and of itself, documents these critical
characteristics, although many software development environments do not rely solely upon code
to document the product in development.
On the other hand, ordinary narrative documentation is more susceptible to drifting from the
implementation of the program and will thus become outdated (e.g. design changes, feature creep,
relaxed practices to keep documents up to date).

12.2 Integration Testing:


It is sometimes called I&T i.e. Integration and testing, it is the phase of software testing in which
individual software modules are combined and tested as a group. It follows unit testing and
precedes system testing.
Integration testing takes as its input modules that have been unit tested, groups them in larger
aggregates, applies tests defined in an integration test plan to those aggregates, and delivers as its
output the integrated system ready for system testing.
The purpose of integration testing is to verify functional, performance and reliability requirements
placed on major design items. These "design items", i.e. assemblages (or groups of units), are
exercised through their interfaces using black box testing, success and error cases being simulated
169

via appropriate parameter and data inputs. Simulated usage of shared data areas and inter-process
communication is tested and individual subsystems are exercised through their input interface.
Test cases are constructed to test that all components within assemblages interact correctly, for
example across procedure calls or process activations, and this is done after testing individual
modules, i.e. unit testing

170

IMPLEMENTATION

171

11.Implementation Technologies:
The objective of this project is to develop an online property dealing website. When the user types
in the URL of the website in the address field of the browser, a Web Server is contacted to get the
requested information. In the .NET Framework, IIS (Internet Information Service) acts as the Web
Server. The sole task of a Web Server is to accept incoming HTTP requests and to return the
requested resource in an HTTP response. The first thing IIS does when a request comes in is to
decide how to handle the request. Its decision is based upon the requested file's extension. For
example, if the requested file has the .asp extension, IIS will route the request to be handled by
asp.dll. If it has the extens ion of .aspx, .ascx, etc, it will route the request to be handled by
ASP.NET Engine.

Relation between IIS and ASP.NET

The ASP.NET Engine then gets the requested file, and if necessary contacts the database through
ADO.NET for the required file and then the information is sent back to the Clients browser.
Above figure shows how a client browser interacts with the Web server and how the Web server
handles the request from client.

Implementation requirement:
1. A registered domain name is required for our website.
2. Web space on webserver to host the website. So we need a webhosting service also.
3. The hosting server must have .NET framework and MS SQL SERVER 2005 installed.

Uploading of website:
The website must be uploaded to a web server connected to the Internet in order to be
accessed on the Web. Weuse any FTP client program to connect to your host in order to
upload (transfer) your web site (files and other documents) to the server. And we restore the
backup of our database on the remote server.
172

APPLICATIONS OF THE PROJECT


The following project on MAX REAL ESTATE System has some applications such as :
This project fully performs all the operations needed to run a real estate system .
It is similar to the well known organizations like makaan.com , 99acre.com etc .
It does not include extra input of money and provide a fullfurnished website that give
information about the real estate.
Security is applied to the system so that all the information about the user can kept secret.
Agent Owner and Seeker all three of them have their own space to update the property as
well as delete the property.

SOFTWARE MAINTENENCE
Software maintenance is the modification of a software product after delivery to correct faults,
to improve performance or other attributes, or to adapt the product to a modified environment .It
is the last phase in the software engineering process that eliminates errors in the working system
during its work span and to tune the system to any variations in its working environments .The
system requires maintenance as there may be changes and requirements in the organizational
needs , government policies , hardware , software etc. often small system deficiencies are found
as system is brought into operation and changes are made to remove them. System requirements
may be revised as a result of system usage or changing operational needs.
Maintenance of the system after it is installed is concerned with an additional factor in hardware.
Once the system is delivered and installed there is a brief warranty period during which time the
vendor is responsible for maintenance .This is typically a 90 day period after that time the
purchaser has the option of acquiring maintenance from various sources.
173

ISO/IEC 14764:2006 describes the six software maintenance processes as:


1. The implementation processes contains software preparation and transition activities, such
as the conception and creation of the maintenance plan, the preparation for handling
problems identified during development, and the follow-up on product configuration
management.
2. The problem and modification analysis process, which is executed once the application
has become the responsibility of the maintenance group. The maintenance programmer
must analyze each request, confirm it (by reproducing the situation) and check its validity,
investigate it and propose a solution, document the request and the solution proposal, and,
finally, obtain all the required authorizations to apply the modifications.
3. The process considering the implementation of the modification itself.
4. The process acceptance of the modification, by confirming the modified work with the
individual who submitted the request in order to make sure the modification provided a
solution.
5. The migration process (platform migration, for example) is exceptional, and is not part of
daily maintenance tasks. If the software must be ported to another platform without any
change in functionality, this process will be used and a maintenance project team is likely
to be assigned to this task.
6. Finally, the last maintenance process, also an event which does not occur on a daily basis,
is the retirement of a piece of software.
There are a number of processes, activities and practices that are unique to maintainers, for
example:

Transition: a controlled and coordinated sequence of activities during which a system is


transferred progressively from the developer to the maintainer;

174

Service Level Agreements (SLAs) and specialized (domain-specific) maintenance


contracts negotiated by maintainers;

Modification Request and Problem Report Help Desk: a problem-handling process used
by maintainers to prioritize, documents and route the requests they receive;

Modification Request acceptance/rejection: modification request work over a certain


size/effort/complexity may be rejected by maintainers and rerouted to a developer.

175

FUTURE ENHANCEMENT

Following enhancements can be made in the MRE software to enhance its efficiency
and combatibility for future advancements and purposes.

Synchronization with other instance: Using this feature two instances of the MRE
software can be run at two different locations (two different computers/servers) and
the data can be synchronized at periodic intervals.

Hosted solution:In this option you tell us about all the details about your property,
locations etc and we implement it in our software and host it on our managed server
for you and your members (customers) to use.

Install on your own server:This option lets you install the software on your own
computer (server). We customize the software as per your pay plan and provide you
the object code along with installation/deployment instructions. You can run and
manage the software as you wish.

SMS INTEGRATOR:It

Facility of Exporting the reports into Microsoft Excel, Word, PDF.

Live Technical support through dedicated Support Center

Integrated Franchisee management.

Integrated real time Mobile SMS system.

is a full fledge Computer Based SMS management system which


works with internet or without internet.SMS integration provides a cost effective and
cheap SMS delivery capability with fast , simple ,effective & efficient real-time
communication.

176

CONCLUSION

Using powerful development tools like ASP.Net and SQL Server the project titled Design and
Implementation of Multilevel Marketing System has been developed successfully. Every
Possible validation is applied to the various controls used in the forms. The system developed
provides a high degree of accuracy and user friendliness. The back-end SQL Server provides
much flexibility for dealing with data. The project provides extensive security and performance
features therefore providing higher margins of profits to the owners.
ASP DOT NET using C# helped a lot in bring the desired functionality by providing easy to use
tools along with highly interactive Integrated Development Environment. .
It is a web based program, we had given the flexibility to use SQL Server at backend. But due to
much flexibility our project guide sugested use to use SQL Server as backend. But at some places
we faced some unusual problems like Visual Studio doesnt support joining of tables when
177

creating dataset. In any system or website greater significance should be given in adding security
and performance features as they contain secret information related to its customers.
Overall, it has been a nice experience to work on ASP.net and SQL server in the same project and
to work on a completely new control provided by Visual Studio 2008.

REFERENCES

[1] ASP.NET and Web Development Overview,


http://msdn.microsoft.com/en-us/library/4w3ex9c2.aspx
[2] Microsoft Visual Studio Overview,
http://en.wikipedia.org/wiki/Microsoft_Visual_Studio#Visual_Studio_2005
[3] Microsoft SQL Server 2005,
http://en.wikipedia.org/wiki/Microsoft_SQL_Server
[4] 3-Tier System Architecture,
http://en.wikipedia.org/wiki/Multitier_architecture
[5] Introduction to ADO.NET,
http://en.wikipedia.org/wiki/ADO.NET
[6] Load Testing using Apache JMeter Testing Tool,
http://jakarta.apache.org/jmeter/

178

[7] Introduction to .NET Architecture,


http://www.devtopics.com/what-is-net/
[8] Common Language Infrastructure Definition,
http://en.wikipedia.org/wiki/Common_Language_Infrastructure
[9] AJAX Bridging the Thin-Client Performance Gap,
http://www.ironspeed.com/articles/ajax-bridging%20the%20thinclient% 20performance
%20gap/article.aspx
[10] 3-Tier Architecture
http://www.c-sharpcorner.com/

179

You might also like