Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 188

PROJECT SUBMITTED TO THE

UNIVERSITY MUMBAI
IN PARTIAL OF FULLFILLMENT TO THE DEGREE
OF
BACHELOR OF SCIENCE

SMT.CHANDIBAI HIMATHMAL
MANSUKHANI COLLEGE
ULHASNAGAR-421003

T.Y.Bsc(COMPUTER SCIENCE)
ACADEMIC YEAR 2017-2018

OOAD PROJECT ON
ONLINE REALESTATE

BY
VIOLET BENEDICT SWAMY

PROJECT INCHARGE

MRS.SREENA NAIR

1
ONLINE

REALESTAT
E

2
Page
Sr. No Topic No.
A. System Documentation
1. College Certificate --
2. Acknowledgement 5
3. Organizational Overview 6
4. Description of Present System 7
5. Limitations of Present System 8
6. Proposed System and Its Advantages 9
7. Gantt Chart 10
8. Event List 11
9. Event Table 15
10. Entity Relationship Diagram(ER Diagram) 19
11. Use Case Diagram 24
12. Use Case Description 27
13. Activity Data Matrix (CRUD Table) 29
14. Activity Diagram 30
15. Class Diagram 32
16. Object Diagram 33
17. Sequence/Collaboration Diagram 34
18. State Diagram 36
19. Component Diagram 37
20. Structured Diagram 38
21. Deployment Diagram 41
22. Package Diagram 43
23. Menu Tree 45
24. System Coding and Conventions 47
25. System Control and Standards 47
26. Form Listing 48
27. Report Listing 49
28. Database and List of tables with Description 46

B. Project Documentation
1. Program Source Code 53
2. Data Entry Screens 100

C. Validations
1. Test Case 118
2. Test Data 118
3. Test Results 118

3
D. Report Layouts 123
E. References And Bibliography 125

4
SYSTEM
DOCUMENTATION

5
6
ACKNOWLEDGEMENT

It gives me great pleasure in presenting this project report. Its justification


will never sound good if I do not express my vote of thanks to our C.H.M. College
and respective Principal. I would also like to thank our coordinator Mrs.Ritika
Sachdev for her timely support in this completion of this project.

I thank our internal project guide Mrs. Serena, who has done a lot to keep
this project systematically and on schedule. I am thankful for their valuable
guidance to every stage of the project. Finally, I would thank to all others, who
give there extended support to complete this project.

7
 GANTT CHART

No. Phase Duratio Start Finish Actual Finish Sign


n (days) Date Date Date
1.0 Planning Phase 14 15-Dec-17 28-Dec-17
1.1 Defining phase 6 15-Dec-17 20-Dec-17
1.2 Confirm project 21-Dec-17
3 23-Dec-17
Feasibility
1.3 Project Schedule 2 24-Dec-17 25-Dec-17
1.4 Staffing Schedule 2 26-Dec-17 27-Dec-17
1.5 Launching project 1 28-Dec-17 28-Dec-17

2.0 Analysis phase 16 29-Dec-17 13-Jan-18


2.1 Gathering the 29-Dec-17
6 03-Jan-18
information
2.2 Defining System 04-Jan-18
6 09-Jan-18
requirements
2.3 Prioritize 10-Jan-18
2 11-Jan-18
requirement
2.4 Generate And 12-Jan-18 12-Jan-18
1
Evaluate
2.5 Review 13-Jan-18
1 13-Jan-18
Recommendation

3.0 Design Phase 27 14-Jan-18 09-feb-18


3.1 Design User
15 14-Jan-18 28-Jan-18
interface
3.2 Design
Application 6 29-Jan-18 03-Feb-18
Architecture
3.3 Design And
4 04-Feb-18 07-Feb-18
interact Database
3.4 Design And
2 08-Feb-18 09-Feb-18
Integrate controls

Implementation
4 28 10-Feb-18 04-Mar-18
Phase
4.1 Construct the 20
Software 10-Feb-18 01-Mar-18
Component
4.2 Verify & test The 5 02-Mar-18 06-Mar-18
component
4.3 Training And 2
07-Mar-18 08-Mar-18
Document

8
4.4 Install Software 1 09-Mar-18 09-Mar-18

5.0 Support Phase - 10-Mar-18 Till date

9
Organizational Overview

The Project entitled FINDHOMES is aimed at developing a system to manage the Property and
User information in a Database. It is an online system that can be accessed through the
company’s internal networks by authorized users. This will be done through a standard login
process. This will provide a fast and centralized data management system that will be beneficial
for the company.

10
Description of Present System

This Software will be helpful in the smooth functioning of the organization due to integration of
various functions. The software maintains central database with following information stored in
different tables: Properties and User’s details in the database table, Search Property for particular
Category, Registration ofCustomer, ExistingCustomer Details, Property Enquiry, and Details.

11
Limitations of Present System

Managing and keeping records ofall Users, Wish list are notincluded and they keep somerecord
manually. Business is not on the web which was biggest Disadvantage. User can get Information
about Properties by visiting to the office or to the nearest branch which was a very tedious job.
Not good communication between the different branches so there is lacking of coordination
between them. Customer record is notmaintained properly.

12
Proposed System and Its Advantages
The existing system will be replaced by the use of modern and sophisticated computer
technology. The proposed system is designed taking into consideration all the limitations of
existing manual system and as per the user requirements. The system incorporates all the
requirements suggested by the user. It is designed in such a way that it can hold all the
information that is necessary for data storage, data processing, and to generate various reports as
per the users requirements. It is designed in such a way to minimize all the limitation and
drawbacks of the existing system. The system is developed by using ASP.Net as front -end and
MS-SQL Server 2005 as the back-end. Some of the important Advantages to be considered are-
Time saving, Easy access to information whenever user requires it, Less paper work, Reduction
in maintenance cost, Report generation, Security as per the authentication policies is provided.
The interface is user friendly.

13
Event List

• An occurrence at specific time of place that can be described and is worth remembering is
known as event. • It is used in system analysis and designing.
!
Types Of Event

There are three types of events to consider when using decomposition technique to identify
someevent

.• External: " Outsidethe system. " Initiated byexternal agent orActor.

• Temporal: " Occurs as aresult ofreaching point in name. " Based onsystemdeadlines.

• State: " Somethinginside the systemtriggers the processing end.

14
Event List

1. Admin Logs into System.

2. Admin Adds/Updates/Delete details ofProperties.

3. User Register into system.

4. User Logs into the system.

5. User Search for Properties.

6. User Checks Property Details.

7. User Adds/Updates/Delete Details of Properties

15
Event Table

A table that lists events in tabular format that is in rows and key pieces of information
about each event in columns.

 Designing Of Event Table:-


1) While developing the list of events the analyst should note additional information
about each event for later use.
2) This information is entered in an event table.
3) An event table compares of rows and columns.
4) Each row in the event table records information about one event.
5) And row in the event table records information about one event.

 Event table should consist of the following:-


Event: Occurrence happening at a determinable time & place with/without human agents.

Trigger: An occurrence that tells the system about the event.


 Source: An external agent or actor that supplies information.
Activity: Behavior that the system provides.
Response:An output produced by the system that gives information.
Destination: An external agent or actor that receives data from the system.

16
Sr. Event Trigger Sour Activity Response Destination
No. ce
1 Admin creating Admin logins Admin Admin Logged New Entry System
login In

2 Admin modifies Delete,Update, Admin Sends offers to Offer Service System


Details Add registered
users.
3 Admin add Delete, add & Admin Changes in New customer System
/update customer modify the customer add delete
customer details update by admin
details
4 Customer/Login/ New customer Custo New Customer New Entry System
Register Entry mer logged in.

5 Customer Book Booking Custo Customer Booking Service System


Properties. Properties mer Booking
Property
6 Customer Booking Custo Customer Cancel Booking System
Cancelling Cancelled By mer Cancels the
Booking ustomer Booking

7 Customer Customer can custo Customer Customer System


Browse browse mer views the Browsing
through properties
available
properties
8 Customer Customer Can Custo Customer Feedback System
Feedback Give Feedback mer Gives Feedback
On his
Experience
9 Customer FAQ Customer Can Custo Clearing FAQ System
Ask Questions mer Doubts

10 Customer Deletes Customer can Custo Delete Their Order Delete System
Account Delete mer Own Account
Account

17
Entity Relationship Diagram:

 ER Diagrams are simple and clear.


 Entity relationship diagram can express overall logical structure of
database logically
 ER Diagrams represents entities and tables and their relationship with one
another.

18
19
3.property

20
21
Use Case Diagram
A use case diagram is a set of scenarios that describing an interaction between user and system.
A use case diagram displays the relationship among actors & use cases.

The 2 main components of use case diagram are use case and actor.
Diagrams:-

Actor Use case

Actor:-
An actor represents a user or another system will interact with the system that you are modeling.

Use Case:-
A use case is an external view of the system that represents some action that might perform in
order to complete a task.

System Boundary:-
A System boundary defines a scope of what system will be. A system cannot have
infinite functionality a system boundary defines the limitation of system.

22
Activity Data Matrix (CRUD Table)

 CRUD Table (Activity Data Matrix)


A table that describes data entities the location from which they are accessed and
the nature of access is called as CRUD.
C: Create new Data.
R:Read existing Data.
U:Update existing Data.
D:Delete Existing File
Sr No Activity Entities
1 2 3 4 5 6 7
1 Entering the C
Organisation
(Admin)
2 Entering the C
Organisation

3 C C C C C
4 Cancel U U U U U
5 Changing Time U U U U U
6 Producing Day R
Report
7 Producing R
Month Report
8 Produce Daywise R
Report
9 Produce Name Wise R
Report
10 Produce OutStanding R
Report
11 Leaving The UD
Organisation
12 Leaving The UD
Organisation

23
24
Activity Diagram
a) Activity diagram describes the workflow behavior of the system.
b) Activity diagram are similar to state diagram because activities are the state of doing
something.
c) The diagram describes the state of activities by showing the sequence of activities
performed.
d) Activity diagram can resolve activities that are conditional or parallel.
e) Activity diagram should be used in conjunction with other modeling techniques such as
interaction diagram & state diagram.
f) Main reason to use the activity diagram is to model workflow behind the system being
designed.

Components of Activity Diagram:-

Represents the activity.


1

Merge
2

3 Fork and Join


4  Initial Activity

25
DIAGRAM

26
Class Diagram
Class diagrams are widely used to describe the types of objects used in system and their
relationship. Class diagrams models class structure and contents using design elements such as
classes & packages and objects.

Class diagram describes 3 different perspectives when designing a system. These perspectives
become evident as the diagram is created & help solidify the design.
Classes are composed of 3 things:
Class name
Attributes and
Operations.

27
Object Diagram
Object diagram are same as that of class diagram. Instead they contain the values in place of
data types.

The object diagram describes 3 different perspectives when designing a system. This perspective
becomes evident as the system is created & helps solidify the design.

They are composed of 2 things:


Class name
Attributes and

28
Sequence Diagram

Sequence diagram demonstrates the behavior of the objects in a use- case by


describing the objects and the messages they pass. The diagrams are read left to right &
descending.

Components of Sequence Diagram:-

Represents objects
activation.

Represents the objects of


2 case study.

--------- Represents life of objects.


3

Represents end of objects.


4

29
++

30
31
State Diagram
a) State diagram are used to describe the behavior of the system.

b) State diagram describe all of the possible state of an object as an event occurs.

c) Each diagram usually represents objects of single class and track the different
state of its object through the system.

d) We use the state diagram to demonstrate the behavior of an object through many
use cases of the system.

We use the state diagram for classes where it is necessary to understand the behavior of the
object through the entire system.

32
33
Component Diagram
a) The component diagram contains component & dependencies.

b) Component represents the physical packaging of the module of the code.

c) The dependencies between the components show how changes made to one component
may affect each other components in the system.

d) Dependencies in a component system are represented by dashed lines between 2 or more


components.

e) Component diagram can also show the interface used by the component to communicate
with each other.

34
Deployment Diagram

a) The deployment diagram contains nodes & connections.

b) A node usually represents a piece of hardware in the system.

c) A connection depicts the communication path used by the hardware to


communicate & usually indicates a method such as TCP/IP.

35
Package Diagram

In addition to standard UML dependency relationship there are two special types dependcies
defined between packages:
 Package Import
 Package Merge
A package imports a relationship between an import namespace and a package indicating
that importing namespace adds the names of members an unlabeled dependency between
two packages an interpreted as a package import relationship. In this relationship
elements within the target package will be imported in source package.

A package merge is a directed relationship between two packages that indicates that the
contents of two packages that are to be combined. It is very similar to generalization.

 Elements of package Diagram:-

1) Package: It is a general purpose mechanism for organizing model contains elements


is designed diagrams into groups. It provides an encapsulated namespace within
which all names must be unique.

2) Class: It is representation of objects that reflects their structure and behavior of


system.

3) Interface:It is specification of behavior. By implementing interface classes are


required to support the behavior

4) Object: It is instance of class. It often used in analysis to represent numerous artifacts


and item that exist.

5) Table: It is stereotyped class.

36
37
38
MENU TREE

39
USER:

Aboutus.aspx

<%@ Page Language="VB" MasterPageFile="~/Master_Main.master" AutoEventWireup="false"


CodeFile="AboutUs.aspx.vb" Inherits="_Default" title="About Us" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<div class="wrap">
<div class="mid-grid">
<h2>About us</h2>
<h1>We are real estate consultants, with a difference!!</h1>
<p>
We at FindHomes focus on providing professional and transparent real-estate solutions in
Maharashtra. We are your one stop solution for all your real estate requirements. We understand your
unique requirements and help make informed decisions on buying, selling and renting of property in and
around Maharashtra. We ensure you complete peace of mind in the entire process as we perform all the
necessary ground work for a smooth transaction, from inspection of the property, negotiation of the
deal, complete documentation and even facilitate in acquiring financial assistance through banks and
finance companies. FindHomes is here to help you realize your real-estate dreams in complete peace of
mind.
</p><br />
<h2>Upcoming sites/projects</h2><br />
<marquee>
<asp:Image ID="Image1" runat="server" ImageUrl="images/m1.jpg" style="border-radius:
10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image2" runat="server"
ImageUrl="images/m2.jpg" style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image3" runat="server"
ImageUrl="images/m3.jpg" style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image4" runat="server"
ImageUrl="images/m4.jpg" style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image5" runat="server"
ImageUrl="images/m5.jpg" style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
</marquee>
</div>
</div>
</asp:Content>

40
Aboutus.aspx

Partial Class _Default


Inherits System.Web.UI.Page

End Class

41
COMPLAINTUSER.ASPX

<%@ Page Language="VB" MasterPageFile="~/Master_User.master"


AutoEventWireup="false" CodeFile="ComplaintUser.aspx.vb" Inherits="_Default"
title="Complaint | FindHomes.com" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<div class="wrap">
<div>
<div class="mid-grid">
<center>
<h2>Please tell us about your problem</h2>
<table>
<tr>
<td style="padding: 5px 5px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:DropDownList ID="ddlregarding" runat="server" Width="400px"
Height="32px" class="textbox">
<asp:ListItem Value="">Regarding</asp:ListItem>
<asp:ListItem Value="Propery Availabilities">Propery
Availabilities</asp:ListItem>
<asp:ListItem Value="Fake properties">Fake properties</asp:ListItem>
<asp:ListItem Value="Website issue">Website issue</asp:ListItem>
<asp:ListItem Value="Suggestions">Suggestions</asp:ListItem>
<asp:ListItem Value="Partnership">Partnership</asp:ListItem>
<asp:ListItem Value="Login issue">Login issue</asp:ListItem>
<asp:ListItem Value="SignUp issue">SignUp issue</asp:ListItem>
<asp:ListItem Value="Other">Other</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td style="padding: 5px 5px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:TextBox ID="txtmore" placeholder="TELL US MORE"
TextMode="MultiLine" runat="server" class="textbox" MaxLength="200" Width="395px"
Height="85px"></asp:TextBox></td>
</tr>
<tr>
<td style="padding: 5px 5px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:TextBox ID="txtemailid" ReadOnly="true" runat="server" MaxLength="50"
class="textbox" Width="400px" Height="32px"></asp:TextBox></td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Button ID="btnsubmit" runat="server" Text="Submit Your Query"
class="css_button" Width="400px" Height="37px"></asp:Button>
</td>
</tr>

42
<tr>
<td>
<asp:RequiredFieldValidator ID="rfv1" runat="server" ErrorMessage="Enter
brief description." ControlToValidate="txtmore"
Display="None"></asp:RequiredFieldValidator>
<asp:ValidationSummary ID="vs1" ShowMessageBox="true"
ShowSummary="false" runat="server" HeaderText="Below is the error on this
page:"></asp:ValidationSummary>
</td>
</tr>
</table>
<h2>Upcoming sites/projects</h2>
<marquee>
<asp:Image ID="Image1" runat="server" ImageUrl="images/m1.jpg" style="border-
radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image2" runat="server" ImageUrl="images/m2.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image3" runat="server" ImageUrl="images/m3.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image4" runat="server" ImageUrl="images/m4.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image5" runat="server" ImageUrl="images/m5.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
</marquee>
</center>
</div>
</div>
</div>
</asp:Content>

43
COMPLAINTUSER.ASPX.VB

Imports System.Data.SqlClient
Imports System.Data.Sql
Imports System.Data
Imports ASP.global_asax
Imports System.Net
Imports System.Net.Mail

Partial Class _Default


Inherits System.Web.UI.Page
Dim cmd As SqlCommand
Dim sqlq As String
Dim da As SqlDataAdapter
Dim ds As DataSet
Dim count, value As Integer

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load


Try
'connection call
connection_create()

'fill email text box


Try
txtemailid.Text = Session("LoginId").ToString
Catch ex As Exception
MsgBox("Session Expired. Please Login again.", MsgBoxStyle.Information, "")
Response.Redirect("Logout.aspx")
End Try
Catch ex As Exception
End Try
End Sub

Private Function EmailSending(ByVal tos As String, ByVal subject As String, ByVal message As String)
Try
Dim Smtp_Server As New SmtpClient
Dim e_mail As New MailMessage()
Smtp_Server.UseDefaultCredentials = False
Smtp_Server.Credentials = New Net.NetworkCredential("noreplyfindhomes1@gmail.com",
"propertyiq12345")
Smtp_Server.Port = 587
Smtp_Server.EnableSsl = True
Smtp_Server.Host = "smtp.gmail.com"

e_mail = New MailMessage()


e_mail.From = New MailAddress("noreplyfindhomes1@gmail.com")
e_mail.To.Add(tos)
e_mail.Subject = subject

44
e_mail.IsBodyHtml = True
e_mail.Body = message
Smtp_Server.Send(e_mail)

Return 0
Catch ex As Exception
MsgBox("Email Not Sent !!! " + vbCrLf + "Please Check Your Network Connection",
MsgBoxStyle.Information, "Internet Error")
Return 1
End Try
End Function

Protected Sub getdata()


da = New SqlDataAdapter("select * from Complaints", con)
ds = New DataSet
da.Fill(ds)
End Sub

Private Sub autogenerate()


Call getdata()
count = ds.Tables(0).Rows.Count

Dim arr As New ArrayList


arr.Clear()
If count = 0 Then
value = 1
Else
For a = 0 To count - 1
arr.Add(ds.Tables(0).Rows(a).Item(0))
arr.Sort()
Next

For Each sss In arr


value = sss
Next

value = value + 1
End If
End Sub

Protected Sub btnsubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles


btnsubmit.Click
If Page.IsValid = True Then
If ddlregarding.SelectedItem.Value <> "" Then
'code for autogenerate
Call autogenerate()

'code for insert record

45
Dim sqlq As String = ""
sqlq = "insert into Complaints values(" & value & ",'" & "Tkt#" & value & "','" &
ddlregarding.SelectedItem.Value & "','" & txtmore.Text & "','" & txtemailid.Text & "')"
cmd = New SqlCommand
cmd.Connection = con
cmd.CommandText = sqlq
cmd.ExecuteNonQuery()

'code for mailing


Dim more As String
more = ""
more = "Hello admin,<br />User has submitted the below request.<br /><br />"
more = more & "Regarding: " & ddlregarding.Text
more = more & "<br />More Details: " & txtmore.Text
more = more & "<br />User Email Address: " & txtemailid.Text

Call EmailSending("noreplyfindhomes1@gmail.com", "Tkt#" & value & " Complaint/Suggestion


submitted", more)

'code to fetch the customer name from customer's table.


Dim custname As String = ""
da = New SqlDataAdapter("select name from Customer where emailid='" & txtemailid.Text & "'
", con)
ds = New DataSet
da.Fill(ds)
If ds.Tables(0).Rows.Count > 0 Then
custname = ds.Tables(0).Rows(0).Item(0)
Else
custname = "User"
End If

'code for auto replying


more = ""
more = "Hello " & custname & ",<br />Your query has been submitted to us.<br /><br />Our
representative will assist you soon.<br /><br />"
more = more & "<br /><br />Your query:<br />"
more = more & "Regarding: " & ddlregarding.Text
more = more & "<br />More Details: " & txtmore.Text
more = more & "<br /><br /><br />Thank you,<br />Team FindHomes.com"

Call EmailSending(txtemailid.Text, "Tkt#" & value & " Complaint/Suggestion submitted", more)
MsgBox("Your query has been submitted." & vbCrLf & "Our representative will assist you
soon.", MsgBoxStyle.SystemModal, "Query submitted")

'blank all fields


ddlregarding.SelectedIndex = 0
txtmore.Text = ""

46
Else
MsgBox("Please choose the issue regarding.", MsgBoxStyle.Exclamation, "Page Error")
End If
End If
End Sub
End Class

47
CONTACTS.ASPX

<%@ Page Language="VB" MasterPageFile="~/Master_Main.master"


AutoEventWireup="false" CodeFile="Contact.aspx.vb" Inherits="_Default" title="Contact Us "
%>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<div class="wrap">
<div class="mid-grid">
<h2>Feel free to contact, in case of any queries</h2><br />
<center>
<table>
<tr align="left">
<td style="padding: 5px 5px; width: 180px;">Name*</td>
<td style="padding: 5px 5px"><asp:TextBox ID="txtname" class="txtbox"
runat="server" MaxLength="40" Width="250px"></asp:TextBox></td>
</tr>
<tr align="left">
<td style="padding: 5px 5px; width: 180px;">Type*</td>
<td style="padding: 5px 5px">
<asp:DropDownList ID="ddltype" runat="server" Width="256px"
class="txtbox"
Height="28px">
<asp:ListItem>Buy</asp:ListItem>
<asp:ListItem>Sell</asp:ListItem>
<asp:ListItem>Rent</asp:ListItem>
<asp:ListItem>Other</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr align="left">
<td style="padding: 5px 5px; width: 180px;">Email*</td>
<td style="padding: 5px 5px"><asp:TextBox ID="txtemailid" class="txtbox"
runat="server" MaxLength="40" Width="250px"></asp:TextBox></td>
</tr>
<tr align="left">
<td style="padding: 5px 5px; width: 180px;">Mobile*</td>
<td style="padding: 5px 5px"><asp:TextBox ID="txtcontact" class="txtbox"
runat="server" MaxLength="10" Width="250px"></asp:TextBox></td>
</tr>
<tr align="left">
<td style="padding: 5px 5px; width: 180px;">Subject*</td>
<td style="padding: 5px 5px"><asp:TextBox ID="txtsub" class="txtbox"
runat="server" MaxLength="50" Width="250px"></asp:TextBox></td>
</tr>
<tr align="left">
<td style="padding: 5px 5px; width: 180px;">Query*</td>
48
<td style="padding: 5px 5px"><asp:TextBox ID="txtquery" class="txtbox"
runat="server" MaxLength="200" TextMode="MultiLine" Width="246px"
Height="82px"></asp:TextBox></td>
</tr>
<tr align="left">
<td></td>
<td style="padding: 5px 5px">
<asp:Button ID="btnsubmit" runat="server" Text="Submit" Width="257px"
class="css_button1" Height="37px"></asp:Button>
</td>
</tr>
</table>

<asp:RequiredFieldValidator ID="rfv1" runat="server" ErrorMessage="Enter your


name." ControlToValidate="txtname" Display="None"></asp:RequiredFieldValidator>

<asp:RequiredFieldValidator ID="rfv2" runat="server" ErrorMessage="Enter your


email address." ControlToValidate="txtemailid"
Display="None"></asp:RequiredFieldValidator>

<asp:RegularExpressionValidator ID="rev1" runat="server" ErrorMessage="Invalid


email address." ControlToValidate="txtemailid" Display="None" ValidationExpression="\w+([-
+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>

<asp:RequiredFieldValidator ID="rfv" runat="server" ErrorMessage="Enter Mobile


Number." ControlToValidate="txtcontact" Display="None"></asp:RequiredFieldValidator>

<asp:CustomValidator ID="cv1" runat="server" ErrorMessage="Enter proper 10 digit


mobile number." ControlToValidate="txtcontact" CssClass="cv1_ServerValidate"
Display="None"></asp:CustomValidator>

<asp:RequiredFieldValidator ID="rfv3" runat="server" ErrorMessage="Enter your


query." ControlToValidate="txtquery" Display="None"></asp:RequiredFieldValidator>

<asp:RequiredFieldValidator ID="rfv4" runat="server" ControlToValidate="txtsub"


Display="None" ErrorMessage="Enter subject line."></asp:RequiredFieldValidator>

<asp:ValidationSummary ID="ValidationSummary1" runat="server"


HeaderText="Please resolve the below errors to submit your query"
ShowMessageBox="True" ShowSummary="False"></asp:ValidationSummary>
</center>
* means that field must be filled
</div>
</div>
</asp:Content>

49
CONTACTS.ASPX.VB

Imports System.Net
Imports System.Net.Mail
Imports System.Data.SqlClient
Imports System.Data.Sql
Imports System.Data
Imports ASP.global_asax

Partial Class _Default


Inherits System.Web.UI.Page

Dim da As SqlDataAdapter
Dim ds As DataSet
Protected Sub cv1_ServerValidate(ByVal source As Object, ByVal args As
System.Web.UI.WebControls.ServerValidateEventArgs) Handles cv1.ServerValidate
If IsNumeric(txtcontact.Text) = False Then
args.IsValid = False
Exit Sub
Else
If Trim(Len(txtcontact.Text)) < 10 Then
args.IsValid = False
Exit Sub
Else
args.IsValid = True
End If
End If
End Sub

Protected Sub btnsubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles


btnsubmit.Click
If Page.IsValid = True Then
Dim txt As String = ""

txt = "Hello Admin,<br/>Below are the details of the person tried to contact us.
<br/><br/>Person's Name: " & txtname.Text & ".<br/>"
txt = txt & "Email Address: " & txtemailid.Text & ".<br/>"

If txtcontact.Text <> "" Then


txt = txt & "Mobile Number: " & txtcontact.Text & ".<br/>"
End If

If ddltype.Text <> "" Then


txt = txt & "Type: " & ddltype.Text & ".<br/><br/>"
End If

If txtsub.Text <> "" Then

50
txt = txt & "Subject Line: " & txtsub.Text & ".<br/><br/>"
End If

If txtquery.Text <> "" Then


txt = txt & "Query: " & txtquery.Text & ".<br/><br/>"
End If

Call EmailSending("noreplyfindhomes1@gmail.com", "New Query from " & txtname.Text, txt)

txtname.Text = ""
txtemailid.Text = ""
txtcontact.Text = ""
txtsub.Text = ""
txtquery.Text = ""
ddltype.SelectedIndex = 0
End If

End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load


Try
connection_create()
Catch ex As Exception

End Try

End Sub
Private Function EmailSending(ByVal tos As String, ByVal subject As String, ByVal message As String)
Try
Dim Smtp_Server As New SmtpClient
Dim e_mail As New MailMessage()
Smtp_Server.UseDefaultCredentials = False
Smtp_Server.Credentials = New Net.NetworkCredential("noreplyfindhomes1@gmail.com",
"propertyiq12345")
Smtp_Server.Port = 587
Smtp_Server.EnableSsl = True
Smtp_Server.Host = "smtp.gmail.com"

e_mail = New MailMessage()


e_mail.From = New MailAddress("noreplyfindhomes1@gmail.com")
e_mail.To.Add(tos)
e_mail.Subject = subject
e_mail.IsBodyHtml = True
e_mail.Body = message
Smtp_Server.Send(e_mail)
MsgBox("Your query has been submitted. We will contact your shortly.",
MsgBoxStyle.Information, "Query Sent")

51
Return 0
Catch ex As Exception
MsgBox("Email Not Sent !!! " + vbCrLf + "Please Check Your Network Connection",
MsgBoxStyle.Information, "Internet Error")
Return 1
End Try
End Function

End Class

52
CPADMIN.ASPX

<%@ Page Language="VB" MasterPageFile="~/Master_Admin.master"


AutoEventWireup="false" CodeFile="CPAdmin.aspx.vb" Inherits="_Default" title="Change
Password | FindHomes.com" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<div class="wrap">
<div>
<div class="mid-grid">
<center>
<h2>Change your password Here</h2>
<table>
<tr align="left">
<td style="padding: 5px 5px; width: 180px;">Current Password</td>
<td style="padding: 5px 5px">
<asp:TextBox ID="txtcurrent" runat="server" MaxLength="20" Width="252px"
class="txtbox" TextMode="Password"></asp:TextBox>
</td>
</tr>
<tr align="left">
<td style="padding: 5px 5px; width: 180px;">New Password</td>
<td style="padding: 5px 5px">
<asp:TextBox ID="txtnewpassword" runat="server" MaxLength="20"
Width="252px" class="txtbox" TextMode="Password"></asp:TextBox>
</td>
</tr>
<tr align="left">
<td style="padding: 5px 5px; width: 180px;">Re-enter New Password</td>
<td style="padding: 5px 5px">
<asp:TextBox ID="txtrenewpassword" runat="server" MaxLength="20"
Width="252px" class="txtbox" TextMode="Password"></asp:TextBox>
</td>
</tr>
<tr align="left">
<td>&nbsp;</td>
<td align="center"><asp:Button ID="btnchange" runat="server" Text="Change"
Width="250px" class="css_button" Height="37px"></asp:Button></td>
</tr>
<tr align="left">
<td colspan="2">
<asp:RequiredFieldValidator ID="rfv1" runat="server"
ErrorMessage="Enter Current Password." ControlToValidate="txtcurrent"
Display="None"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="rfv2" runat="server"
ErrorMessage="Enter New Password." ControlToValidate="txtnewpassword"
Display="None"></asp:RequiredFieldValidator>

53
<asp:RequiredFieldValidator ID="rfv3" runat="server"
ErrorMessage="Re-enter New Password."
ControlToValidate="txtrenewpassword"
Display="None"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cv1" runat="server"
ErrorMessage="Password does not match."
ControlToCompare="txtnewpassword"
ControlToValidate="txtrenewpassword"
Display="None"></asp:CompareValidator>
<br />
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
HeaderText="Below are the page errors:" ShowMessageBox="True"
ShowSummary="False" />
</td>
</tr>
</table>
</center>
</div>
</div>
</div>
</asp:Content>

CPADMIN.ASPX

Imports System.Data.SqlClient
Imports System.Data.Sql
Imports System.Data
Imports ASP.global_asax

Partial Class _Default


Inherits System.Web.UI.Page
Dim TextLength As Long
Dim sChar As Char
Dim bASCII As Byte
Dim pass As String
Dim count, value As Integer
Dim da As SqlDataAdapter
Dim ds As DataSet
Dim cmd As SqlCommand

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles


Me.Load
connection_create()
End Sub

54
Protected Sub btnchange_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles btnchange.Click
If Page.IsValid = True Then
Dim cp As String
cp = Session("LoginPass").ToString
If cp <> "" Then
If txtcurrent.Text = Session("LoginPass").ToString Then
'Encryption code
Dim x As Integer
TextLength = Len(txtnewpassword.Text)
For x = 1 To TextLength
sChar = Mid$(txtnewpassword.Text, x, 1)
bASCII = Asc(sChar)
bASCII += 11
If bASCII > 255 Then
bASCII -= 11
End If
pass &= Chr(bASCII)
Next
cmd = New SqlCommand
cmd.CommandType = CommandType.Text
cmd.Connection = con
Dim sqlq As String
sqlq = "update AccountDetails set password='" & pass & "' where emailid='" &
Session("LoginId").ToString & "'"
cmd.CommandText = sqlq
cmd.ExecuteNonQuery()
cmd = Nothing
MsgBox("Password changed sucessfully. Login with your new credentials.",
MsgBoxStyle.Information, "Sucessful")
Response.Redirect("LogOut.aspx")
Else
MsgBox("Current password does not match.", MsgBoxStyle.Information, "Incorrect
password")
End If
End If
End If
End Sub
End Class

CPUSER.ASPX

55
<%@ Page Language="VB" MasterPageFile="~/Master_User.master"
AutoEventWireup="false" CodeFile="CPUser.aspx.vb" Inherits="_Default" title="Change
Password | FindHomes.com" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<div class="wrap">
<div>
<div class="mid-grid">
<center>
<h2>Change your password Here</h2>
<table>
<tr align="left">
<td style="padding: 5px 5px; width: 180px;">Current Password</td>
<td style="padding: 5px 5px">
<asp:TextBox ID="txtcurrent" runat="server" MaxLength="20" Width="252px"
class="txtbox" TextMode="Password"></asp:TextBox>
</td>
</tr>
<tr align="left">
<td style="padding: 5px 5px; width: 180px;">New Password</td>
<td style="padding: 5px 5px">
<asp:TextBox ID="txtnewpassword" runat="server" MaxLength="20"
Width="252px" class="txtbox" TextMode="Password"></asp:TextBox>
</td>
</tr>
<tr align="left">
<td style="padding: 5px 5px; width: 180px;">Re-enter New Password</td>
<td style="padding: 5px 5px">
<asp:TextBox ID="txtrenewpassword" runat="server" MaxLength="20"
Width="252px" class="txtbox" TextMode="Password"></asp:TextBox>
</td>
</tr>
<tr align="left">
<td>&nbsp;</td>
<td align="center"><asp:Button ID="btnchange" runat="server" Text="Change"
Width="250px" class="css_button" Height="37px"></asp:Button></td>
</tr>
<tr align="left">
<td colspan="2">
<asp:RequiredFieldValidator ID="rfv1" runat="server"
ErrorMessage="Enter Current Password." ControlToValidate="txtcurrent"
Display="None"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="rfv2" runat="server"
ErrorMessage="Enter New Password." ControlToValidate="txtnewpassword"
Display="None"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="rfv3" runat="server"

56
ErrorMessage="Re-enter New Password."
ControlToValidate="txtrenewpassword"
Display="None"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cv1" runat="server"
ErrorMessage="Password does not match."
ControlToCompare="txtnewpassword"
ControlToValidate="txtrenewpassword"
Display="None"></asp:CompareValidator>
<br />
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
HeaderText="Below are the page errors:" ShowMessageBox="True"
ShowSummary="False" />
</td>
</tr>
</table>
</center>
</div>
</div>
</div>
</asp:Content>

CPUSER.ASPX.VB

Imports System.Data.SqlClient
Imports System.Data.Sql
Imports System.Data
Imports ASP.global_asax

Partial Class _Default


Inherits System.Web.UI.Page
Dim TextLength As Long
Dim sChar As Char
Dim bASCII As Byte
Dim pass As String
Dim count, value As Integer
Dim da As SqlDataAdapter
Dim ds As DataSet
Dim cmd As SqlCommand

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles


Me.Load
connection_create()
End Sub

Protected Sub btnchange_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles btnchange.Click

57
If Page.IsValid = True Then
Dim cp As String
cp = Session("LoginPass").ToString
If cp <> "" Then
If txtcurrent.Text = Session("LoginPass").ToString Then
'Encryption code
Dim x As Integer
TextLength = Len(txtnewpassword.Text)
For x = 1 To TextLength
sChar = Mid$(txtnewpassword.Text, x, 1)
bASCII = Asc(sChar)
bASCII += 11
If bASCII > 255 Then
bASCII -= 11
End If
pass &= Chr(bASCII)
Next
cmd = New SqlCommand
cmd.CommandType = CommandType.Text
cmd.Connection = con
Dim sqlq As String
sqlq = "update AccountDetails set password='" & pass & "' where emailid='" &
Session("LoginId").ToString & "'"
cmd.CommandText = sqlq
cmd.ExecuteNonQuery()
cmd = Nothing
MsgBox("Password changed sucessfully. Login with your new credentials.",
MsgBoxStyle.Information, "Sucessful")
Response.Redirect("Logout.aspx")
Else
MsgBox("Current password does not match.", MsgBoxStyle.Information, "Incorrect
password")
End If
End If
End If
End Sub
End Class

DEFAULT.ASPX

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"


Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

58
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>

</div>
</form>
</body>
</html>

DEFAULT.ASPX.VB

Partial Class _Default


Inherits System.Web.UI.Page

End Class

EMAIL.ASPX

<%@ Page Language="VB" MasterPageFile="~/Master_Admin.master"


AutoEventWireup="false" CodeFile="Email.aspx.vb" Inherits="_Default" title="Send Email |
FindHomes.com" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<div class="wrap">
<div>
<div class="mid-grid">
<center>
<h2>Email to Subscribers</h2>
<table>
<tr align="left">
<td style="padding: 5px 5px; width: 180px;">Choose Email ID</td>
<td style="padding: 5px 5px">
<asp:DropDownList ID="ddlselectid" runat="server" Width="253px"
class="textbox" Height="29">
</asp:DropDownList>
</td>
</tr>
<tr align="left">
<td style="padding: 5px 5px; width: 180px;">Subject line</td>
<td style="padding: 5px 5px;"><asp:TextBox ID="txtsubject" class="txtbox"
Width="252px" runat="server" MaxLength="50"></asp:TextBox></td>

59
</tr>
<tr align="left">
<td style="padding: 5px 5px; width: 180px;" valign="top">Your Message</td>
<td style="padding: 5px 5px;"><asp:TextBox ID="txtmsg" runat="server"
Width="248px" class="txtbox" MaxLength="200" Height="125px"
TextMode="MultiLine"></asp:TextBox></td>
</tr>
<tr align="left">
<td style="padding: 5px 5px;">&nbsp;</td>
<td style="padding: 5px 5px;" align="right">
<asp:Button ID="btnsend" runat="server" Text="Send Now" Width="252px"
class="css_button1" Height="37px" CausesValidation="True"></asp:Button>
</td>
</tr>
<tr align="left">
<td colspan="2">
<asp:RequiredFieldValidator ID="rfv1" runat="server"
ErrorMessage="Enter subject." ControlToValidate="txtsubject"
Display="None"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="rfv2" runat="server"
ErrorMessage="Enter Message." ControlToValidate="txtmsg"
Display="None"></asp:RequiredFieldValidator>
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
ShowMessageBox="True" ShowSummary="False" HeaderText="In order to send the emails,
please resolve the below page errors." />
</td>
</tr>
</table>
<!--<h3>Upcoming sites/projects</h3>
<marquee>
<asp:Image ID="Image1" runat="server" ImageUrl="images/m1.jpg" style="border-
radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image2" runat="server" ImageUrl="images/m2.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image3" runat="server" ImageUrl="images/m3.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image4" runat="server" ImageUrl="images/m4.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image5" runat="server" ImageUrl="images/m5.jpg"
style="border-radius: 10px;" Height="250"></asp:Image>
</marquee>-->
</center>
</div>
</div>
</div>
</asp:Content>

60
EMAIL.ASP.VB

Imports ASP.global_asax
Imports System.Data
Imports System.Data.SqlClient
Imports System.Net
Imports System.Net.Mail

Partial Class _Default


Inherits System.Web.UI.Page
Dim cmd As SqlCommand
Dim da As SqlDataAdapter
Dim ds As DataSet
Dim val As Integer
Dim str As Integer
Dim i, count, value As Integer

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles


Me.Load
If Page.IsPostBack = False Then
Try
'Fill Email ids in DDL.
connection_create()
da = New SqlDataAdapter("select emailid from Subscribers", con)
ds = New DataSet
da.Fill(ds)
If ds.Tables(0).Rows.Count > 0 Then
ddlselectid.Items.Clear()
ddlselectid.Items.Add("--Select--")
ddlselectid.Items.Add("All")
For o = 0 To ds.Tables(0).Rows.Count - 1
ddlselectid.Items.Add(ds.Tables(0).Rows(o).Item(0))
Next
Else
ddlselectid.Items.Clear()
End If
Catch ex As Exception
End Try
End If
End Sub

Protected Sub btnsend_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles btnsend.Click
If Page.IsValid = True Then
If ddlselectid.Text <> "--Select--" Then
btnsend.Enabled = False

61
If ddlselectid.Text = "All" Then
'Code for multiple emailing.
da = New SqlDataAdapter("select emailid from Subscribers", con)
ds = New DataSet
da.Fill(ds)
If ds.Tables(0).Rows.Count > 0 Then
For y = 0 To ds.Tables(0).Rows.Count - 1
Call EmailSending(ds.Tables(0).Rows(y).Item(0), Trim(txtsubject.Text),
Trim(txtmsg.Text))
Next
MsgBox("Email's sent successfuly.", MsgBoxStyle.Information, "Email Sent")
Try
ddlselectid.SelectedIndex = 0
Catch ex As Exception
End Try
txtmsg.Text = ""
txtsubject.Text = ""
btnsend.Enabled = True
End If
Else
'Code for single email.
Call EmailSending(Trim(ddlselectid.Text), Trim(txtsubject.Text),
Trim(txtmsg.Text))
MsgBox("Email sent successfuly.", MsgBoxStyle.Information, "Email Sent")

Try
ddlselectid.SelectedIndex = 0
Catch ex As Exception
End Try
txtmsg.Text = ""
txtsubject.Text = ""
btnsend.Enabled = True
End If
Else
MsgBox("First select the email address from list.", MsgBoxStyle.Information,
"Information")
End If
End If
End Sub

Private Function EmailSending(ByVal tos As String, ByVal subject As String, ByVal message
As String)
Try
Dim Smtp_Server As New SmtpClient
Dim e_mail As New MailMessage()
Smtp_Server.UseDefaultCredentials = False

62
Smtp_Server.Credentials = New
Net.NetworkCredential("noreplyfindhomes1@gmail.com", "propertyiq12345")
Smtp_Server.Port = 587
Smtp_Server.EnableSsl = True
Smtp_Server.Host = "smtp.gmail.com"

e_mail = New MailMessage()


e_mail.From = New MailAddress("noreplyfindhomes1@gmail.com")
e_mail.To.Add(tos)
e_mail.Subject = subject
e_mail.IsBodyHtml = True
e_mail.Body = message
Smtp_Server.Send(e_mail)
Return 0
Catch ex As Exception
MsgBox("Email Not Sent !!! " + vbCrLf + "Please Check Your Network Connection",
MsgBoxStyle.Information, "Internet Error")
Return 1
End Try
End Function
End Class

FP.ASPX

<%@ Page Language="VB" MasterPageFile="~/Master_Main.master"


AutoEventWireup="false" CodeFile="FP.aspx.vb" Inherits="_Default" title="Forgot Password |
FindHomes.com" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<!---start-content---->
<div class="wrap">
<div class="mid-grid">
<h2>Forgot password, Reset Here</h2>
<br />
<center>
<table style="border-collapse:separate; border-spacing:5px;">
<tr align="left">
<td style="padding: 5px 5px; width: 180px;">Email ID</td>
<td style="padding: 5px 5px"><asp:TextBox ID="txtemailid" class="txtbox"
runat="server" MaxLength="40" Width="250px"></asp:TextBox></td>
</tr>
<tr align="left">
<td style="padding: 5px 5px; width: 180px;">Unique Pin</td>
<td style="padding: 5px 5px"><asp:TextBox ID="txtpin" class="txtbox"
runat="server" MaxLength="4" TextMode="Password" Width="250px"></asp:TextBox></td>
</tr>

63
<tr align="left">
<td>&nbsp;</td>
<td style="padding: 5px 5px">
<asp:Button ID="btnreset" runat="server" Text="Reset Password"
class="css_button1" Height="37px" Width="256px"></asp:Button></td>
</tr>
</table>
<asp:RequiredFieldValidator ID="rfv1" runat="server" ErrorMessage="Enter Email
ID."
ControlToValidate="txtemailid" Display="None"></asp:RequiredFieldValidator>

<asp:RegularExpressionValidator ID="rev1" runat="server" ErrorMessage="Invalid


Email ID." ControlToValidate="txtemailid" Display="None"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-
.]\w+)*"></asp:RegularExpressionValidator>

<asp:RequiredFieldValidator ID="rfv2" runat="server" ErrorMessage="Enter Your


Unique Pin." ControlToValidate="txtpin" Display="None"></asp:RequiredFieldValidator>

<asp:ValidationSummary ID="ValidationSummary1" runat="server"


ShowMessageBox="True" ShowSummary="False"></asp:ValidationSummary>
</center>
</div>
</div>
<!---End-content---->
</asp:Content>

FP.ASPX.VB

Imports System.Data.SqlClient
Imports System.Data.Sql
Imports System.Data
Imports ASP.global_asax
Imports System.Net
Imports System.Net.Mail

Partial Class _Default


Inherits System.Web.UI.Page
Dim TextLength As Long
Dim sChar As Char
Dim bASCII As Byte
Dim pass As String
Public Shared save_id, save_pass As String
Dim cmd As SqlCommand
Dim sqlq As String
Dim da As SqlDataAdapter

64
Dim ds As DataSet
Shared random As New Random()

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles


Me.Load
Try
Dim e1 As String
Dim type As String
e1 = "" : type = ""
Try
e1 = Session("LoginId").ToString
type = Session("type").ToString
Catch ex As Exception
End Try
If type = "Admin" Then
Response.Redirect("Homeadmin.aspx")
ElseIf type = "Member" Then
Response.Redirect("Homeuser.aspx")
End If
connection_create()
Catch ex As Exception
End Try
End Sub

Protected Sub btnreset_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles btnreset.Click
If Page.IsValid = True Then
Try
da = New SqlDataAdapter("select * from AccountDetails where emailid='" &
Trim(txtemailid.Text) & "' and pin='" & Trim(txtpin.Text) & "'", con)
ds = New DataSet
da.Fill(ds)

If ds.Tables(0).Rows.Count > 0 Then


Dim newpassword As String = ""
newpassword = "default_" & Convert.ToString(random.Next(100, 999))
TextLength = Len(newpassword)
For x = 1 To TextLength
sChar = Mid$(newpassword, x, 1)
bASCII = Asc(sChar)
bASCII += 11
If bASCII > 255 Then
bASCII -= 11
End If
pass &= Chr(bASCII)
Next

65
'update new password in DB.
sqlq = "update AccountDetails set password='" & pass & "'where emailid='" &
txtemailid.Text & "' "
cmd = New SqlCommand
cmd.Connection = con
cmd.CommandText = sqlq
cmd.ExecuteNonQuery()

'Email new password to use email id.


Call EmailSending(txtemailid.Text, "Password Reset Information", "Your password
has been reset successfully.<br/><br/>Your new password is <b>" & newpassword & "</b>.")
txtemailid.Text = ""
txtpin.Text = ""
Response.Redirect("SignIn.aspx")
Else
MsgBox("Either Email Address Or Unique pin is Incorrect.",
MsgBoxStyle.Information, "")
End If
Catch ex As Exception
End Try
End If
End Sub

Private Function EmailSending(ByVal tos As String, ByVal subject As String, ByVal message
As String)
Try
Dim Smtp_Server As New SmtpClient
Dim e_mail As New MailMessage()
Smtp_Server.UseDefaultCredentials = False
Smtp_Server.Credentials = New
Net.NetworkCredential("noreplyfindhomes1@gmail.com", "propertyiq12345")
Smtp_Server.Port = 587
Smtp_Server.EnableSsl = True
Smtp_Server.Host = "smtp.gmail.com"

e_mail = New MailMessage()


e_mail.From = New MailAddress("noreplyfindhomes1@gmail.com")
e_mail.To.Add(tos)
e_mail.Subject = subject
e_mail.IsBodyHtml = True
e_mail.Body = message
Smtp_Server.Send(e_mail)
MsgBox("An Email has sent to you with new password.", MsgBoxStyle.Information,
"Email Sent")
Return 0

66
Catch ex As Exception
MsgBox("Email Not Sent !!! " + vbCrLf + "Please Check Your Network Connection",
MsgBoxStyle.Information, "Internet Error")
Return 1
End Try
End Function
End Class
Frmcomplaintrp.aspx

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="frmcomplaintrpt.aspx.vb"


Inherits="frmcomplaintrpt" %>

<%@ Register assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral,


PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagprefix="CR" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>

<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"


AutoDataBind="True" Height="1106px" ReportSourceID="CrystalReportSource1"
Width="876px" />
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
<Report FileName="CrystalReport2.rpt">
</Report>
</CR:CrystalReportSource>

</div>
</form>
</body>
</html>

Frmcomplaintrp.aspx

Partial Class frmcomplaintrpt


Inherits System.Web.UI.Page

End Class

67
FRMMEMBERREPORT.ASPX

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="frmmemberreport.aspx.vb"


Inherits="frmmemberreport" %>

<%@ Register assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral,


PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagprefix="CR" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>

<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"


AutoDataBind="True" Height="1106px" ReportSourceID="CrystalReportSource1"
Width="876px" />
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
<Report FileName="CrystalReport1.rpt">
</Report>
</CR:CrystalReportSource>

</div>
</form>
</body>
</html>

FRMMEMBERREPORT.ASPX.VB

Partial Class frmmemberreport


Inherits System.Web.UI.Page

End Class

FRMPROPERTY.ASPX
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="frmpropertyrpt.aspx.vb"
Inherits="frmpropertyrpt" %>

<%@ Register assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral,


PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagprefix="CR" %>

68
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>

<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"


AutoDataBind="True" Height="1106px" ReportSourceID="CrystalReportSource3"
Width="876px" />
<CR:CrystalReportSource ID="CrystalReportSource3" runat="server">
<Report FileName="CrystalReport3.rpt">
</Report>
</CR:CrystalReportSource>
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
<Report FileName="CrystalReport1.rpt">
</Report>
</CR:CrystalReportSource>

</div>
</form>
</body>
</html>

FRMPROPERTY.ASPX.VB

Partial Class frmpropertyrpt


Inherits System.Web.UI.Page

End Class

HOMEADMIN.ASPX

<%@ Page Language="VB" MasterPageFile="~/Master_Admin.master"


AutoEventWireup="false" CodeFile="Homeadmin.aspx.vb" Inherits="_Default" title="Welcome
Admin | FindHomes.com" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<!---start-content---->
<div class="wrap">
<div>

69
<div class="mid-grid">
<center>
<table>
<tr>
<td valign="middle"><asp:ImageButton ID="imgproperty" runat="server"
Height="16px" Width="18px" ImageUrl="~/images/plus.png" /></td>
<td valign="middle"><font size="4" color="Lime">Properties
Uploaded</font></td>
</tr>
</table>
<br />
<asp:Panel ID="pnlproperty" runat="server" Visible="False">
<asp:Label ID="lblprop" runat="server" Text=""></asp:Label><br />
<asp:GridView ID="gvprop" runat="server" BackColor="Lime"
BorderColor="Lime" CellPadding="4" CellSpacing="3" ForeColor="Black"
GridLines="None" AllowPaging="True" BorderStyle="Solid" Width="1000px"
Font-Names="Times New Roman">
<RowStyle BackColor="White" />
<FooterStyle BackColor="Lime" Font-Bold="True" ForeColor="White"
BorderColor="Lime" />
<PagerStyle BackColor="Lime" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True"
ForeColor="#333333" />
<HeaderStyle BackColor="Lime" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#2461BF" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
</asp:Panel>
<br />

<table>
<tr>
<td valign="middle"><asp:ImageButton ID="imgcomp" runat="server"
Height="16px" Width="18px" ImageUrl="~/images/plus.png" /></td>
<td valign="middle"><font size="4" color="Lime">User's Complaints</font></td>
</tr>
</table>
<br />
<asp:Panel ID="pnlcomp" runat="server" Visible="False">
<asp:Label ID="lblcomp" runat="server" Text=""></asp:Label><br />
<asp:GridView ID="GVcomp" runat="server" BackColor="Lime"
BorderColor="Lime" CellPadding="4" CellSpacing="3" ForeColor="Black"
GridLines="None" AllowPaging="True" BorderStyle="Solid" Width="1000px">
<RowStyle BackColor="White" />
<FooterStyle BackColor="Lime" Font-Bold="True" ForeColor="White"
BorderColor="Lime" />

70
<PagerStyle BackColor="Lime" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True"
ForeColor="#333333" />
<HeaderStyle BackColor="Lime" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#2461BF" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
</asp:Panel>
</center>
</div>
</div>
</div>
<!---End-content---->
</asp:Content>

HOMEADMIN.ASPX.VB

Imports ASP.global_asax
Imports System.Data
Imports System.Data.SqlClient

Partial Class _Default


Inherits System.Web.UI.Page
Dim cmd As SqlCommand
Dim da As SqlDataAdapter
Dim ds As DataSet
Dim val As Integer
Dim str As Integer
Dim i, count, value As Integer

Protected Sub imgproperty_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles imgproperty.Click
If imgproperty.ImageUrl = "~/images/plus.png" Then
pnlproperty.Visible = True
imgproperty.ImageUrl = "~/images/minus.png"
Else
pnlproperty.Visible = False
imgproperty.ImageUrl = "~/images/plus.png"
End If
End Sub

Protected Sub imgcomp_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles imgcomp.Click
If imgcomp.ImageUrl = "~/images/plus.png" Then
pnlcomp.Visible = True
imgcomp.ImageUrl = "~/images/minus.png"

71
Else
pnlcomp.Visible = False
imgcomp.ImageUrl = "~/images/plus.png"
End If
End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles


Me.Load
If Page.IsPostBack = False Then
Try
connection_create()

'Code for Comp.


da = New SqlDataAdapter("select ticketno as 'Ticket Number', regarding as 'Issue
Regarding', tellmore as 'More Information', emailid as 'Email Address' from Complaints", con)
ds = New DataSet
da.Fill(ds)
If ds.Tables(0).Rows.Count > 0 Then
GVcomp.DataSource = ds.Tables(0)
GVcomp.DataBind()

lblcomp.Text = "Below is the list of Complaints:"


Else
lblcomp.Text = "No records found."
End If

'Code for prop.


da = New SqlDataAdapter("select propertyid as 'ID', caption as 'Caption',
buildercompname as 'Developer', typeofproperty as 'Property Type', city as 'City', expectedprice
as 'Price', pricepersqft as 'Sqft Price', furnished as 'Property Is', transactiontype as 'Type' from
PropertyDetails", con)
ds = New DataSet
da.Fill(ds)
If ds.Tables(0).Rows.Count > 0 Then
gvprop.DataSource = ds.Tables(0)
gvprop.DataBind()

lblprop.Text = "Below is the list of Properties uploaded:"


Else
lblprop.Text = "No records found."
End If
Catch ex As Exception
End Try
End If
End Sub
End Class

72
HOMEUSER.ASPX

<%@ Page Language="VB" MasterPageFile="~/Master_User.master"


AutoEventWireup="false" CodeFile="Homeuser.aspx.vb" Inherits="_Default" title="Search |
FindHomes.com" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<div class="wrap">
<div>
<div class="mid-grid">
<center>
<h2>Your Happy Home Journey Begins Here...</h2>
<table>
<tr>
<td style="padding: 5px 5px">
<asp:TextBox ID="txtcity" placeholder=" Search Locality" runat="server"
MaxLength="30" Width="600px" Height="35" class="txtbox"></asp:TextBox>
&nbsp;<asp:DropDownList ID="ddlcategory" runat="server" Width="230px"
class="textbox" Height="38">
<asp:ListItem>--Property Type--</asp:ListItem>
<asp:ListItem>Multistorey Apartment</asp:ListItem>
<asp:ListItem>Builder Floor Apartment</asp:ListItem>
<asp:ListItem Value="Residental House">Residental House</asp:ListItem>
<asp:ListItem>Villa</asp:ListItem>
<asp:ListItem>Penthouse</asp:ListItem>
<asp:ListItem>Studio Apartment</asp:ListItem>
<asp:ListItem>Office IT Park</asp:ListItem>
<asp:ListItem>Commercial Shop</asp:ListItem>
<asp:ListItem>Commercial Showroom</asp:ListItem>
<asp:ListItem>Commercial Land</asp:ListItem>
<asp:ListItem>Warehouse</asp:ListItem>
<asp:ListItem>Other</asp:ListItem>
</asp:DropDownList>
&nbsp;<asp:Button ID="btnsearch" class="css_button1" runat="server"
Text="Search Now" Width="150px" Height="38" />
</td>
</tr>
</table>
<br />
<asp:Label ID="lblres" runat="server" Text=""></asp:Label><br />
<asp:Label ID="lblerror" runat="server" Text="" Font-Bold="True" ForeColor="Red"
Font-Size="Medium"></asp:Label>

<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">


</asp:ToolkitScriptManager>

73
<asp:AutoCompleteExtender ID="txtName_AutoCompleteExtender" runat="server"
DelimiterCharacters="" Enabled="True" ServiceMethod="GetCompletionList"
ServicePath="" TargetControlID="txtcity" UseContextKey="True"
MinimumPrefixLength="1" CompletionInterval="10" EnableCaching="true"
CompletionSetCount="3">
</asp:AutoCompleteExtender>

<h2>Upcoming sites/projects</h2>
<marquee>
<asp:Image ID="Image1" runat="server" ImageUrl="images/m1.jpg" style="border-
radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image2" runat="server" ImageUrl="images/m2.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image3" runat="server" ImageUrl="images/m3.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image4" runat="server" ImageUrl="images/m4.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image5" runat="server" ImageUrl="images/m5.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image></marquee>
</center>
</div>
</div>
</div>
</asp:Content>

HOMEUSER.ASPX.VB

Imports ASP.global_asax
Imports System.Data
Imports System.Data.SqlClient
Imports System.Collections.Generic
Imports System.Configuration

Partial Class _Default


Inherits System.Web.UI.Page
Dim cmd As SqlCommand
Dim da As SqlDataAdapter
Dim ds As DataSet
Dim val As Integer
Dim str As String
Dim i, count, value As Integer
Dim pic As String

<System.Web.Services.WebMethodAttribute()>
<System.Web.Script.Services.ScriptMethodAttribute()> Public Shared Function

74
GetCompletionList(ByVal prefixText As String, ByVal count As Integer, ByVal contextKey As
String) As String()
connection_create()
Dim cmd As New SqlCommand("SELECT locality FROM PropertyDetails", con)
Dim oReader As SqlDataReader
Dim CompletionSet As New List(Of String)()
oReader = cmd.ExecuteReader(CommandBehavior.CloseConnection)
While oReader.Read()
CompletionSet.Add(oReader("locality").ToString())
End While
Return CompletionSet.ToArray()
End Function

Protected Sub btnsearch_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles btnsearch.Click
Try
If txtcity.Text = "" Or ddlcategory.Text = "--Property Type--" Then
MsgBox("Enter the city name and property type", MsgBoxStyle.Information, "")
Else
Response.Redirect("Homeuser.aspx?locality='" & txtcity.Text & "'&category='" &
ddlcategory.Text & "'")
End If
Catch ex As Exception

End Try
End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles


Me.Load
Dim category As String = ""
Dim locality As String = ""
pic = ""
Try
category = Request.QueryString("category").ToString
Catch ex As Exception
category = ""
End Try

Try
locality = Request.QueryString("locality").ToString
Catch ex As Exception
locality = ""
End Try

If category = "" And locality = "" Then

75
If Page.IsPostBack = False Then
Try
str = ""
connection_create()
da = New SqlDataAdapter("select * from PropertyDetails Order by srno DESC",
con)
ds = New DataSet
da.Fill(ds)

If ds.Tables(0).Rows.Count > 0 Then


'Display all properties in desc order.
str = str & "<table style='Width:800px'>"
str = str & "<tr><td colspan='2' align='right'><font size='2'
color='black'><br/>For more details click on the property image.</font></td></tr>"
str = str & "<tr><td colspan='2'><hr style='color:gray' /></td></tr>"
For y = 0 To ds.Tables(0).Rows.Count - 1

If ds.Tables(0).Rows(y).Item(28) <> "" Then


pic = ds.Tables(0).Rows(y).Item(28)

ElseIf ds.Tables(0).Rows(y).Item(29) <> "" Then


pic = ds.Tables(0).Rows(y).Item(29)

ElseIf ds.Tables(0).Rows(y).Item(30) <> "" Then


pic = ds.Tables(0).Rows(y).Item(30)

ElseIf ds.Tables(0).Rows(y).Item(31) <> "" Then


pic = ds.Tables(0).Rows(y).Item(31)

End If

str = str & "<tr><td valign='top' style='Width:190px'>"


str = str & "<a href='Summary.aspx?pid=" & ds.Tables(0).Rows(y).Item(1) & "
' ><img src=images/PropertyImages/" & pic & " style='Width:180px; Height:180px; vertical-
align:top;' /></a>"
str = str & "</td>"
str = str & "<td>"
str = str & "<font size='5' color='gray'>" & ds.Tables(0).Rows(y).Item(2) &
"</font><font size='3' color='black'>&nbsp;&nbsp;&nbsp;by&nbsp;&nbsp;" &
ds.Tables(0).Rows(y).Item(4) &
"</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;<font size='5' color='black'><img src='images/rup.png' style='Width:
17px; Height: 17px;' />" & ds.Tables(0).Rows(y).Item(15) & "</font><br />"
str = str & "<font size='3' color='blue'>" & ds.Tables(0).Rows(y).Item(1) &
"</font><br /><br />"

76
str = str & "<font size='5' color='black'>" & ds.Tables(0).Rows(y).Item(6) &
"</font> <font size='3'>in " & ds.Tables(0).Rows(y).Item(9) & "</font><br />"
str = str & "<font size='4' color='black'>Sq-ft Rate: Rs. " &
ds.Tables(0).Rows(y).Item(16) & "/-</font><br /><br />"
str = str & "<font size='4' color='black'>" & ds.Tables(0).Rows(y).Item(23) & "
| " & ds.Tables(0).Rows(y).Item(24) & " | Possession in " & ds.Tables(0).Rows(y).Item(25) &
"/" & ds.Tables(0).Rows(y).Item(26) & "</font><br />"
str = str & "<font size='4' color='black'><br />Covered Area: " &
ds.Tables(0).Rows(y).Item(11) & " " & ds.Tables(0).Rows(y).Item(12) & "</font>"
str = str & "</td>"
str = str & "</tr>"
str = str & "<tr><td colspan='2'><hr style='color:gray' /></td></tr>"
Next
str = str & "</table>"
lblres.Text = str
Else
lblerror.Text = "Properties not found."
lblres.Text = ""
End If
Catch ex As Exception
End Try
End If
Else
'Display products via QS.
Try
str = ""
connection_create()
da = New SqlDataAdapter("select * from PropertyDetails where typeofproperty=" &
category & " and locality=" & locality & " ", con)
ds = New DataSet
da.Fill(ds)

If ds.Tables(0).Rows.Count > 0 Then


str = str & "<table style='Width:800px'>"
str = str & "<tr><td colspan='2' align='right'><font size='2' color='black'><br/>For
more details click on the property image.</font></td></tr>"
str = str & "<tr><td colspan='2'><hr style='color:gray' /></td></tr>"
For y = 0 To ds.Tables(0).Rows.Count - 1

If ds.Tables(0).Rows(y).Item(28) <> "" Then


pic = ds.Tables(0).Rows(y).Item(28)

ElseIf ds.Tables(0).Rows(y).Item(29) <> "" Then


pic = ds.Tables(0).Rows(y).Item(29)

ElseIf ds.Tables(0).Rows(y).Item(30) <> "" Then

77
pic = ds.Tables(0).Rows(y).Item(30)

ElseIf ds.Tables(0).Rows(y).Item(31) <> "" Then


pic = ds.Tables(0).Rows(y).Item(31)

End If

str = str & "<tr><td valign='top' style='Width:190px'>"


str = str & "<a href='Summary.aspx?pid=" & ds.Tables(0).Rows(y).Item(1) & " '
><img src=images/PropertyImages/" & pic & " style='Width:180px; Height:180px; vertical-
align:top;' /></a>"
str = str & "</td>"
str = str & "<td>"
str = str & "<font size='5' color='gray'>" & ds.Tables(0).Rows(y).Item(2) &
"</font><font size='3' color='black'>&nbsp;&nbsp;&nbsp;by&nbsp;&nbsp;" &
ds.Tables(0).Rows(y).Item(4) &
"</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;<font size='5' color='black'><img src='images/rup.png' style='Width:
17px; Height: 17px;' />" & ds.Tables(0).Rows(y).Item(15) & "</font><br />"
str = str & "<font size='3' color='blue'>" & ds.Tables(0).Rows(y).Item(1) &
"</font><br /><br />"
str = str & "<font size='5' color='black'>" & ds.Tables(0).Rows(y).Item(6) &
"</font> <font size='3'>in " & ds.Tables(0).Rows(y).Item(9) & "</font><br />"
str = str & "<font size='4' color='black'>Sq-ft Rate: Rs. " &
ds.Tables(0).Rows(y).Item(16) & "/-</font><br /><br />"
str = str & "<font size='4' color='black'>" & ds.Tables(0).Rows(y).Item(23) & " |
" & ds.Tables(0).Rows(y).Item(24) & " | Possession in " & ds.Tables(0).Rows(y).Item(25) & "/"
& ds.Tables(0).Rows(y).Item(26) & "</font><br />"
str = str & "<font size='4' color='black'><br />Covered Area: " &
ds.Tables(0).Rows(y).Item(11) & " " & ds.Tables(0).Rows(y).Item(12) & "</font>"
str = str & "</td>"
str = str & "</tr>"
str = str & "<tr><td colspan='2'><hr style='color:gray' /></td></tr>"
Next
str = str & "</table>"
lblres.Text = str
Else
lblerror.Text = "Properties not found."
lblres.Text = ""
End If
Catch ex As Exception
End Try
End If
End Sub
End Class

78
INDEX.ASPX

<%@ Page Language="VB" MasterPageFile="~/Master_Main.master"


AutoEventWireup="false" CodeFile="index.aspx.vb" Inherits="_Default" title="Sell Or
Purchase Properties" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<!------ Slider ------------>
<div class="slider">
<div class="slider-wrapper theme-default">
<div id="slider" class="nivoSlider">
<img src="images/s1.jpg" data-thumb="images/s1.jpg" alt="" />
<img src="images/s2.jpg" data-thumb="images/s2.jpg" alt="" />
<img src="images/s3.jpg" data-thumb="images/s3.jpg" alt="" />
<img src="images/s4.jpg" data-thumb="images/s4.jpg" alt="" />
</div>
</div>
</div>
<!------End Slider ------------>
<br /><br /><br /><br /><br />
<!---start-content---->
<div class="wrap">
<div class="section group">
<div class="grid_1_of_3 images_1_of_3 top_grid">
<a href="#"><img src="images/icon1.png"
title="icon-name" alt="" /></a>
<h3>Sales</h3>
<p>
We provide customer to search their dream
home across the various cities. To search for the properties you have to just create account and
signIn.
<br />
</p>
</div>
<div class="grid_1_of_3 images_1_of_3
top_grid">
<a href="#"><img src="images/icon2.png"
title="icon-name" alt="" /></a>
<h3>Developments</h3>
<p>
We have developed many project across the
maharashtra, multi store buildings, complexes great amenities. To know more visit our offices.
You can also search for our properties on this site.
</p>
</div>
<div class="grid_1_of_3 images_1_of_3 top_grid">

79
<a href="#"><img src="images/icon3.png"
title="icon-name" alt="" /></a>
<h3>Location</h3>
<p>
We have developed projects in the good and
residential locations where people can get all the facilities they are looking for.
<br /><br />
</p>
</div>
</div>
<div class="mid-grid">
<h2>Welcome to our site!</h2>
<h1>We are real estate consultants, with a difference!!</h1>
<p>
We at FindHomes focus on providing professional and transparent real-
estate solutions in Maharashtra. We are your one stop solution for all your real estate
requirements. We understand your unique requirements and help make informed decisions on
buying, selling and renting of property in and around Maharashtra.
</p><br />
<a class="button" href="AboutUs.aspx">Read More</a>
</div>
</div>
<!---End-content---->
</asp:Content>

INDEX.ASPX.VB

Partial Class _Default


Inherits System.Web.UI.Page

End Class

LOGOUT.ASPX

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Logout.aspx.vb"


Inherits="Logout" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>

80
<form id="form1" runat="server">
<div>

</div>
</form>
</body>
</html>

LOGOUT.ASPX.VB

Partial Class Logout


Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles


Me.Load
Session("LoginId") = ""
Session("LoginPass") = ""
Session("type") = ""

Response.Redirect("index.aspx")
End Sub
End Class

MASTER_ADMIN.MASTER

<%@ Master Language="VB" CodeFile="Master_Admin.master.vb" Inherits="Master_Admin"


%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet'
type='text/css'/>
<link href="css/slider.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript" src="js/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="js/jquery.nivo.slider.js"></script>
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider();

81
});
</script>
<script type="text/javascript">
function changeImage()
{
}

function fadeImg(el, val, fade){


if(fade === true){
val--;
}else{
val ++;
}

if(val > 0 && val < 100){


el.style.opacity = val / 100;
setTimeout(function(){fadeImg(el, val, fade);}, 10);
}
}

var images = [],


x = 0;

images[0] = "images/logo.png";
images[1] = "images/logo1.png";
setTimeout("changeImage()", 300);
</script>
</head>
<body>
<form id="form1" runat="server">
<!----start-header----->
<div class="header">
<div class="wrap">
<div class="top-header">
<div class="logo">
<a href="index.aspx"><img src="images/logo.png"
id="img" alt="LOGO" title="logo" /></a>
</div>
<div class="social-icons">
<ul>
<li><a href="http://www.facebook.com/"
target="_blank"><img src="images/facebook.png" alt="Facebook" title="facebook" /></a></li>
<li><a href="https://twitter.com/?lang=en"
target="_blank"><img src="images/twitter.png" alt="Twitter" title="twitter" /></a></li>

82
<li><a href="https://plus.google.com/"
target="_blank"><img src="images/google.png" alt="Google Plus" title="google pluse"
/></a></li>
<li><a href="Logout.aspx"><img
src="images/logout.png" alt="" title="Logout" /></a></li>
</ul>
</div>
<div class="clear"></div>
</div>
<!---start-top-nav---->
<div class="top-nav">
<div class="top-nav-left">
<ul>
<li class="active"><a
href="Homeadmin.aspx">Properties</a></li>
<li><a
href="Subsadmin.aspx">Subscribers</a></li>
<li><a href="Member.aspx">Members</a></li>
<li><a href="Reports.aspx">Reports</a></li>
<li><a href="Email.aspx">Email</a></li>
<li><a href="Searchadmin.aspx">Search</a></li>
<li><a href="CPAdmin.aspx">Change
Password</a></li>
</ul>
</div>
<div class="top-nav-right">
<div class="telephone">
<span><i class="phone_img"><img
src="images/phone.png" alt="" /></i> CALL</span><span class="number">+91
7276700997</span>
</div>
</div>
<div class="clear"> </div>
</div>
<!---End-top-nav---->
</div>
</div>
<!----End-header----->
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
<!---start-footer---->
<div class="copy-right">
<p><a href="Homeadmin.aspx">Home</a> | <a href="Email.aspx">Email</a> | <a
href="Reports.aspx">Reports</a> | <a href="Member.aspx">Members</a></p>
<p>Designed By <a href=""> Violet</a> | Batch: 2017-18 </p>
</div>

83
<!---End-footer---->
</form>
</body>
</html>

MASTER_ADMIN.MASTER.VB

Partial Class Master_Admin


Inherits System.Web.UI.MasterPage
End Class

MASTER_MAIN.MASTER.ASPX
<%@ Master Language="VB" CodeFile="Master_Main.master.vb" Inherits="Master_Main" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet'
type='text/css'/>
<link href="css/slider.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript" src="js/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="js/jquery.nivo.slider.js"></script>
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
<script type="text/javascript">
function changeImage()
{
var img = document.getElementById("img");
img.src = images[x];
x++;

if(x >= images.length){


x = 0;
}

setTimeout("changeImage()", 300);

84
}

function fadeImg(el, val, fade){


if(fade === true){
val--;
}else{
val ++;
}

if(val > 0 && val < 100){


el.style.opacity = val / 100;
setTimeout(function(){fadeImg(el, val, fade);}, 10);
}
}

var images = [],


x = 0;

images[0] = "images/logo.png";
setTimeout("changeImage()", 300);
</script>
</head>
<body>
<form id="form1" runat="server">
<!----start-header----->
<div class="header">
<div class="wrap">
<div class="top-header">
<div class="logo">
<a href="index.aspx"><img src="images/logo.png"
id="img" alt="LOGO" title="logo" /></a>
</div>
<div class="social-icons">
<ul>
<li><a href="http://www.facebook.com/"
target="_blank"><img src="images/facebook.png" alt="Facebook" title="facebook" /></a></li>
<li><a href="https://twitter.com/?lang=en"
target="_blank"><img src="images/twitter.png" alt="Twitter" title="twitter" /></a></li>
<li><a href="https://plus.google.com/"
target="_blank"><img src="images/google.png" alt="Google Plus" title="google pluse"
/></a></li>
<li><a href="SignIn.aspx"><img
src="images/login.png" alt="SignIn" title="SignIn" /></a></li>
</ul>
</div>
<div class="clear"></div>

85
</div>
<!---start-top-nav---->
<div class="top-nav">
<div class="top-nav-left">
<ul>
<li class="active"><a
href="index.aspx">Home</a></li>
<li><a href="Subscribe.aspx">Subscribe</a></li>
<li><a href="AboutUs.aspx">About Us</a></li>
<li><a href="Contact.aspx">Contact</a></li>
</ul>
</div>
<div class="top-nav-right">
<div class="telephone">
<span><i class="phone_img"><img
src="images/phone.png" alt="" /></i> CALL</span><span class="number">+91
7276700997</span>
</div>
</div>
<div class="clear"></div>
</div>
<!---End-top-nav---->
</div>
</div>
<!----End-header----->
<div class="wrap">
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
<!---start-footer---->
<div class="copy-right">
<p><a href="index.aspx">Home</a> | <a href="AboutUs.aspx">About Us</a> | <a
href="PP.aspx">Privacy Policy</a> | <a href="Subscribe.aspx">Subscribe</a></p>
<p>Designed By <a href=""> Violet</a> | Batch: 2017-18 </p>
</div>
<!---End-footer---->
</form>
</body>
</html>

MASTER_MAIN.MASTER.VB

Partial Class Master_Main


Inherits System.Web.UI.MasterPage
End Class

86
MASTER_USER.MASTER.ASPX

<%@ Master Language="VB" CodeFile="Master_User.master.vb" Inherits="Master_User" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet'
type='text/css'/>
<link href="css/slider.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript" src="js/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="js/jquery.nivo.slider.js"></script>
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
<script type="text/javascript">
function changeImage()
{
}

function fadeImg(el, val, fade){


if(fade === true){
val--;
}else{
val ++;
}

if(val > 0 && val < 100){


el.style.opacity = val / 100;
setTimeout(function(){fadeImg(el, val, fade);}, 10);
}
}

var images = [],


x = 0;

images[0] = "images/logo.png";

87
images[1] = "images/logo1.png";
setTimeout("changeImage()", 300);
</script>
</head>
<body>
<form id="form1" runat="server">
<!----start-header----->
<div>
<div class="wrap">
<div class="top-header">
<div class="logo">
<a href="index.aspx"><img src="images/logo.png"
id="img" alt="LOGO" title="logo" /></a>
</div>
<div class="social-icons">
<ul>
<li><a href="http://www.facebook.com/"
target="_blank"><img src="images/facebook.png" alt="Facebook" title="facebook" /></a></li>
<li><a href="https://twitter.com/?lang=en"
target="_blank"><img src="images/twitter.png" alt="Twitter" title="twitter" /></a></li>
<li><a href="https://plus.google.com/"
target="_blank"><img src="images/google.png" alt="Google Plus" title="google pluse"
/></a></li>
<li><a href="Logout.aspx"><img
src="images/logout.png" alt="" title="Logout" /></a></li>
</ul>
</div>
<div class="clear"></div>
</div>
<!---start-top-nav---->
<div class="top-nav">
<div class="top-nav-left">
<ul>
<li class="active"><a
href="Homeuser.aspx">Search</a></li>
<li><a href="ProfileUser.aspx">My
Profile</a></li>
<li><a href="UploadAds.aspx">Upload
Ads</a></li>
<li><a href="MyAds.aspx">My Ads</a></li>
<li><a
href="ComplaintUser.aspx">Complaint</a></li>
<li><a href="CPUser.aspx">Change
Password</a></li>
</ul>
</div>

88
<div class="top-nav-right">
<div class="telephone">
<span><i class="phone_img"><img
src="images/phone.png" alt="" /></i> CALL</span><span class="number">+91
7276700997</span>
</div>
</div>
<div class="clear"> </div>
</div>
<!---End-top-nav---->
</div>
</div>
<!----End-header----->
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
<!---start-footer---->
<div class="copy-right">
<p><a href="index.aspx">Home</a> | <a href="AboutUs.aspx">About Us</a> | <a
href="PP.aspx">Privacy Policy</a> | <a href="Subscribe.aspx">Subscribe</a></p>
<p>Designed By <a href=""> Violet</a> | Batch: 2017-18 </p>
</div>
<!---End-footer---->
</form>
</body>
</html>

MASTER_USER.MASTER.VB

Partial Class Master_User


Inherits System.Web.UI.MasterPage
End Class

MEMBER.ASPX

<%@ Page Language="VB" MasterPageFile="~/Master_Admin.master"


AutoEventWireup="false" CodeFile="Member.aspx.vb" Inherits="_Default" title="Our
Members | FindHomes.com" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<div class="wrap">
<div>
<div class="mid-grid">

89
<center>
<table>
<tr>
<td valign="middle"><asp:ImageButton ID="imgmembers" runat="server"
Height="16px" Width="18px" ImageUrl="~/images/plus.png" /></td>
<td valign="middle"><font size="4" color="Lime">Members
Information</font></td>
</tr>
</table>
<br />
<asp:Panel ID="pnlmembers" runat="server" Visible="False">
<asp:Label ID="lblmembers" runat="server" Text=""></asp:Label><br />
<asp:GridView ID="GVMembers" runat="server" BackColor="Lime"
BorderColor="Lime" CellPadding="20" CellSpacing="10" ForeColor="Black"
GridLines="None" AllowPaging="True" BorderStyle="Solid" Width="1200px"
Font-Names="Times New Roman">
<RowStyle BackColor="White" />
<FooterStyle BackColor="Lime" Font-Bold="True" ForeColor="White"
BorderColor="Lime" />
<PagerStyle BackColor="Lime" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True"
ForeColor="#333333" />
<HeaderStyle BackColor="Lime" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#2461BF" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
</asp:Panel>
<br />
</center>
</div>
</div>
</div>
</asp:Content>

MEMBER.VB

Imports ASP.global_asax
Imports System.Data
Imports System.Data.SqlClient

Partial Class _Default


Inherits System.Web.UI.Page
Dim cmd As SqlCommand
Dim da As SqlDataAdapter
Dim ds As DataSet
Dim val As Integer

90
Dim str As Integer
Dim i, count, value As Integer

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles


Me.Load
If Page.IsPostBack = False Then
Try
connection_create()
'Code for Members.
da = New SqlDataAdapter("select * from Customer", con)
ds = New DataSet
da.Fill(ds)
If ds.Tables(0).Rows.Count > 0 Then
GVMembers.DataSource = ds.Tables(0)
GVMembers.DataBind()

lblmembers.Text = "Below is the list of Members:"


Else
lblmembers.Text = "No records found."
End If
Catch ex As Exception
End Try
End If
End Sub

Protected Sub imgmembers_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles imgmembers.Click
If imgmembers.ImageUrl = "~/images/plus.png" Then
pnlmembers.Visible = True
imgmembers.ImageUrl = "~/images/minus.png"
Else
pnlmembers.Visible = False
imgmembers.ImageUrl = "~/images/plus.png"
End If
End Sub
End Class

MYADS.ASPX

<%@ Page Language="VB" MasterPageFile="~/Master_User.master"


AutoEventWireup="false" CodeFile="MyAds.aspx.vb" Inherits="_Default" title="MyAds |
FindHomes.com" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<div class="wrap">
<div>

91
<div class="mid-grid">
<center>
<h2>Your Ads will be listed below</h2>
<table>
<tr align="left">
<td style="padding: 5px 5px">Choose your property ID</td>
<td style="padding: 5px 5px">
<asp:DropDownList ID="ddlpropertyID" class="textbox" runat="server"
Width="252px" Height="30px" AutoPostBack="True">
</asp:DropDownList>
</td>
</tr>
</table>
<br /><br />
<asp:Panel ID="pnlproperty" runat="server">
<table>
<tr style="border: solid 1px black;" align="left">
<td style="padding: 5px 5px;" colspan="2">
<font size="5" color="gray"><asp:Label ID="lblcaption" runat="server"
Text=""></asp:Label></font>
</td>
</tr>

<tr style="border: solid 1px black;" align="left">


<td style="padding: 5px 5px; border: solid 1px black;">
<font size="4" color="black">Property Type: <asp:Label
ID="lbltypeofproperty" runat="server" Text=""></asp:Label></font>
</td>
<td style="padding: 5px 5px">
<font size="4" color="black">City: <asp:Label ID="lblcity" runat="server"
Text=""></asp:Label></font>
</td>
</tr>

<tr style="border: solid 1px black;" align="left">


<td style="padding: 5px 5px; border: solid 1px black;">
<font size="4" color="black">Covered Area: <asp:Label ID="lblarea"
runat="server" Text=""></asp:Label></font>
</td>
<td style="padding: 5px 5px">
<font size="4" color="black">Transaction Type: <asp:Label
ID="lbltransaction" runat="server" Text=""></asp:Label></font>
</td>
</tr>
<tr style="border: solid 1px black;" align="left">
<td style="padding: 5px 5px; border: solid 1px black;">

92
<font size="4" color="black">Expected Price: <asp:Label ID="lblprice"
runat="server" Text=""></asp:Label></font>
</td>
<td style="padding: 5px 5px">
<font size="4" color="black">Sqft Rate: <asp:Label ID="lblsqftprice"
runat="server" Text=""></asp:Label></font>
</td>
</tr>
<tr align="left">
<td style="padding: 5px 5px;" colspan="2" align="center">
<asp:Image ID="imgprop" runat="server"
ImageUrl="images/PropertyImages/na.jpg" Width="130" Height="130" />&nbsp;
<asp:Image ID="imgprop1" runat="server"
ImageUrl="images/PropertyImages/na.jpg" Width="130" Height="130" />&nbsp;
<asp:Image ID="imgprop2" runat="server"
ImageUrl="images/PropertyImages/na.jpg" Width="130" Height="130" />&nbsp;
<asp:Image ID="imgprop3" runat="server"
ImageUrl="images/PropertyImages/na.jpg" Width="130" Height="130" />
</td>
</tr>
<tr align="left">
<td style="padding: 5px 5px;" colspan="2" align="center">
<asp:Button ID="btnedit" runat="server" Text="Edit this AD"
class="css_button1" Width="252px" />&nbsp;&nbsp;&nbsp;
<asp:Button ID="btnremove" runat="server" Text="Remove this AD"
class="css_button" Width="252px" />
</td>
</tr>
</table>
</asp:Panel>
<!--<h3>Upcoming sites/projects</h3>
<marquee>
<asp:Image ID="Image1" runat="server" ImageUrl="images/m1.jpg" style="border-
radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image2" runat="server" ImageUrl="images/m2.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image3" runat="server" ImageUrl="images/m3.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image4" runat="server" ImageUrl="images/m4.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image5" runat="server" ImageUrl="images/m5.jpg"
style="border-radius: 10px;" Height="250"></asp:Image>
</marquee>-->
</center>
</div>
</div>

93
</div>
</asp:Content>

MYADS.VB

Imports ASP.global_asax
Imports System.Data
Imports System.Data.SqlClient

Partial Class _Default


Inherits System.Web.UI.Page
Dim cmd As SqlCommand
Dim da As SqlDataAdapter
Dim ds As DataSet
Dim val As Integer
Dim str As Integer
Dim i, count, value As Integer

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles


Me.Load
If Not Page.IsPostBack Then
connection_create()

Dim email As String


Try
email = Session("LoginId").ToString()
Catch ex As Exception
email = ""
MsgBox("Session Expired. Please Login Again.")
Response.Redirect("LogOut.aspx")
End Try

da = New SqlDataAdapter("select propertyid from PropertyDetails where emailid='" &


email & "' ", con)
ds = New DataSet
da.Fill(ds)
If ds.Tables(0).Rows.Count > 0 Then
ddlpropertyID.Items.Clear()
ddlpropertyID.Items.Add("--Property ID--")
For y = 0 To ds.Tables(0).Rows.Count - 1
ddlpropertyID.Items.Add(ds.Tables(0).Rows(y).Item(0))
Next

End If
pnlproperty.Visible = False
End If

94
End Sub

Protected Sub btnedit_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles btnedit.Click
Try
Response.Redirect("UploadAds.aspx?em=" & ddlpropertyID.Text)
Catch ex As Exception
End Try
End Sub

Protected Sub btnremove_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles btnremove.Click
Try
Dim sqlq As String = ""
sqlq = "Delete from PropertyDetails where propertyid='" & ddlpropertyID.Text & "' "
cmd = New SqlCommand
cmd.Connection = con
cmd.CommandText = sqlq
cmd.ExecuteNonQuery()

MsgBox("Your Advertisements has been removed.", MsgBoxStyle.Information, "")


Response.Redirect("MyAds.aspx")
Catch ex As Exception

End Try
End Sub

Protected Sub ddlpropertyID_SelectedIndexChanged(ByVal sender As Object, ByVal e As


System.EventArgs) Handles ddlpropertyID.SelectedIndexChanged
If ddlpropertyID.Text = "--Property ID--" Then
pnlproperty.Visible = False
Else
pnlproperty.Visible = True

'Extract Data from Table using this property ID.


da = New SqlDataAdapter("select
propertyid,caption,typeofproperty,city,coveredarea,coveredareatype,expectedprice,pricepersqft,tr
ansactiontype,picture1,picture2,picture3,picture4 from PropertyDetails where propertyid='" &
ddlpropertyID.Text & "' ", con)
ds = New DataSet
da.Fill(ds)

If ds.Tables(0).Rows.Count > 0 Then


Dim p1, p2, p3, p4 As String
p1 = "" : p2 = "" : p3 = "" : p4 = ""

95
lblcaption.Text = ds.Tables(0).Rows(0).Item(1)
lblprice.Text = ds.Tables(0).Rows(0).Item(6) & "<font size='3'> INR</font>"
lblsqftprice.Text = "Rs. " & ds.Tables(0).Rows(0).Item(7) & "/-<font size='3'> INR "
lbltypeofproperty.Text = ds.Tables(0).Rows(0).Item(2)
lblcity.Text = ds.Tables(0).Rows(0).Item(3)
lblarea.Text = ds.Tables(0).Rows(0).Item(4) & " " & ds.Tables(0).Rows(0).Item(5)
lbltransaction.Text = ds.Tables(0).Rows(0).Item(8)

Try
p1 = ds.Tables(0).Rows(0).Item(9)
p2 = ds.Tables(0).Rows(0).Item(10)
p3 = ds.Tables(0).Rows(0).Item(11)
p4 = ds.Tables(0).Rows(0).Item(12)
Catch ex As Exception
Exit Sub
End Try

If p1 <> "" Then


imgprop.ImageUrl = "images/PropertyImages/" & p1
Else
imgprop.ImageUrl = "images/PropertyImages/na.jpg"
End If

If p2 <> "" Then


imgprop1.ImageUrl = "images/PropertyImages/" & p2
Else
imgprop1.ImageUrl = "images/PropertyImages/na.jpg"
End If

If p3 <> "" Then


imgprop2.ImageUrl = "images/PropertyImages/" & p3
Else
imgprop2.ImageUrl = "images/PropertyImages/na.jpg"
End If

If p4 <> "" Then


imgprop3.ImageUrl = "images/PropertyImages/" & p4
Else
imgprop3.ImageUrl = "images/PropertyImages/na.jpg"
End If

End If
End If
End Sub
End Class

96
PP.ASPX

<%@ Page Language="VB" MasterPageFile="~/Master_Main.master"


AutoEventWireup="false" CodeFile="PP.aspx.vb" Inherits="_Default" title="Privacy Policy"
%>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<div class="wrap">
<div class="mid-grid">
<h2>Our policies</h2>
<p><br />
<font size="4" color="black">USER INFORMATION</font><br />
To avail certain sites / services on our websites, users are required to provide certain
information for the registration process namely:- a) your name, b) email address, c) sex, d) age,
e) PIN code , f)password etc. The Information as supplied by the users enables us to improve our
sites and provide you the most user-friendly experience.
All required information is service dependent and TIL may use the above said User
information to, maintain, protect, and improve its services (including advertising services) and
for developing new services
Such information will not be considered as sensitive if it is freely available and accessible
in the public domain or is furnished under the Right to Information Act, 2005 or any other law
for the time being in force.
<br /><br />

<font size="4" color="black">COOKIES</font><br />


To improve the responsiveness of the sites for our users, we may use "cookies", or
similar electronic tools to collect information to assign each visitor a unique, random number as
a User Identification (User ID) to understand the user's individual interests using the Identified
Computer. Unless you voluntarily identify yourself (through registration, for example), we will
have no way of knowing who you are, even if we assign a cookie to your computer. The only
personal information a cookie can contain is information you supply (an example of this is when
you ask for our Personalised Horoscope). A cookie cannot read data off your hard drive. Our
advertisers may also assign their own cookies to your browser (if you click on their ads), a
process that we do not control.
Our web servers automatically collect limited information about your computer's
connection to the Internet, including your IP address, when you visit our site. (Your IP address is
a number that lets computers attached to the Internet know where to send you data -- such as the
web pages you view.) Your IP address does not identify you personally. We use this information
to deliver our web pages to you upon request, to tailor our site to the interests of our users, to
measure traffic within our site and let advertisers know the geographic locations from where our
visitors come.
<br /><br />

<font size="4" color="black">LINK TO THIRD PARTY SITES</font><br />


TIL includes links to other websites. Such sites are governed by their respective privacy
policies, which are beyond our control. Once you leave our servers (you can tell where you are

97
by checking the URL in the location bar on your browser), use of any information you provide is
governed by the privacy policy of the operator of the site you are visiting. That policy may differ
from ours. If you can't find the privacy policy of any of these sites via a link from the site's
homepage, you should contact the site directly for more information.
When we present information to our advertisers -- to help them understand our audience
and confirm the value of advertising on our website -- it is usually in the form of aggregated
statistics on traffic to various pages within our site. When you register with TIL, we contact you
from time to time about updation of your content to provide the users such features that we
believe may benefit you.
<br /><br />

<font size="4" color="black">INFORMATION SHARING</font><br />


TIL shares the sensitive personal information to any third party without obtaining the
prior consent of the User in the following limited circumstances:
<br />
a) When it is requested or required by law or by any court or governmental agency or
authority to disclose, for the purpose of verification of identity, or for the prevention, detection,
investigation including cyber incidents, or for prosecution and punishment of offences. These
disclosures are made in good faith and belief that such disclosure is reasonably necessary for
enforcing these Terms; for complying with the applicable laws and regulations.
<br />
b) TIL proposes to share such information within its group companies and officers and
employees of such group companies for the purpose of processing personal information on its
behalf. We also ensure that these recipients of such information agree to process such
information based on our instructions and in compliance with this Privacy Policy and any other
appropriate confidentiality and security measures.
<br /><br />

<font size="4" color="black">ACCESSING AND UPDATING PERSONAL


INFORMATION</font><br />
When you use TIL's websites, we make good faith efforts to provide you, as and when
requested by you, with access to your personal information and shall further ensure that any
personal information or sensitive personal data or information found to be inaccurate or deficient
shall be corrected or amended as feasible, subject to any requirement for such personal
information or sensitive personal data or information to be retained by law or for legitimate
business purposes. We ask individual users to identify themselves and the information requested
to be accessed, corrected or removed before processing such requests, and we may decline to
process requests that are unreasonably repetitive or systematic, require disproportionate technical
effort, jeopardize the privacy of others, or would be extremely impractical (for instance, requests
concerning information residing on backup tapes), or for which access is not otherwise required.
In any case where we provide information access and correction, we perform this service free of
charge, except if doing so would require a disproportionate effort. Because of the way we
maintain certain services, after you delete your information, residual copies may take a period of
time before they are deleted from our active servers and may remain in our backup systems.
<br /><br />

98
<font size="4" color="black">INFORMATION SECURITY</font><br />
We take appropriate security measures to protect against unauthorized access to or
unauthorized alteration, disclosure or destruction of data. These include internal reviews of our
data collection, storage and processing practices and security measures, including appropriate
encryption and physical security measures to guard against unauthorized access to systems where
we store personal data.
All information gathered on TIL is securely stored within the TIL controlled database.
The database is stored on servers secured behind a firewall; access to the servers is password-
protected and is strictly limited. However, as effective as our security measures are, no security
system is impenetrable. We cannot guarantee the security of our database, nor can we guarantee
that information you supply will not be intercepted while being transmitted to us over the
Internet. And, of course, any information you include in a posting to the discussion areas is
available to anyone with Internet access.
However the internet is an ever evolving medium. We may change our privacy policy
from time to time to incorporate necessary future changes. Of course, our use of any information
we gather will always be consistent with the policy under which the information was collected,
regardless of what the new policy may be.
<br /></p>
</div>
</div>
</asp:Content>

PP.VB

Partial Class _Default


Inherits System.Web.UI.Page

End Class

PPU.ASPX

<%@ Page Language="VB" MasterPageFile="~/Master_User.master"


AutoEventWireup="false" CodeFile="PPU.aspx.vb" Inherits="_Default" title="Privacy Policy |
FindHomes.com" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<div class="wrap">
<div>
<div class="mid-grid">
<h2>Our policies</h2>
<p><br />
<font size="4" color="black">USER INFORMATION</font><br />
To avail certain sites / services on our websites, users are required to provide certain
information for the registration process namely:- a) your name, b) email address, c) sex, d) age,
e) PIN code , f) credit card or debit card details g) medical records and history h) sexual

99
orientation, i) biometric information, j) password etc., and / or your occupation, interests, and the
like.. The Information as supplied by the users enables us to improve our sites and provide you
the most user-friendly experience.
<br /><br />
All required information is service dependent and TIL may use the above said User
information to, maintain, protect, and improve its services (including advertising services) and
for developing new services
<br /><br />
Such information will not be considered as sensitive if it is freely available and accessible
in the public domain or is furnished under the Right to Information Act, 2005 or any other law
for the time being in force.
<br /><br /><br />

<font size="4" color="black">COOKIES</font><br />


To improve the responsiveness of the sites for our users, we may use "cookies", or
similar electronic tools to collect information to assign each visitor a unique, random number as
a User Identification (User ID) to understand the user's individual interests using the Identified
Computer. Unless you voluntarily identify yourself (through registration, for example), we will
have no way of knowing who you are, even if we assign a cookie to your computer. The only
personal information a cookie can contain is information you supply (an example of this is when
you ask for our Personalised Horoscope). A cookie cannot read data off your hard drive. Our
advertisers may also assign their own cookies to your browser (if you click on their ads), a
process that we do not control.
<br /><br />
Our web servers automatically collect limited information about your computer's
connection to the Internet, including your IP address, when you visit our site. (Your IP address is
a number that lets computers attached to the Internet know where to send you data -- such as the
web pages you view.) Your IP address does not identify you personally. We use this information
to deliver our web pages to you upon request, to tailor our site to the interests of our users, to
measure traffic within our site and let advertisers know the geographic locations from where our
visitors come.
<br /><br /><br />

<font size="4" color="black">LINK TO THIRD PARTY SITES</font><br />


TIL includes links to other websites. Such sites are governed by their respective privacy
policies, which are beyond our control. Once you leave our servers (you can tell where you are
by checking the URL in the location bar on your browser), use of any information you provide is
governed by the privacy policy of the operator of the site you are visiting. That policy may differ
from ours. If you can't find the privacy policy of any of these sites via a link from the site's
homepage, you should contact the site directly for more information.
<br /><br />
When we present information to our advertisers -- to help them understand our audience
and confirm the value of advertising on our website -- it is usually in the form of aggregated
statistics on traffic to various pages within our site. When you register with TIL, we contact you
from time to time about updation of your content to provide the users such features that we
believe may benefit you.

100
<br /><br /><br />

<font size="4" color="black">INFORMATION SHARING</font><br />


TIL shares the sensitive personal information to any third party without obtaining the
prior consent of the User in the following limited circumstances:
<br /><br />
a) When it is requested or required by law or by any court or governmental agency or
authority to disclose, for the purpose of verification of identity, or for the prevention, detection,
investigation including cyber incidents, or for prosecution and punishment of offences. These
disclosures are made in good faith and belief that such disclosure is reasonably necessary for
enforcing these Terms; for complying with the applicable laws and regulations.
<br /><br />
b) TIL proposes to share such information within its group companies and officers and
employees of such group companies for the purpose of processing personal information on its
behalf. We also ensure that these recipients of such information agree to process such
information based on our instructions and in compliance with this Privacy Policy and any other
appropriate confidentiality and security measures.
<br /><br /><br />

<font size="4" color="black">ACCESSING AND UPDATING PERSONAL


INFORMATION</font><br />
When you use TIL's websites, we make good faith efforts to provide you, as and when
requested by you, with access to your personal information and shall further ensure that any
personal information or sensitive personal data or information found to be inaccurate or deficient
shall be corrected or amended as feasible, subject to any requirement for such personal
information or sensitive personal data or information to be retained by law or for legitimate
business purposes. We ask individual users to identify themselves and the information requested
to be accessed, corrected or removed before processing such requests, and we may decline to
process requests that are unreasonably repetitive or systematic, require disproportionate technical
effort, jeopardize the privacy of others, or would be extremely impractical (for instance, requests
concerning information residing on backup tapes), or for which access is not otherwise required.
In any case where we provide information access and correction, we perform this service free of
charge, except if doing so would require a disproportionate effort. Because of the way we
maintain certain services, after you delete your information, residual copies may take a period of
time before they are deleted from our active servers and may remain in our backup systems.
<br /><br /><br />

<font size="4" color="black">INFORMATION SECURITY</font><br />


We take appropriate security measures to protect against unauthorized access to or
unauthorized alteration, disclosure or destruction of data. These include internal reviews of our
data collection, storage and processing practices and security measures, including appropriate
encryption and physical security measures to guard against unauthorized access to systems where
we store personal data.
<br /><br />
All information gathered on TIL is securely stored within the TIL controlled database.
The database is stored on servers secured behind a firewall; access to the servers is password-

101
protected and is strictly limited. However, as effective as our security measures are, no security
system is impenetrable. We cannot guarantee the security of our database, nor can we guarantee
that information you supply will not be intercepted while being transmitted to us over the
Internet. And, of course, any information you include in a posting to the discussion areas is
available to anyone with Internet access.
<br /><br />
However the internet is an ever evolving medium. We may change our privacy policy
from time to time to incorporate necessary future changes. Of course, our use of any information
we gather will always be consistent with the policy under which the information was collected,
regardless of what the new policy may be.
<br /><br /></p>
</div>
</div>
</div>
</asp:Content>

PPU.VB

Partial Class _Default


Inherits System.Web.UI.Page

End Class

PROFILEUSER.ASPX

<%@ Page Language="VB" MasterPageFile="~/Master_User.master"


AutoEventWireup="false" CodeFile="ProfileUser.aspx.vb" Inherits="_Default" title="Profile |
FindHomes.com" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<div class="wrap">
<div>
<div class="mid-grid">
<center>
<h2>Contact Information</h2>
<table style="border:1px; border-color:Black; width:750px" align="center"
cellpadding="4" cellspacing="3">
<tr align="left">
<td colspan="2" align="center">
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
HeaderText="To save the changes, kindly solve the below page errors:" />
</td>
</tr>
<tr align="left">
<td style="padding: 5px 5px">Customer ID</td>
<td style="padding: 5px 5px" align="center"><asp:Label ID="lblid" runat="server"
Text="Not Available"></asp:Label></td>

102
</tr>
<tr align="left">
<td style="padding: 5px 5px; width: 180px;">Name</td>
<td style="padding: 5px 5px" align="center"><asp:TextBox ID="txtname"
class="txtbox" runat="server" MaxLength="50" Width="252px"></asp:TextBox></td>
</tr>
<tr align="left">
<td style="padding: 5px 5px">Gender</td>
<td style="padding: 5px 5px" align="center">
<asp:DropDownList ID="ddlgender" runat="server" Width="253px"
Height="30" class="txtbox">
<asp:ListItem>Male</asp:ListItem>
<asp:ListItem>Female</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr align="left">
<td style="padding: 5px 5px">Date of Birth</td>
<td style="padding: 5px 5px" align="center">
<asp:DropDownList ID="ddlday" runat="server" Width="77px" class="txtbox"
Height="30">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
<asp:ListItem>4</asp:ListItem>
<asp:ListItem>5</asp:ListItem>
<asp:ListItem>6</asp:ListItem>
<asp:ListItem>7</asp:ListItem>
<asp:ListItem>8</asp:ListItem>
<asp:ListItem>9</asp:ListItem>
<asp:ListItem>10</asp:ListItem>
<asp:ListItem>11</asp:ListItem>
<asp:ListItem>12</asp:ListItem>
<asp:ListItem>13</asp:ListItem>
<asp:ListItem>14</asp:ListItem>
<asp:ListItem>15</asp:ListItem>
<asp:ListItem>16</asp:ListItem>
<asp:ListItem>17</asp:ListItem>
<asp:ListItem>18</asp:ListItem>
<asp:ListItem>19</asp:ListItem>
<asp:ListItem>20</asp:ListItem>
<asp:ListItem>21</asp:ListItem>
<asp:ListItem>22</asp:ListItem>
<asp:ListItem>23</asp:ListItem>
<asp:ListItem>24</asp:ListItem>
<asp:ListItem>25</asp:ListItem>

103
<asp:ListItem>26</asp:ListItem>
<asp:ListItem>27</asp:ListItem>
<asp:ListItem>28</asp:ListItem>
<asp:ListItem>29</asp:ListItem>
<asp:ListItem>30</asp:ListItem>
<asp:ListItem>31</asp:ListItem>
</asp:DropDownList>
&nbsp;
<asp:DropDownList ID="ddlmonth" runat="server" Width="77px"
class="txtbox" Height="30">
<asp:ListItem>Jan</asp:ListItem>
<asp:ListItem>Feb</asp:ListItem>
<asp:ListItem>Mar</asp:ListItem>
<asp:ListItem>Apr</asp:ListItem>
<asp:ListItem>May</asp:ListItem>
<asp:ListItem>Jun</asp:ListItem>
<asp:ListItem>Jul</asp:ListItem>
<asp:ListItem>Aug</asp:ListItem>
<asp:ListItem>Sep</asp:ListItem>
<asp:ListItem>Oct</asp:ListItem>
<asp:ListItem>Nov</asp:ListItem>
<asp:ListItem>Dec</asp:ListItem>
</asp:DropDownList>
&nbsp;
<asp:DropDownList ID="ddlyear" runat="server" Width="78px" class="txtbox"
Height="30">
<asp:ListItem>1985</asp:ListItem>
<asp:ListItem>1986</asp:ListItem>
<asp:ListItem>1987</asp:ListItem>
<asp:ListItem>1988</asp:ListItem>
<asp:ListItem>1989</asp:ListItem>
<asp:ListItem>1990</asp:ListItem>
<asp:ListItem>1991</asp:ListItem>
<asp:ListItem>1992</asp:ListItem>
<asp:ListItem>1993</asp:ListItem>
<asp:ListItem>1994</asp:ListItem>
<asp:ListItem>1995</asp:ListItem>
<asp:ListItem>1996</asp:ListItem>
<asp:ListItem>1997</asp:ListItem>
<asp:ListItem>1998</asp:ListItem>
<asp:ListItem>1999</asp:ListItem>
<asp:ListItem>2000</asp:ListItem>
<asp:ListItem>2001</asp:ListItem>
<asp:ListItem>2002</asp:ListItem>
<asp:ListItem>2003</asp:ListItem>
<asp:ListItem>2004</asp:ListItem>

104
</asp:DropDownList>
</td>
</tr>
<tr align="left">
<td colspan="2">
<br />
<hr style="color:Gray"; />
</td>
</tr>
<tr align="left">
<td colspan="2" style="padding: 5px 5px" align="center"><u>Current
Address</u></td>
</tr>
<tr align="left">
<td valign="top" style="padding: 5px 5px">Building/Street/Area</td>
<td style="padding: 5px 5px" align="center"><asp:TextBox ID="txtaddress"
runat="server" TextMode="MultiLine" MaxLength="220" Width="252px" class="txtbox"
Height="88px"></asp:TextBox></td>
</tr>
<tr align="left">
<td style="padding: 5px 5px">Country</td>
<td style="padding: 5px 5px" align="center"><asp:TextBox ID="txtcountry"
class="txtbox" runat="server" MaxLength="50" Width="252px"></asp:TextBox></td>
</tr>
<tr align="left">
<td style="padding: 5px 5px">State</td>
<td style="padding: 5px 5px" align="center"><asp:TextBox ID="txtstate"
runat="server" class="txtbox" MaxLength="50" Width="252px"></asp:TextBox></td>
</tr>
<tr align="left">
<td style="padding: 5px 5px">City</td>
<td style="padding: 5px 5px" align="center"><asp:TextBox ID="txtcity"
runat="server" class="txtbox" MaxLength="50" Width="252px"></asp:TextBox></td>
</tr>
<tr align="left">
<td style="padding: 5px 5px; width: 180px;">Pincode</td>
<td style="padding: 5px 5px" align="center"><asp:TextBox ID="txtpincode"
runat="server" class="textbox" MaxLength="6" Width="252px"></asp:TextBox></td>
</tr>
<tr align="left">
<td colspan="2">
<br />
<hr style="color:Gray"; />
</td>
</tr>
<tr align="left">

105
<td colspan="2" style="padding: 5px 5px" align="center"><u>Contact
Information</u></td>
</tr>
<tr align="left">
<td style="padding: 5px 5px">Contact Number</td>
<td style="padding: 5px 5px" align="center"><asp:TextBox ID="txtcontact"
class="txtbox" runat="server" MaxLength="10" Width="252px"></asp:TextBox></td>
</tr>
<tr align="left">
<td style="padding: 5px 5px">Email ID</td>
<td style="padding: 5px 5px" align="center"><asp:TextBox ID="txtemailid"
class="txtbox" ReadOnly="true" runat="server" MaxLength="50"
Width="252px"></asp:TextBox></td>
</tr>
<tr align="left">
<td style="padding: 5px 5px">&nbsp;</td>
<td align="center" style="padding: 5px 5px">
<asp:Button ID="btnsave" runat="server" Text="Save" Width="252px"
class="css_button1" Height="37px"></asp:Button>
&nbsp;&nbsp;
</td>
</tr>
<tr align="left">
<td colspan="2">
<asp:RequiredFieldValidator ID="rfvname" runat="server"
ErrorMessage="Enter your name." ControlToValidate="txtname"
Display="None"></asp:RequiredFieldValidator>

<asp:CustomValidator ID="cvdob" runat="server"


ErrorMessage="Enter valid date of birth"
ClientValidationFunction="cvdob_ServerValidate"
ControlToValidate="ddlyear"
Display="None"></asp:CustomValidator>

<asp:RequiredFieldValidator ID="rfv1" runat="server"


ErrorMessage="Enter Building/street/area name"
ControlToValidate="txtaddress"
Display="None"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="rfv2" runat="server"
ErrorMessage="Enter country name" ControlToValidate="txtcountry"
Display="None"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="rfv3" runat="server"
ErrorMessage="Enter state." ControlToValidate="txtstate"
Display="None"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="rfv4" runat="server" ErrorMessage="Enter
city."

106
ControlToValidate="txtcity" Display="None"></asp:RequiredFieldValidator>

<asp:RequiredFieldValidator ID="rfv5" runat="server"


ErrorMessage="Enter pincode." ControlToValidate="txtpincode"
Display="None"></asp:RequiredFieldValidator>
<br />
<asp:CustomValidator ID="cv1" runat="server"
ErrorMessage="Pincode must be of 6 digit number."
ClientValidationFunction="cv1_ServerValidate"
ControlToValidate="txtpincode"
Display="None"></asp:CustomValidator>

<asp:RequiredFieldValidator ID="rfvno" runat="server"


ErrorMessage="Enter your contact number." ControlToValidate="txtcontact"
Display="None"></asp:RequiredFieldValidator>
<asp:CustomValidator ID="cvno" runat="server"
ErrorMessage="Contact number must be of 10 digit numeric value."
ClientValidationFunction="cvno_ServerValidate"
ControlToValidate="txtcontact"
Display="None"></asp:CustomValidator>

<asp:RequiredFieldValidator ID="rfvemail" runat="server"


ErrorMessage="Enter your Email ID." ControlToValidate="txtemailid"
Display="None"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="revemail" runat="server"
ErrorMessage="Invalid Email ID." ControlToValidate="txtemailid"
Display="None"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-
.]\w+)*"></asp:RegularExpressionValidator>
</td>
</tr>
</table>
</center>
</div>
</div>
</div>
</asp:Content>

PROFILEUSER.ASPX.VB

Imports ASP.global_asax
Imports System.Data
Imports System.Data.SqlClient

Partial Class _Default


Inherits System.Web.UI.Page

107
Dim cmd As SqlCommand
Dim da As SqlDataAdapter
Dim ds As DataSet
Dim val As Integer
Dim str As Integer
Dim i, count, value As Integer

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles


Me.Load
If Not Page.IsPostBack Then
connection_create()

'Fill Email ID box


Dim email As String = ""
Try
email = Session("LoginId").ToString()
Catch ex As Exception
email = ""
End Try

'Fill ID.
da = New SqlDataAdapter("select * from Customer where emailid='" & email & "' ",
con)
ds = New DataSet
da.Fill(ds)
If ds.Tables(0).Rows.Count > 0 Then
'code for fill all controls from customer table and disable all controls with edit button.
lblid.Text = ds.Tables(0).Rows(0).Item(1)
txtname.Text = ds.Tables(0).Rows(0).Item(2)
ddlgender.Text = ds.Tables(0).Rows(0).Item(3)
'CODE TO BREAK DOWN DATE OF BIRTH.
Dim dob As String = ""
Dim ch As Char
Dim str As String = ""
Dim d, m, y As Boolean : d = False : m = False : y = False
Dim i As Integer

dob = ds.Tables(0).Rows(0).Item(4)
For i = 1 To dob.Length
ch = Mid$(dob, i, 1)
If ch = "/" Then
If d = False Then
d = True
ddlday.Text = str
str = ""
GoTo FL

108
End If

If m = False Then
m = True
ddlmonth.Text = str
str = ""
GoTo FL
End If
Else
str = str & ch
End If
FL: Next
If str <> "" Then
y = True
ddlyear.Text = str
str = ""
End If

txtaddress.Text = ds.Tables(0).Rows(0).Item(5)
txtcountry.Text = ds.Tables(0).Rows(0).Item(6)
txtstate.Text = ds.Tables(0).Rows(0).Item(7)
txtcity.Text = ds.Tables(0).Rows(0).Item(8)
txtpincode.Text = ds.Tables(0).Rows(0).Item(9)
txtcontact.Text = ds.Tables(0).Rows(0).Item(10)
txtemailid.Text = ds.Tables(0).Rows(0).Item(11)

disable()
btnsave.Enabled = True
btnsave.Text = "Edit"
btnsave.CssClass = "css_button"
Else

'code for fill id from account table and enable all controls with save button.
da = New SqlDataAdapter("select accid from AccountDetails where emailid='" &
email & "' ", con)
ds = New DataSet
da.Fill(ds)
If ds.Tables(0).Rows.Count > 0 Then
lblid.Text = ds.Tables(0).Rows(0).Item(0)
txtemailid.Text = Session("LoginId").ToString()
Else
MsgBox("Session expired. Please login again.", MsgBoxStyle.Information, "Error
occurred")
Response.Redirect("LogOut.aspx")
End If
enable()

109
btnsave.Enabled = True
btnsave.CssClass = "css_button1"
btnsave.Text = "Save"
End If
End If
End Sub

Private Sub enable()


txtname.Enabled = True
ddlgender.Enabled = True

ddlday.Enabled = True
ddlmonth.Enabled = True
ddlyear.Enabled = True

txtaddress.Enabled = True
txtcountry.Enabled = True
txtstate.Enabled = True
txtcity.Enabled = True
txtpincode.Enabled = True
txtcontact.Enabled = True
End Sub

Private Sub disable()


txtname.Enabled = False
ddlgender.Enabled = False

ddlday.Enabled = False
ddlmonth.Enabled = False
ddlyear.Enabled = False

txtaddress.Enabled = False
txtcountry.Enabled = False
txtstate.Enabled = False
txtcity.Enabled = False
txtpincode.Enabled = False
txtcontact.Enabled = False
End Sub

Private Sub autogenerate()


da = New SqlDataAdapter("select * from Customer", con)
ds = New DataSet
da.Fill(ds)
count = ds.Tables(0).Rows.Count

Dim arr As New ArrayList

110
arr.Clear()
If count = 0 Then
value = 1
Else
For a = 0 To count - 1
arr.Add(ds.Tables(0).Rows(a).Item(0))
arr.Sort()
Next

For Each sss In arr


value = sss
Next

value = value + 1
End If
End Sub

Protected Sub btnsave_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles btnsave.Click
If btnsave.Text = "Edit" Then

enable()
btnsave.Text = "Save"
btnsave.CssClass = "css_button1"
btnsave.Enabled = True

ElseIf btnsave.Text = "Save" Then


If Page.IsValid = True Then
Dim email As String = ""
Dim sqlq As String = ""
Try
email = Session("LoginId").ToString()
Catch ex As Exception
email = ""
End Try
da = New SqlDataAdapter("select * from Customer where emailid='" & email & "' ",
con)
ds = New DataSet
da.Fill(ds)
If ds.Tables(0).Rows.Count > 0 Then
'Code for update
sqlq = "update Customer set name='" & txtname.Text & "' ,gender='" &
ddlgender.Text & "' ,DOB='" & ddlday.Text & "/" & ddlmonth.Text & "/" & ddlyear.Text & "'
,address='" & txtaddress.Text & "' ,country='" & txtcountry.Text & "' ,state='" & txtstate.Text &
"' ,city='" & txtcity.Text & "' ,pincode='" & txtpincode.Text & "' ,contactno='" & txtcontact.Text
& "' ,emailid='" & txtemailid.Text & "' where customerid='" & lblid.Text & "' "

111
cmd = New SqlCommand
cmd.Connection = con
cmd.CommandText = sqlq
cmd.ExecuteNonQuery()
MsgBox("Information saved.", MsgBoxStyle.OkOnly, "Success")
disable()
btnsave.Enabled = True
btnsave.Text = "Edit"
btnsave.CssClass = "css_button"
Else
'Code for save
autogenerate()
sqlq = "insert into Customer values(" & value & ",'" & lblid.Text & "','" &
txtname.Text & "','" & ddlgender.Text & "','" & ddlday.Text & "/" & ddlmonth.Text & "/" &
ddlyear.Text & "','" & txtaddress.Text & "','" & txtcountry.Text & "','" & txtstate.Text & "','" &
txtcity.Text & "','" & txtpincode.Text & "','" & txtcontact.Text & "','" & txtemailid.Text & "')"
cmd = New SqlCommand
cmd.Connection = con
cmd.CommandText = sqlq
cmd.ExecuteNonQuery()
MsgBox("Information saved.", MsgBoxStyle.OkOnly, "Success")
disable()
btnsave.Enabled = True
btnsave.Text = "Edit"
btnsave.CssClass = "css_button"
End If
Else
ValidationSummary1.ShowMessageBox = True
End If
End If
End Sub

Protected Sub cvno_ServerValidate(ByVal source As Object, ByVal args As


System.Web.UI.WebControls.ServerValidateEventArgs) Handles cvno.ServerValidate
If Len(Trim(txtcontact.Text)) < 10 Then
args.IsValid = False
ElseIf IsNumeric(txtcontact.Text) = False Then
args.IsValid = False
Else
args.IsValid = True
End If
End Sub

Protected Sub cv1_ServerValidate(ByVal source As Object, ByVal args As


System.Web.UI.WebControls.ServerValidateEventArgs) Handles cv1.ServerValidate
If Len(Trim(txtpincode.Text)) < 6 Then

112
args.IsValid = False
ElseIf IsNumeric(txtpincode.Text) = False Then
args.IsValid = False
Else
args.IsValid = True
End If
End Sub

Protected Sub cvdob_ServerValidate(ByVal source As Object, ByVal args As


System.Web.UI.WebControls.ServerValidateEventArgs) Handles cvdob.ServerValidate
Dim d, m, y As String : d = "" : m = "" : y = ""
Dim d1, m1, y1 As String : d1 = "" : m1 = "" : y1 = ""
Dim date1, date2 As Date

d = Now.Date.Day
m = Now.Date.Month
y = Now.Date.Year

d1 = ddlday.Text
m1 = ddlmonth.Text
y1 = ddlyear.Text

date1 = CDate(m & "/" & d & "/" & y)

date2 = d1 & "/" & m1 & "/" & y1

Dim dd As String = DateDiff(DateInterval.Year, date2, date1)


If dd < 18 Then
args.IsValid = False
Else
args.IsValid = True
End If
End Sub
End Class

REPORTS.ASPX

<%@ Page Language="VB" MasterPageFile="~/Master_Admin.master"


AutoEventWireup="false" CodeFile="Reports.aspx.vb" Inherits="_Default" title="Reports |
FindHomes.com" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<div class="wrap">
<div>
<div class="mid-grid">

113
<center>
<h2>Click on below link, to generate reports</h2>
<p>
<a href="frmmemberreport.aspx" style="color:blue" target="_blank">1.
Member&#39;s
Information.</a><br />
<a href="frmpropertyrpt.aspx" style="color:blue" target="_blank">2. Property
Ads.</a><br />
<a href="frmcomplaintrpt.aspx" style="color:blue" target="_blank">3.
Complaints.</a><br />
</p>
<h2>Upcoming sites/projects</h2>
<marquee>
<asp:Image ID="Image1" runat="server" ImageUrl="images/m1.jpg" style="border-
radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image2" runat="server" ImageUrl="images/m2.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image3" runat="server" ImageUrl="images/m3.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image4" runat="server" ImageUrl="images/m4.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image5" runat="server" ImageUrl="images/m5.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image></marquee>
</center>
</div>
</div>
</div>
</asp:Content>

REPORTS.ASPX.VB

Partial Class _Default


Inherits System.Web.UI.Page

End Class

SEARCHADMIN.ASPX

<%@ Page Language="VB" MasterPageFile="~/Master_Admin.master"


AutoEventWireup="false" CodeFile="Searchadmin.aspx.vb" Inherits="_Default" title="Search |
FindHomes.com" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

114
<div class="wrap">
<div>
<div class="mid-grid">
<center>
<h2>Your Happy Home Journey Begins Here...</h2>
<table>
<tr>
<td style="padding: 5px 5px">
<asp:TextBox ID="txtcity" placeholder=" Search Locality" runat="server"
MaxLength="30" Width="600px" Height="35" class="txtbox"></asp:TextBox>
&nbsp;<asp:DropDownList ID="ddlcategory" runat="server" Width="230px"
class="textbox" Height="38">
<asp:ListItem>--Property Type--</asp:ListItem>
<asp:ListItem>Multistorey Apartment</asp:ListItem>
<asp:ListItem>Builder Floor Apartment</asp:ListItem>
<asp:ListItem Value="Residental House">Residental House</asp:ListItem>
<asp:ListItem>Villa</asp:ListItem>
<asp:ListItem>Penthouse</asp:ListItem>
<asp:ListItem>Studio Apartment</asp:ListItem>
<asp:ListItem>Office IT Park</asp:ListItem>
<asp:ListItem>Commercial Shop</asp:ListItem>
<asp:ListItem>Commercial Showroom</asp:ListItem>
<asp:ListItem>Commercial Land</asp:ListItem>
<asp:ListItem>Warehouse</asp:ListItem>
<asp:ListItem>Other</asp:ListItem>
</asp:DropDownList>
&nbsp;<asp:Button ID="btnsearch" class="css_button1" runat="server"
Text="Search Now" Width="150px" Height="38" />
</td>
</tr>
</table>
<br />
<asp:Label ID="lblres" runat="server" Text=""></asp:Label><br />
<asp:Label ID="lblerror" runat="server" Text="" Font-Bold="True" ForeColor="Red"
Font-Size="Medium"></asp:Label>

<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">


</asp:ToolkitScriptManager>

<asp:AutoCompleteExtender ID="txtName_AutoCompleteExtender" runat="server"


DelimiterCharacters="" Enabled="True" ServiceMethod="GetCompletionList"
ServicePath="" TargetControlID="txtcity" UseContextKey="True"
MinimumPrefixLength="1" CompletionInterval="10" EnableCaching="true"
CompletionSetCount="3">
</asp:AutoCompleteExtender>

115
</center>
</div>
</div>
</div>
</asp:Content>

SEARCHADMIN.ASPX.VB

Imports ASP.global_asax
Imports System.Data
Imports System.Data.SqlClient
Imports System.Collections.Generic
Imports System.Configuration

Partial Class _Default


Inherits System.Web.UI.Page
Dim cmd As SqlCommand
Dim da As SqlDataAdapter
Dim ds As DataSet
Dim val As Integer
Dim str As String
Dim i, count, value As Integer
Dim pic As String

<System.Web.Services.WebMethodAttribute()>
<System.Web.Script.Services.ScriptMethodAttribute()> Public Shared Function
GetCompletionList(ByVal prefixText As String, ByVal count As Integer, ByVal contextKey As
String) As String()
connection_create()
Dim cmd As New SqlCommand("SELECT locality FROM PropertyDetails", con)
Dim oReader As SqlDataReader
Dim CompletionSet As New List(Of String)()
oReader = cmd.ExecuteReader(CommandBehavior.CloseConnection)
While oReader.Read()
CompletionSet.Add(oReader("locality").ToString())
End While
Return CompletionSet.ToArray()
End Function

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles


Me.Load
Dim category As String = ""
Dim locality As String = ""
pic = ""
Try

116
category = Request.QueryString("category").ToString
Catch ex As Exception
category = ""
End Try

Try
locality = Request.QueryString("locality").ToString
Catch ex As Exception
locality = ""
End Try

If category = "" And locality = "" Then


If Page.IsPostBack = False Then
Try
str = ""
connection_create()
da = New SqlDataAdapter("select * from PropertyDetails Order by srno DESC",
con)
ds = New DataSet
da.Fill(ds)

If ds.Tables(0).Rows.Count > 0 Then


'Display all properties in desc order.
str = str & "<table style='Width:800px'>"
str = str & "<tr><td colspan='2' align='right'><font size='2'
color='black'><br/>For more details click on the property image.</font></td></tr>"
str = str & "<tr><td colspan='2'><hr style='color:gray' /></td></tr>"
For y = 0 To ds.Tables(0).Rows.Count - 1

If ds.Tables(0).Rows(y).Item(28) <> "" Then


pic = ds.Tables(0).Rows(y).Item(28)

ElseIf ds.Tables(0).Rows(y).Item(29) <> "" Then


pic = ds.Tables(0).Rows(y).Item(29)

ElseIf ds.Tables(0).Rows(y).Item(30) <> "" Then


pic = ds.Tables(0).Rows(y).Item(30)

ElseIf ds.Tables(0).Rows(y).Item(31) <> "" Then


pic = ds.Tables(0).Rows(y).Item(31)

End If

str = str & "<tr><td valign='top' style='Width:190px'>"

117
str = str & "<a href='Summary.aspx?pid=" & ds.Tables(0).Rows(y).Item(1) & "
' ><img src=images/PropertyImages/" & pic & " style='Width:180px; Height:180px; vertical-
align:top;' /></a>"
str = str & "</td>"
str = str & "<td>"
str = str & "<font size='5' color='gray'>" & ds.Tables(0).Rows(y).Item(2) &
"</font><font size='3' color='black'>&nbsp;&nbsp;&nbsp;by&nbsp;&nbsp;" &
ds.Tables(0).Rows(y).Item(4) &
"</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;<font size='5' color='black'><img src='images/rup.png' style='Width:
17px; Height: 17px;' />" & ds.Tables(0).Rows(y).Item(15) & "</font><br />"
str = str & "<font size='3' color='blue'>" & ds.Tables(0).Rows(y).Item(1) &
"</font><br /><br />"
str = str & "<font size='5' color='black'>" & ds.Tables(0).Rows(y).Item(6) &
"</font> <font size='3'>in " & ds.Tables(0).Rows(y).Item(9) & "</font><br />"
str = str & "<font size='4' color='black'>Sq-ft Rate: Rs. " &
ds.Tables(0).Rows(y).Item(16) & "/-</font><br /><br />"
str = str & "<font size='4' color='black'>" & ds.Tables(0).Rows(y).Item(23) & "
| " & ds.Tables(0).Rows(y).Item(24) & " | Possession in " & ds.Tables(0).Rows(y).Item(25) &
"/" & ds.Tables(0).Rows(y).Item(26) & "</font><br />"
str = str & "<font size='4' color='black'><br />Covered Area: " &
ds.Tables(0).Rows(y).Item(11) & " " & ds.Tables(0).Rows(y).Item(12) & "</font>"
str = str & "</td>"
str = str & "</tr>"
str = str & "<tr><td colspan='2'><hr style='color:gray' /></td></tr>"
Next
str = str & "</table>"
lblres.Text = str
Else
lblerror.Text = "Properties not found."
lblres.Text = ""
End If
Catch ex As Exception
End Try
End If
Else
'Display products via QS.
Try
str = ""
connection_create()
da = New SqlDataAdapter("select * from PropertyDetails where typeofproperty=" &
category & " and locality=" & locality & " ", con)
ds = New DataSet
da.Fill(ds)

If ds.Tables(0).Rows.Count > 0 Then

118
str = str & "<table style='Width:800px'>"
str = str & "<tr><td colspan='2' align='right'><font size='2' color='black'><br/>For
more details click on the property image.</font></td></tr>"
str = str & "<tr><td colspan='2'><hr style='color:gray' /></td></tr>"
For y = 0 To ds.Tables(0).Rows.Count - 1

If ds.Tables(0).Rows(y).Item(28) <> "" Then


pic = ds.Tables(0).Rows(y).Item(28)

ElseIf ds.Tables(0).Rows(y).Item(29) <> "" Then


pic = ds.Tables(0).Rows(y).Item(29)

ElseIf ds.Tables(0).Rows(y).Item(30) <> "" Then


pic = ds.Tables(0).Rows(y).Item(30)

ElseIf ds.Tables(0).Rows(y).Item(31) <> "" Then


pic = ds.Tables(0).Rows(y).Item(31)

End If

str = str & "<tr><td valign='top' style='Width:190px'>"


str = str & "<a href='Summary.aspx?pid=" & ds.Tables(0).Rows(y).Item(1) & " '
><img src=images/PropertyImages/" & pic & " style='Width:180px; Height:180px; vertical-
align:top;' /></a>"
str = str & "</td>"
str = str & "<td>"
str = str & "<font size='5' color='gray'>" & ds.Tables(0).Rows(y).Item(2) &
"</font><font size='3' color='black'>&nbsp;&nbsp;&nbsp;by&nbsp;&nbsp;" &
ds.Tables(0).Rows(y).Item(4) &
"</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;<font size='5' color='black'><img src='images/rup.png' style='Width:
17px; Height: 17px;' />" & ds.Tables(0).Rows(y).Item(15) & "</font><br />"
str = str & "<font size='3' color='blue'>" & ds.Tables(0).Rows(y).Item(1) &
"</font><br /><br />"
str = str & "<font size='5' color='black'>" & ds.Tables(0).Rows(y).Item(6) &
"</font> <font size='3'>in " & ds.Tables(0).Rows(y).Item(9) & "</font><br />"
str = str & "<font size='4' color='black'>Sq-ft Rate: Rs. " &
ds.Tables(0).Rows(y).Item(16) & "/-</font><br /><br />"
str = str & "<font size='4' color='black'>" & ds.Tables(0).Rows(y).Item(23) & " |
" & ds.Tables(0).Rows(y).Item(24) & " | Possession in " & ds.Tables(0).Rows(y).Item(25) & "/"
& ds.Tables(0).Rows(y).Item(26) & "</font><br />"
str = str & "<font size='4' color='black'><br />Covered Area: " &
ds.Tables(0).Rows(y).Item(11) & " " & ds.Tables(0).Rows(y).Item(12) & "</font>"
str = str & "</td>"
str = str & "</tr>"
str = str & "<tr><td colspan='2'><hr style='color:gray' /></td></tr>"

119
Next
str = str & "</table>"
lblres.Text = str
Else
lblerror.Text = "Properties not found."
lblres.Text = ""
End If
Catch ex As Exception
End Try
End If
End Sub

Protected Sub btnsearch_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles btnsearch.Click
Try
If txtcity.Text = "" Or ddlcategory.Text = "--Property Type--" Then
MsgBox("Enter the city name and property type", MsgBoxStyle.Information, "")
Else
Response.Redirect("Searchadmin.aspx?locality='" & txtcity.Text & "'&category='" &
ddlcategory.Text & "'")
End If
Catch ex As Exception

End Try
End Sub
End Class

SIGNIN.ASPX

<%@ Page Language="VB" MasterPageFile="~/Master_Main.master"


AutoEventWireup="false" CodeFile="SignIn.aspx.vb" Inherits="_Default" title="SignIn" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<!---start-content---->
<div class="wrap">
<div class="mid-grid">
<h2>Login Below to Manage Your Account...</h2><br />
<center>
<table style="border-collapse:separate; border-spacing:5px;">
<tr>
<td>Email ID&nbsp;&nbsp;</td>
<td><asp:TextBox ID="txtemailid" class="txtbox" runat="server"
MaxLength="40"></asp:TextBox></td>
</tr>
<tr>

120
<td>Password&nbsp;&nbsp;</td>
<td><asp:TextBox ID="txtpassword" class="txtbox" TextMode="Password"
runat="server"
MaxLength="20"></asp:TextBox></td>
</tr>
<tr>
<td align="right" colspan="2"><asp:LinkButton ID="btnforgotpassword"
runat="server"
PostBackUrl="~/FP.aspx">Forgot Password?</asp:LinkButton></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><asp:Button ID="btnsignIn" runat="server" class="css_button1" Text="SignIn"
Width="266px" Height="37px" /></td>
</tr>
<tr>
<td align="center" colspan="2">
<br />
<h3>Don&#39;t have an Account? Click <a href="SignUp.aspx">HERE</a> to
Register.</h3>
</td>
</tr>
</table>
</center>
</div>
</div>
<!---End-content---->
</asp:Content>

SIGNIN.ASPX.VB

Imports System.Data.SqlClient
Imports System.Data.Sql
Imports System.Data
Imports ASP.global_asax

Partial Class _Default


Inherits System.Web.UI.Page
Dim TextLength As Long
Dim sChar As Char
Dim bASCII As Byte
Dim pass As String
Public Shared save_id, save_pass As String
Dim da As SqlDataAdapter
Dim ds As DataSet

121
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
Try
Dim e1 As String
Dim type As String
e1 = "" : type = ""
Try
e1 = Session("LoginId").ToString
type = Session("type").ToString
Catch ex As Exception
End Try
If type = "Admin" Then
Response.Redirect("Homeagent.aspx")
ElseIf type = "Member" Then
Response.Redirect("Homeuser.aspx")
End If
connection_create()
Catch ex As Exception
End Try
End Sub

Protected Sub btnsignIn_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles btnsignIn.Click
pass = Nothing
'code for password
Dim x As Integer
If txtemailid.Text <> "" And txtpassword.Text <> "" Then
TextLength = Len(txtpassword.Text)
For x = 1 To TextLength
sChar = Mid$(txtpassword.Text, x, 1)
bASCII = Asc(sChar)
bASCII += 11
If bASCII > 255 Then
bASCII -= 11
End If
pass &= Chr(bASCII)
Next
connection_create()
da = New SqlDataAdapter("select emailid,password,type from AccountDetails where
emailid='" & Trim(txtemailid.Text) & "' and password='" & pass & "'", con)
ds = New DataSet
da.Fill(ds)
If ds.Tables(0).Rows.Count = 0 Then
'if Id & Password is not found in database
txtpassword.Text = ""
MsgBox("Either Username/password doesn't match.", MsgBoxStyle.Exclamation, "")

122
txtpassword.Focus()
Else
Dim save As String
save = ds.Tables(0).Rows(0).Item(1)
If save = pass Then
'Show other page
Session("LoginId") = txtemailid.Text
Me.Session.Item("LoginPass") = txtpassword.Text
Me.Session.Item("type") = ds.Tables(0).Rows(0).Item(2)
Dim type As String = ds.Tables(0).Rows(0).Item(2)
If type = "Admin" Then
'MsgBox("Admin Login")
Response.Redirect("Homeadmin.aspx")
ElseIf type = "Member" Then
'MsgBox("Member Login")
Response.Redirect("Homeuser.aspx")
End If
Else
'error code
MsgBox("Either Username/password doesn't match.", MsgBoxStyle.Exclamation,
"")
txtpassword.Text = ""
txtpassword.Focus()
End If
End If
Else
MsgBox("Either Username/password is empty.", MsgBoxStyle.Exclamation, "")
End If
End Sub
End Class

SIGNUP.ASPX

<%@ Page Language="VB" MasterPageFile="~/Master_Main.master"


AutoEventWireup="false" CodeFile="SignUp.aspx.vb" Inherits="_Default" title="SignUp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<!---start-content---->
<div class="wrap">
<div class="mid-grid">
<h2>Don't Have An Account, <span>Create One...</span></h2>
<br />
<center>
<table>
<tr align="left">

123
<td colspan="2"><asp:ValidationSummary ID="ValidationSummary1" runat="server"
HeaderText="Please resolve the below page error to continue with account
creation"></asp:ValidationSummary></td>
</tr>
<tr align="left">
<td style="padding: 5px 5px; width: 180px;">Your Name</td>
<td style="padding: 5px 5px"><asp:TextBox ID="txtname" class="txtbox"
runat="server" MaxLength="50" Width="250px"></asp:TextBox></td>
</tr>
<tr align="left">
<td style="padding: 5px 5px; width: 180px;">Email ID</td>
<td style="padding: 5px 5px"><asp:TextBox ID="txtemailid" class="txtbox"
runat="server" MaxLength="40" Width="250px"></asp:TextBox></td>
</tr>
<tr align="left">
<td style="padding: 5px 5px; width: 180px;">Password</td>
<td style="padding: 5px 5px"><asp:TextBox ID="txtpassword" class="txtbox"
runat="server" TextMode="Password" MaxLength="20" Width="250px"></asp:TextBox></td>
</tr>
<tr align="left">
<td style="padding: 5px 5px; width: 180px;">Re-Enter Password</td>
<td style="padding: 5px 5px"><asp:TextBox ID="txtrepassword" class="txtbox"
runat="server" TextMode="Password" MaxLength="20" Width="250px"></asp:TextBox></td>
</tr>
<tr align="left">
<td style="padding: 5px 5px; width: 180px; height: 64px;">Unique Pin</td>
<td style="padding: 5px 5px; height: 64px;">
<asp:TextBox ID="txtpin" runat="server" TextMode="Password" class="txtbox"
MaxLength="4" Width="250px"></asp:TextBox><br />
<font size="3" color="black">Unique pin should be of 4 digits.<br />It will be use
to retirve your password.</font>
</td>
</tr>
<tr align="left">
<td style="padding: 5px 5px; width: 180px; height: 55px;">Spam Check*</td>
<td style="padding: 5px 5px; height: 55px;">
Please answer this simple question<br />
<asp:TextBox ID="txtans" runat="server" class="txtbox" placeholder=" 7 + 6 "
MaxLength="2" Width="250px"></asp:TextBox>
</td>
</tr>
<tr align="left">
<td colspan="2" style="padding: 5px 5px;">
<asp:CheckBox ID="chkpolicychk" Checked="true" runat="server" Text="I agree
to FindHomes privacy policy. <br />I would like to receive property related info via Email." />
<br />Privacy Policy

124
</td>
</tr>
<tr align="left">
<td></td>
<td style="padding:5px 5px" colspan="2">
<asp:Button ID="btnsubmit" runat="server" class="css_button1" Text="Register
Now" Height="37px" Width="257px"></asp:Button>
</td>
</tr>
</table>

<asp:RequiredFieldValidator ID="rfv1" runat="server"


ErrorMessage="Enter your name." ControlToValidate="txtname"
Display="None"></asp:RequiredFieldValidator>

<asp:RequiredFieldValidator ID="rfv2" runat="server" ErrorMessage="Enter email id."


ControlToValidate="txtemailid" Display="None"></asp:RequiredFieldValidator>

<asp:RegularExpressionValidator ID="rev1" runat="server"


ErrorMessage="Invalid email id." Display="None" ControlToValidate="txtemailid"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-
.]\w+)*"></asp:RegularExpressionValidator>

<asp:RequiredFieldValidator ID="rfv3" runat="server"


ErrorMessage="Enter password." ControlToValidate="txtpassword"
Display="None"></asp:RequiredFieldValidator>

<asp:RequiredFieldValidator ID="rfv4" runat="server"


ErrorMessage="Re-enter password." ControlToValidate="txtrepassword"
Display="None"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cv1" runat="server"
ErrorMessage="Password does not match." ControlToCompare="txtpassword"
ControlToValidate="txtrepassword" Display="None"></asp:CompareValidator>

<asp:RequiredFieldValidator ID="rfv6" runat="server"


ErrorMessage="Enter unique pin." ControlToValidate="txtpin"
Display="None"></asp:RequiredFieldValidator>

<asp:RequiredFieldValidator ID="rfvans" runat="server" ErrorMessage="Provide the


spam check maths answer."
ControlToValidate="txtans" Display="None"></asp:RequiredFieldValidator>

<asp:CustomValidator ID="CustomValidator1" runat="server"


ClientValidationFunction="CustomValidator1_ServerValidate"
ControlToValidate="txtpin" Display="None" ErrorMessage="Unique pin must be of 4
digits."></asp:CustomValidator>

125
</center>
</div>
</div>
<!---End-content---->
</asp:Content>

SIGNUP.ASPX.VB

Imports System.Net
Imports System.Net.Mail
Imports System.Data.SqlClient
Imports System.Data.Sql
Imports System.Data
Imports ASP.global_asax

Partial Class _Default


Inherits System.Web.UI.Page
Dim TextLength As Long
Dim sChar As Char
Dim bASCII As Byte
Dim pass As String
Dim count, value As Integer
Dim da As SqlDataAdapter
Dim ds As DataSet
Dim cmd As SqlCommand
Dim chkuser As Boolean

Protected Sub getdata()


da = New SqlDataAdapter("select * from AccountDetails", con)
ds = New DataSet
da.Fill(ds)
End Sub

Private Sub autogenerate()


Call getdata()
count = ds.Tables(0).Rows.Count

Dim arr As New ArrayList


arr.Clear()
If count = 0 Then
value = 1
Else
For a = 0 To count - 1
arr.Add(ds.Tables(0).Rows(a).Item(0))
arr.Sort()
Next

126
For Each sss In arr
value = sss
Next
value = value + 1
End If
End Sub

Private Function EmailSending(ByVal tos As String, ByVal subject As String, ByVal message
As String)
Try
Dim Smtp_Server As New SmtpClient
Dim e_mail As New MailMessage()
Smtp_Server.UseDefaultCredentials = False
Smtp_Server.Credentials = New
Net.NetworkCredential("noreplyfindhomes1@gmail.com", "propertyiq12345")
Smtp_Server.Port = 587
Smtp_Server.EnableSsl = True
Smtp_Server.Host = "smtp.gmail.com"

e_mail = New MailMessage()


e_mail.From = New MailAddress("noreplyfindhomes1@gmail.com")
e_mail.To.Add(tos)
e_mail.Subject = subject
e_mail.IsBodyHtml = False
e_mail.Body = message

Smtp_Server.Send(e_mail)
MsgBox("Account Created Successfully. An Email has sent to your id with login
credentials.", MsgBoxStyle.Information, "Email Sent")
Return 0
Catch ex As Exception
MsgBox("Account Created Successfully but Email Not Sent !!! " + vbCrLf + "Please
Check Your Network Connection", MsgBoxStyle.Information, "Internet Error")
Return 1
End Try
End Function

Public Sub Checkuser()


da = New SqlDataAdapter("select * from AccountDetails where emailid='" &
txtemailid.Text & "'", con)
ds = New DataSet
da.Fill(ds)
If ds.Tables(0).Rows.Count > 0 Then
MsgBox("Email address already exist.", MsgBoxStyle.Exclamation, "")
chkuser = False

127
txtemailid.Text = ""
txtpassword.Text = ""
txtrepassword.Text = ""
txtans.Text = ""
txtname.Text = ""
txtemailid.Focus()
Exit Sub
Else
chkuser = True
End If
da = Nothing
ds = Nothing
End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles


Me.Load
Try
Dim e1 As String
Dim type As String
e1 = "" : type = ""
Try
e1 = Session("LoginId").ToString
type = Session("type").ToString
Catch ex As Exception
End Try
If type = "Admin" Then
Response.Redirect("Homeadmin.aspx")
ElseIf type = "Member" Then
Response.Redirect("Homeuser.aspx")
End If
connection_create()
Catch ex As Exception
End Try
End Sub

Protected Sub btnsubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles btnsubmit.Click
If Page.IsValid = True Then
If chkpolicychk.Checked = True Then
If txtans.Text = "13" Then
Checkuser()
If Page.IsValid = True And chkuser = True Then
'Encryption code
Dim x As Integer
TextLength = Len(txtpassword.Text)
For x = 1 To TextLength

128
sChar = Mid$(txtpassword.Text, x, 1)
bASCII = Asc(sChar)
bASCII += 11
If bASCII > 255 Then
bASCII -= 11
End If
pass &= Chr(bASCII)
Next

Call autogenerate()
cmd = New SqlCommand
cmd.CommandType = CommandType.Text
cmd.Connection = con
Dim sqlq As String
sqlq = "insert into AccountDetails values('" & value & "','" & "M" & value & "','"
& txtname.Text & "','" & txtemailid.Text & "','" & pass & "','" & txtpin.Text & "','Member')"
cmd.CommandText = sqlq
cmd.ExecuteNonQuery()
cmd = Nothing

'Email coding
Try
Call EmailSending(txtemailid.Text, "New account information",
"Congratulations your account has been created successfully." & vbCrLf & vbCrLf & "You are
now the member of FindHomes.com ." & vbCrLf & "Your Login ID :" & txtemailid.Text &
vbCrLf & "Your Password is: " & txtpassword.Text & vbCrLf & "Reset pin: " & txtpin.Text)
Catch ex As Exception
End Try
Response.Redirect("SignIn.aspx")
chkuser = False
txtemailid.Text = ""
txtpin.Text = ""
txtname.Text = ""
txtans.Text = ""
End If
Else
MsgBox("The answer your provided is incorrect. Please try again.",
MsgBoxStyle.Information, "Incorrect Answer")
End If
Else
MsgBox("You must accept the policies of FindHomes. Please click on the check box.",
MsgBoxStyle.Information, "")
End If
End If
End Sub

129
Protected Sub CustomValidator1_ServerValidate(ByVal source As Object, ByVal args As
System.Web.UI.WebControls.ServerValidateEventArgs) Handles
CustomValidator1.ServerValidate
If IsNumeric(txtpin.Text) = False Then
args.IsValid = False
Exit Sub
Else
If Trim(Len(txtpin.Text)) < 4 Then
args.IsValid = False
Exit Sub
Else
args.IsValid = True
End If
End If
End Sub
End Class

SUBSADMIN.ASPX

<%@ Page Language="VB" MasterPageFile="~/Master_Admin.master"


AutoEventWireup="false" CodeFile="Subsadmin.aspx.vb" Inherits="_Default"
title="Subscribers | FindHomes.com" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<div class="wrap">
<div>
<div class="mid-grid">
<center>
<table>
<tr>
<td valign="middle"><asp:ImageButton ID="imgsubs" runat="server"
Height="16px" Width="18px" ImageUrl="~/images/plus.png" /></td>
<td valign="middle"><font size="4" color="Lime">Subscribers
Information</font></td>
</tr>
</table>
<br />
<asp:Panel ID="pnlsubs" runat="server" Visible="False">
<asp:Label ID="lblsubs" runat="server" Text=""></asp:Label><br />
<asp:GridView ID="GVSubs" runat="server" BackColor="Lime"
BorderColor="Lime" CellPadding="4" CellSpacing="3" ForeColor="Black"
GridLines="None" AllowPaging="True" BorderStyle="Solid" Width="1000px"
Font-Names="Times New Roman">

130
<RowStyle BackColor="White" />
<FooterStyle BackColor="Lime" Font-Bold="True" ForeColor="White"
BorderColor="Lime" />
<PagerStyle BackColor="Lime" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True"
ForeColor="#333333" />
<HeaderStyle BackColor="Lime" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#2461BF" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
</asp:Panel>
</center>
</div>
</div>
</div>
</asp:Content>

SUBSADMIN.ASPX.VB

Imports ASP.global_asax
Imports System.Data
Imports System.Data.SqlClient

Partial Class _Default


Inherits System.Web.UI.Page
Dim cmd As SqlCommand
Dim da As SqlDataAdapter
Dim ds As DataSet
Dim val As Integer
Dim str As Integer
Dim i, count, value As Integer

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles


Me.Load
If Page.IsPostBack = False Then
Try
connection_create()

'Code for Subs.


da = New SqlDataAdapter("select srno as 'Serial Number',emailid as 'Email Address'
from Subscribers", con)
ds = New DataSet
da.Fill(ds)
If ds.Tables(0).Rows.Count > 0 Then
GVSubs.DataSource = ds.Tables(0)

131
GVSubs.DataBind()

lblsubs.Text = "Below is the list of Subscribers:"


Else
lblsubs.Text = "No records found."
End If
Catch ex As Exception
End Try
End If
End Sub
Protected Sub imgsubs_Click(ByVal sender As Object, ByVal e As
System.Web.UI.ImageClickEventArgs) Handles imgsubs.Click
If imgsubs.ImageUrl = "~/images/plus.png" Then
pnlsubs.Visible = True
imgsubs.ImageUrl = "~/images/minus.png"
Else
pnlsubs.Visible = False
imgsubs.ImageUrl = "~/images/plus.png"
End If
End Sub
End Class

SUBSCRIBE.ASPX
<%@ Page Language="VB" MasterPageFile="~/Master_Main.master"
AutoEventWireup="false" CodeFile="Subscribe.aspx.vb" Inherits="_Default" title="Subscribe"
%>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<div class="wrap">
<div class="mid-grid">
<center>
<h2>Subscribe for latest Updates &amp; News</h2><br />
<table>
<tr>
<td style="padding: 5px 5px">
<asp:TextBox ID="txtemailid" runat="server" class="txtbox" MaxLength="40"
Width="250px" placeholder=" Enter your email ID"></asp:TextBox>
</td>
</tr>
<tr>
<td style="padding: 5px 5px">
<asp:Button ID="btnsubs" runat="server" class="css_button"
Text="Subscribe" Width="257px" Height="37px"></asp:Button>
</td>
</tr>

132
</table>
<asp:RequiredFieldValidator ID="rfv1" runat="server" ErrorMessage="Enter Email
Address." ControlToValidate="txtemailid"
Display="None"></asp:RequiredFieldValidator>

<asp:RegularExpressionValidator ID="rev1" runat="server" ErrorMessage="Invalid


Email Address." ControlToValidate="txtemailid"
Display="None" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-
.]\w+)*"></asp:RegularExpressionValidator>
<br />
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
HeaderText="Below are the page errors:" ShowMessageBox="True"
ShowSummary="False" />

<h2>Upcoming sites/projects</h2><br />


<marquee>
<asp:Image ID="Image1" runat="server" ImageUrl="images/m1.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image2" runat="server"
ImageUrl="images/m2.jpg" style="border-radius: 10px;" Width="500"
Height="250"></asp:Image>
<asp:Image ID="Image3" runat="server"
ImageUrl="images/m3.jpg" style="border-radius: 10px;" Width="500"
Height="250"></asp:Image>
<asp:Image ID="Image4" runat="server"
ImageUrl="images/m4.jpg" style="border-radius: 10px;" Width="500"
Height="250"></asp:Image>
<asp:Image ID="Image5" runat="server"
ImageUrl="images/m5.jpg" style="border-radius: 10px;" Width="500"
Height="250"></asp:Image>
</marquee>
</center>
</div>
</div>
</asp:Content>

SUBSCRIBE.ASPX.VB
Imports ASP.global_asax
Imports System.Data
Imports System.Data.SqlClient

Partial Class _Default


Inherits System.Web.UI.Page
Dim cmd As SqlCommand
Dim da As SqlDataAdapter
Dim ds As DataSet

133
Dim val As Integer
Dim str As Integer
Dim i, count, value As Integer

Private Sub autogenerate()


connection_create()
da = New SqlDataAdapter("select * from Subscribers", con)
ds = New DataSet
da.Fill(ds)
count = ds.Tables(0).Rows.Count
Dim arr As New ArrayList
arr.Clear()
If count = 0 Then
value = 1
Else
For a = 0 To count - 1
arr.Add(ds.Tables(0).Rows(a).Item(0))
arr.Sort()
Next

For Each sss In arr


value = sss
Next

value = value + 1
End If
End Sub

Protected Sub btnsubs_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles btnsubs.Click
If Page.IsValid = True Then

'Check already subscribed.


connection_create()
da = New SqlDataAdapter("select * from Subscribers where emailid='" & txtemailid.Text
& "' ", con)
ds = New DataSet
da.Fill(ds)
If ds.Tables(0).Rows.Count > 0 Then
MsgBox("Email ID is already subscribed with us.", MsgBoxStyle.Information,
"Information")
Else
'Code to add email in DB.
autogenerate()

Dim sqlq As String = ""

134
sqlq = "insert into Subscribers values(" & value & ",'" & txtemailid.Text & "')"
cmd = New SqlCommand
cmd.Connection = con
cmd.CommandText = sqlq
cmd.ExecuteNonQuery()

MsgBox("Congratulations! You are now subscribed with our updates and news.",
MsgBoxStyle.Information, "Success")
txtemailid.Text = ""
Response.Redirect("index.aspx")
End If
End If
End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles


Me.Load

End Sub
End Class

SUBSCRIBEU.ASPX

<%@ Page Language="VB" MasterPageFile="~/Master_User.master"


AutoEventWireup="false" CodeFile="SubscribeU.aspx.vb" Inherits="_Default" title="Subscribe
| FindHomes.com" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<div class="wrap">
<div>
<div class="mid-grid">
<center>
<h2>Subscribe for latest Updates &amp; News</h2>
<table>
<tr>
<td style="padding: 5px 5px">
<asp:TextBox ID="txtemailid" runat="server" class="txtbox" MaxLength="40"
Width="250px" placeholder=" Enter your email ID"></asp:TextBox>
</td>
</tr>
<tr>
<td style="padding: 5px 5px">
<asp:Button ID="btnsubs" runat="server" class="css_button"
Text="Subscribe" Width="252px" Height="37px"></asp:Button>
</td>
</tr>
</table>

135
<asp:RequiredFieldValidator ID="rfv1" runat="server" ErrorMessage="Enter Email
Address." ControlToValidate="txtemailid"
Display="None"></asp:RequiredFieldValidator>

<asp:RegularExpressionValidator ID="rev1" runat="server" ErrorMessage="Invalid


Email Address." ControlToValidate="txtemailid"
Display="None" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-
.]\w+)*"></asp:RegularExpressionValidator>
<br />
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
HeaderText="Below are the page errors:" ShowMessageBox="True"
ShowSummary="False" />

<br /><br />


<h2>Upcoming sites/projects</h2>
<marquee>
<asp:Image ID="Image1" runat="server" ImageUrl="images/m1.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image2" runat="server"
ImageUrl="images/m2.jpg" style="border-radius: 10px;" Width="500"
Height="250"></asp:Image>
<asp:Image ID="Image3" runat="server"
ImageUrl="images/m3.jpg" style="border-radius: 10px;" Width="500"
Height="250"></asp:Image>
<asp:Image ID="Image4" runat="server"
ImageUrl="images/m4.jpg" style="border-radius: 10px;" Width="500"
Height="250"></asp:Image>
<asp:Image ID="Image5" runat="server"
ImageUrl="images/m5.jpg" style="border-radius: 10px;" Width="500"
Height="250"></asp:Image>
</marquee>
</center>
</div>
</div>
</div>
</asp:Content>

SUBSCRIBE.ASPX.VB

Imports ASP.global_asax
Imports System.Data
Imports System.Data.SqlClient

Partial Class _Default


Inherits System.Web.UI.Page
Dim cmd As SqlCommand
Dim da As SqlDataAdapter
136
Dim ds As DataSet
Dim val As Integer
Dim str As Integer
Dim i, count, value As Integer

Private Sub autogenerate()


connection_create()
da = New SqlDataAdapter("select * from Subscribers", con)
ds = New DataSet
da.Fill(ds)
count = ds.Tables(0).Rows.Count
Dim arr As New ArrayList
arr.Clear()
If count = 0 Then
value = 1
Else
For a = 0 To count - 1
arr.Add(ds.Tables(0).Rows(a).Item(0))
arr.Sort()
Next

For Each sss In arr


value = sss
Next

value = value + 1
End If
End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles


Me.Load
If Not Page.IsPostBack Then
connection_create()

'Fill Email ID box


Dim email As String = ""
Try
email = Session("LoginId").ToString()
Catch ex As Exception
email = ""
End Try
End If
End Sub

Protected Sub btnsubs_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles btnsubs.Click

137
If Page.IsValid = True Then
'Check already subscribed.
connection_create()
da = New SqlDataAdapter("select * from Subscribers where emailid='" & txtemailid.Text
& "' ", con)
ds = New DataSet
da.Fill(ds)
If ds.Tables(0).Rows.Count > 0 Then
MsgBox("Email ID is already subscribed with us.", MsgBoxStyle.Information,
"Information")
Else
'Code to add email in DB.
autogenerate()

Dim sqlq As String = ""


sqlq = "insert into Subscribers values(" & value & ",'" & txtemailid.Text & "')"
cmd = New SqlCommand
cmd.Connection = con
cmd.CommandText = sqlq
cmd.ExecuteNonQuery()

MsgBox("Congratulations! You are now subscribed with our updates and news.",
MsgBoxStyle.Information, "Success")
txtemailid.Text = ""
Response.Redirect("index.aspx")
End If
End If
End Sub
End Class

SUMMARY.ASPX

<%@ Page Language="VB" MasterPageFile="~/Master_Admin.master"


AutoEventWireup="false" CodeFile="Summary.aspx.vb" Inherits="_Default" title="Property
Adda, Sell & Purchase Properties" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<div class="wrap">
<div class="content">
<div class="mid-grid">
<h2>Your Happy Home Journey Begins Here...</h2>
<p>
<br />
<font size="5" color="black">Search Results for</font>&nbsp;&nbsp;&nbsp;<font
size="5" color="green"><asp:Label ID="lblres" runat="server" Text=""></asp:Label></font>
<br />

138
<table style="width: 80%">
<tr>
<td align="center" valign='top'>
<asp:Image ID="imgpic1" style="vertical-align:top;" runat="server"
Width="300" Height="300" ImageUrl="images/PropertyImages/na.jpg" /><br /><br />
<asp:ImageButton ID="imgbtn1" runat="server" Height="100" Width="100"
ImageUrl="images/PropertyImages/na.jpg" />&nbsp;&nbsp;
<asp:ImageButton ID="imgbtn2" runat="server" Height="100" Width="100"
ImageUrl="images/PropertyImages/na.jpg" />&nbsp;&nbsp;
<asp:ImageButton ID="imgbtn3" runat="server" Height="100" Width="100"
ImageUrl="images/PropertyImages/na.jpg" />&nbsp;&nbsp;
<asp:ImageButton ID="imgbtn4" runat="server" Height="100" Width="100"
ImageUrl="images/PropertyImages/na.jpg" />&nbsp;&nbsp;
</td>
<td valign='top'>
<asp:Label ID="lblcaption" runat="server" Text=""></asp:Label>
<asp:Label ID="lbldeveloper" runat="server" Text=""></asp:Label>
<asp:Label ID="lblprice" runat="server" Text=""></asp:Label><br />
<asp:Label ID="lblpropertyid" runat="server" Text=""></asp:Label>
<br /><br />
<asp:Label ID="lblproprietor" runat="server" Text=""></asp:Label><br /><br
/><br />
<asp:Label ID="lblcity" runat="server" Text=""></asp:Label><br /><br /><br />
<asp:Label ID="lblwanttoandtype" runat="server" Text=""></asp:Label><br
/><br /><br />
<asp:Label ID="lbltrantype" runat="server" Text=""></asp:Label><br /><br
/><br />
<asp:Label ID="lblpossession" runat="server" Text=""></asp:Label><br /><br
/><br />
<asp:Label ID="lblsqftrate" runat="server" Text=""></asp:Label><br /><br />
</td>
</tr>
<tr><td colspan="2">&nbsp;<br /></td></tr>
<tr>
<td colspan="2" style="background-color:#FFFFCC"><font
size="4">Area</font></td>
</tr>
<tr><td colspan="2">&nbsp;<br /></td></tr>
<tr>
<td colspan="2">
<asp:Label ID="lblcovered" runat="server" Text=""></asp:Label><br /><br />
<asp:Label ID="lblcarpet" runat="server" Text=""></asp:Label>
</td>
</tr>
<tr><td colspan="2">&nbsp;<br /></td></tr>
<tr>

139
<td colspan="2" style="background-color:#FFFFCC"><font size="4">Detailed
Features</font></td>
</tr>
<tr><td colspan="2">&nbsp;<br /></td></tr>
<tr>
<td colspan="2">
<asp:Label ID="lblbedrooms" runat="server" Text=""></asp:Label><br /><br />
<asp:Label ID="lblbathrooms" runat="server" Text=""></asp:Label><br /><br />
<asp:Label ID="lblbalco" runat="server" Text=""></asp:Label><br /><br />
<asp:Label ID="lblfurnished" runat="server" Text=""></asp:Label><br /><br />
<asp:Label ID="lblfloor" runat="server" Text=""></asp:Label>
</td>
</tr>
<tr><td colspan="2">&nbsp;<br /></td></tr>
<tr>
<td colspan="2" style="background-color:#FFFFCC"><font size="4">Contact
Information</font></td>
</tr>
<tr><td colspan="2">&nbsp;<br /></td></tr>
<tr>
<td colspan="2">
<asp:Label ID="lbladdress" runat="server" Text=""></asp:Label><br />
<asp:Label ID="lblsiteaddress" runat="server" Text=""></asp:Label>
</td>
</tr>
<tr><td colspan="2">&nbsp;<br /></td></tr>
<tr>
<td colspan="2" style="background-color:#FFFFCC"><font
size="4">Description</font></td>
</tr>

<tr><td colspan="2">&nbsp;<br /></td></tr>

<tr>
<td colspan="2">
<asp:Label ID="lbldesc" runat="server" Text=""></asp:Label>
</td>
</tr>
</table>
<br /><br />
</p>
<h2>Upcoming sites/projects</h2>
<div class="clear"> </div>
<marquee>
<asp:Image ID="Image1" runat="server" ImageUrl="images/m1.jpg" style="border-
radius: 10px;" Width="500" Height="250"></asp:Image>

140
<asp:Image ID="Image2" runat="server" ImageUrl="images/m2.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image3" runat="server" ImageUrl="images/m3.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image4" runat="server" ImageUrl="images/m4.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image5" runat="server" ImageUrl="images/m5.jpg"
style="border-radius: 10px;" Height="250"></asp:Image>
</marquee>
</div>
</div>
</div>
</asp:Content>

SUMMARY.ASPX.VB

Imports ASP.global_asax
Imports System.Data
Imports System.Data.SqlClient

Partial Class _Default


Inherits System.Web.UI.Page
Dim cmd As SqlCommand
Dim da As SqlDataAdapter
Dim ds As DataSet
Dim val As Integer
Dim str As String
Dim i, count, value As Integer
Dim pic As String

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load


Try
If Page.IsPostBack = False Then

Dim pid As String = ""


Try
pid = Request.QueryString("pid").ToString
Catch ex As Exception
pid = ""
End Try

connection_create()
da = New SqlDataAdapter("select * from PropertyDetails where propertyid='" & pid & "' ", con)
ds = New DataSet
da.Fill(ds)
If ds.Tables(0).Rows.Count > 0 Then
lblres.Text = ds.Tables(0).Rows(0).Item(2)

141
If ds.Tables(0).Rows(0).Item(28) <> "" Then
imgpic1.ImageUrl = "images/PropertyImages/" & ds.Tables(0).Rows(0).Item(28)
ElseIf ds.Tables(0).Rows(0).Item(29) <> "" Then
imgpic1.ImageUrl = "images/PropertyImages/" & ds.Tables(0).Rows(0).Item(29)
ElseIf ds.Tables(0).Rows(0).Item(30) <> "" Then
imgpic1.ImageUrl = "images/PropertyImages/" & ds.Tables(0).Rows(0).Item(30)
ElseIf ds.Tables(0).Rows(0).Item(31) <> "" Then
imgpic1.ImageUrl = "images/PropertyImages/" & ds.Tables(0).Rows(0).Item(31)
Else
imgpic1.ImageUrl = "images/PropertyImages/na.jpg"
End If

'set image to other buttons


If ds.Tables(0).Rows(0).Item(28) <> "" Then
imgbtn1.ImageUrl = "images/PropertyImages/" & ds.Tables(0).Rows(0).Item(28)
End If
If ds.Tables(0).Rows(0).Item(29) <> "" Then
imgbtn2.ImageUrl = "images/PropertyImages/" & ds.Tables(0).Rows(0).Item(29)
End If
If ds.Tables(0).Rows(0).Item(30) <> "" Then
imgbtn3.ImageUrl = "images/PropertyImages/" & ds.Tables(0).Rows(0).Item(30)
End If
If ds.Tables(0).Rows(0).Item(31) <> "" Then
imgbtn4.ImageUrl = "images/PropertyImages/" & ds.Tables(0).Rows(0).Item(31)
End If

lblcaption.Text = "<font size='5' color='gray'>" & ds.Tables(0).Rows(0).Item(2) & "</font>"


lbldeveloper.Text = "<font size='3' color='black'>&nbsp;&nbsp;&nbsp;by&nbsp;&nbsp;" &
ds.Tables(0).Rows(0).Item(4) & "</font>"
lblprice.Text =
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;<font size='5' color='black'><img src='images/rup.png' style='Width: 17px; Height: 17px;' />" &
ds.Tables(0).Rows(0).Item(15) & "</font>"
lblpropertyid.Text = "<font size='2' color='blue'>" & ds.Tables(0).Rows(0).Item(1) & "</font>"

lblcity.Text = "<font size='4'>City:" & ds.Tables(0).Rows(0).Item(9) & "</font> | <font


size='4'>Locality: " & ds.Tables(0).Rows(0).Item(10) & "</font>"

lbladdress.Text = "<font size='3'>Office/Home Address: " & ds.Tables(0).Rows(0).Item(7) &


"</font>"
lblsiteaddress.Text = "<br /><font size='3'>Site Address: " & ds.Tables(0).Rows(0).Item(8) &
"</font>"

lblwanttoandtype.Text = "<font size='4'>" & ds.Tables(0).Rows(0).Item(6) & " | Property for "
& ds.Tables(0).Rows(0).Item(5) & "</font>"

lbldesc.Text = "<font size='3'>" & ds.Tables(0).Rows(0).Item(27) & "</font>"

142
lbltrantype.Text = "<font size='4'>Transaction Type: " & ds.Tables(0).Rows(0).Item(23) &
"</font>"
lblpossession.Text = "<font size='4'>" & ds.Tables(0).Rows(0).Item(24) & " | Possession on " &
ds.Tables(0).Rows(0).Item(25) & "/" & ds.Tables(0).Rows(0).Item(26) & "</font>"

lblsqftrate.Text = "<font size='4'>Rate per SQ-FT: Rs. " & ds.Tables(0).Rows(0).Item(16) & "/-
</font>"

lblcovered.Text = "<font size='3'>Covered Area: " & ds.Tables(0).Rows(0).Item(11) & " " &
ds.Tables(0).Rows(0).Item(12) & "</font>"
lblcarpet.Text = "<font size='3'>Carpet Area: " & ds.Tables(0).Rows(0).Item(13) & " " &
ds.Tables(0).Rows(0).Item(14) & "</font>"

lblproprietor.Text = "<font size='4'>Proprietor: " & ds.Tables(0).Rows(0).Item(3) & "</font>"

lblbedrooms.Text = "<font size='3'>No. Of Bedrooms: " & ds.Tables(0).Rows(0).Item(17) &


"</font>"
lblbathrooms.Text = "<font size='3'>No. Of Bathrooms: " & ds.Tables(0).Rows(0).Item(18) &
"</font>"
lblbalco.Text = "<font size='3'>No. Of Balconies: " & ds.Tables(0).Rows(0).Item(19) &
"</font>"

lblfurnished.Text = "<font size='3'>Furnishing: " & ds.Tables(0).Rows(0).Item(20) & "</font>"


lblfloor.Text = "<font size='3'>Floor Number: " & ds.Tables(0).Rows(0).Item(21) & " Of (" &
ds.Tables(0).Rows(0).Item(22) & ")</font>"
End If
End If
Catch ex As Exception
End Try
End Sub

Protected Sub imgbtn1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs)


Handles imgbtn1.Click
Dim a As String = ""
a = imgbtn1.ImageUrl
imgpic1.ImageUrl = a
End Sub

Protected Sub imgbtn2_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs)


Handles imgbtn2.Click
Dim a As String = ""
a = imgbtn2.ImageUrl
imgpic1.ImageUrl = a
End Sub

Protected Sub imgbtn3_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs)


Handles imgbtn3.Click

143
Dim a As String = ""
a = imgbtn3.ImageUrl
imgpic1.ImageUrl = a
End Sub

Protected Sub imgbtn4_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs)


Handles imgbtn4.Click
Dim a As String = ""
a = imgbtn4.ImageUrl
imgpic1.ImageUrl = a
End Sub
End Class

SUMMARYUSER.ASPX

<%@ Page Language="VB" MasterPageFile="~/Master_User.master"


AutoEventWireup="false" CodeFile="SummaryUser.aspx.vb" Inherits="_Default"
title="Property Adda, Sell & Purchase Properties" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<div class="wrap">
<div class="content">
<div class="mid-grid">
<h2>Your Happy Home Journey Begins Here...</h2>
<p>
<br />
<font size="5" color="black">Search Results for</font>&nbsp;&nbsp;&nbsp;<font
size="5" color="green"><asp:Label ID="lblres" runat="server" Text=""></asp:Label></font>
<br />
<table style="width: 80%">
<tr>
<td align="center" valign='top'>
<asp:Image ID="imgpic1" style="vertical-align:top;" runat="server"
Width="300" Height="300" ImageUrl="images/PropertyImages/na.jpg" /><br /><br />
<asp:ImageButton ID="imgbtn1" runat="server" Height="100" Width="100"
ImageUrl="images/PropertyImages/na.jpg" />&nbsp;&nbsp;
<asp:ImageButton ID="imgbtn2" runat="server" Height="100" Width="100"
ImageUrl="images/PropertyImages/na.jpg" />&nbsp;&nbsp;
<asp:ImageButton ID="imgbtn3" runat="server" Height="100" Width="100"
ImageUrl="images/PropertyImages/na.jpg" />&nbsp;&nbsp;
<asp:ImageButton ID="imgbtn4" runat="server" Height="100" Width="100"
ImageUrl="images/PropertyImages/na.jpg" />&nbsp;&nbsp;
</td>
<td valign='top'>
<asp:Label ID="lblcaption" runat="server" Text=""></asp:Label>
<asp:Label ID="lbldeveloper" runat="server" Text=""></asp:Label>
<asp:Label ID="lblprice" runat="server" Text=""></asp:Label><br />

144
<asp:Label ID="lblpropertyid" runat="server" Text=""></asp:Label>
<br /><br />
<asp:Label ID="lblproprietor" runat="server" Text=""></asp:Label><br /><br
/><br />
<asp:Label ID="lblcity" runat="server" Text=""></asp:Label><br /><br /><br />
<asp:Label ID="lblwanttoandtype" runat="server" Text=""></asp:Label><br
/><br /><br />
<asp:Label ID="lbltrantype" runat="server" Text=""></asp:Label><br /><br
/><br />
<asp:Label ID="lblpossession" runat="server" Text=""></asp:Label><br /><br
/><br />
<asp:Label ID="lblsqftrate" runat="server" Text=""></asp:Label><br /><br />
</td>
</tr>
<tr><td colspan="2">&nbsp;<br /></td></tr>
<tr>
<td colspan="2" style="background-color:#FFFFCC"><font
size="4">Area</font></td>
</tr>
<tr><td colspan="2">&nbsp;<br /></td></tr>
<tr>
<td colspan="2">
<asp:Label ID="lblcovered" runat="server" Text=""></asp:Label><br /><br />
<asp:Label ID="lblcarpet" runat="server" Text=""></asp:Label>
</td>
</tr>
<tr><td colspan="2">&nbsp;<br /></td></tr>
<tr>
<td colspan="2" style="background-color:#FFFFCC"><font size="4">Detailed
Features</font></td>
</tr>
<tr><td colspan="2">&nbsp;<br /></td></tr>
<tr>
<td colspan="2">
<asp:Label ID="lblbedrooms" runat="server" Text=""></asp:Label><br /><br />
<asp:Label ID="lblbathrooms" runat="server" Text=""></asp:Label><br /><br />
<asp:Label ID="lblbalco" runat="server" Text=""></asp:Label><br /><br />
<asp:Label ID="lblfurnished" runat="server" Text=""></asp:Label><br /><br />
<asp:Label ID="lblfloor" runat="server" Text=""></asp:Label>
</td>
</tr>
<tr><td colspan="2">&nbsp;<br /></td></tr>
<tr>
<td colspan="2" style="background-color:#FFFFCC"><font size="4">Contact
Information</font></td>
</tr>

145
<tr><td colspan="2">&nbsp;<br /></td></tr>
<tr>
<td colspan="2">
<asp:Label ID="lbladdress" runat="server" Text=""></asp:Label><br />
<asp:Label ID="lblsiteaddress" runat="server" Text=""></asp:Label>
</td>
</tr>
<tr><td colspan="2">&nbsp;<br /></td></tr>
<tr>
<td colspan="2" style="background-color:#FFFFCC"><font
size="4">Description</font></td>
</tr>

<tr><td colspan="2">&nbsp;<br /></td></tr>

<tr>
<td colspan="2">
<asp:Label ID="lbldesc" runat="server" Text=""></asp:Label>
</td>
</tr>
</table>
<br /><br />
</p>
<h2>Upcoming sites/projects</h2>
<div class="clear"> </div>
<marquee>
<asp:Image ID="Image1" runat="server" ImageUrl="images/m1.jpg" style="border-
radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image2" runat="server" ImageUrl="images/m2.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image3" runat="server" ImageUrl="images/m3.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image4" runat="server" ImageUrl="images/m4.jpg"
style="border-radius: 10px;" Width="500" Height="250"></asp:Image>
<asp:Image ID="Image5" runat="server" ImageUrl="images/m5.jpg"
style="border-radius: 10px;" Height="250"></asp:Image>
</marquee>
</div>
</div>
</div>
</asp:Content>

SUMMARYUSER.ASPX.VB

Imports ASP.global_asax
Imports System.Data
146
Imports System.Data.SqlClient

Partial Class _Default


Inherits System.Web.UI.Page
Dim cmd As SqlCommand
Dim da As SqlDataAdapter
Dim ds As DataSet
Dim val As Integer
Dim str As String
Dim i, count, value As Integer
Dim pic As String

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles


Me.Load
Try
If Page.IsPostBack = False Then

Dim pid As String = ""


Try
pid = Request.QueryString("pid").ToString
Catch ex As Exception
pid = ""
End Try

connection_create()
da = New SqlDataAdapter("select * from PropertyDetails where propertyid='" & pid &
"' ", con)
ds = New DataSet
da.Fill(ds)
If ds.Tables(0).Rows.Count > 0 Then
lblres.Text = ds.Tables(0).Rows(0).Item(2)

If ds.Tables(0).Rows(0).Item(28) <> "" Then


imgpic1.ImageUrl = "images/PropertyImages/" & ds.Tables(0).Rows(0).Item(28)
ElseIf ds.Tables(0).Rows(0).Item(29) <> "" Then
imgpic1.ImageUrl = "images/PropertyImages/" & ds.Tables(0).Rows(0).Item(29)
ElseIf ds.Tables(0).Rows(0).Item(30) <> "" Then
imgpic1.ImageUrl = "images/PropertyImages/" & ds.Tables(0).Rows(0).Item(30)
ElseIf ds.Tables(0).Rows(0).Item(31) <> "" Then
imgpic1.ImageUrl = "images/PropertyImages/" & ds.Tables(0).Rows(0).Item(31)
Else
imgpic1.ImageUrl = "images/PropertyImages/na.jpg"
End If

'set image to other buttons


If ds.Tables(0).Rows(0).Item(28) <> "" Then

147
imgbtn1.ImageUrl = "images/PropertyImages/" & ds.Tables(0).Rows(0).Item(28)
End If
If ds.Tables(0).Rows(0).Item(29) <> "" Then
imgbtn2.ImageUrl = "images/PropertyImages/" & ds.Tables(0).Rows(0).Item(29)
End If
If ds.Tables(0).Rows(0).Item(30) <> "" Then
imgbtn3.ImageUrl = "images/PropertyImages/" & ds.Tables(0).Rows(0).Item(30)
End If
If ds.Tables(0).Rows(0).Item(31) <> "" Then
imgbtn4.ImageUrl = "images/PropertyImages/" & ds.Tables(0).Rows(0).Item(31)
End If

lblcaption.Text = "<font size='5' color='gray'>" & ds.Tables(0).Rows(0).Item(2) &


"</font>"
lbldeveloper.Text = "<font size='3'
color='black'>&nbsp;&nbsp;&nbsp;by&nbsp;&nbsp;" & ds.Tables(0).Rows(0).Item(4) &
"</font>"
lblprice.Text =
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;<font size='5' color='black'><img src='images/rup.png' style='Width: 17px;
Height: 17px;' />" & ds.Tables(0).Rows(0).Item(15) & "</font>"
lblpropertyid.Text = "<font size='2' color='blue'>" & ds.Tables(0).Rows(0).Item(1)
& "</font>"

lblcity.Text = "<font size='4'>City:" & ds.Tables(0).Rows(0).Item(9) & "</font> |


<font size='4'>Locality: " & ds.Tables(0).Rows(0).Item(10) & "</font>"

lbladdress.Text = "<font size='3'>Office/Home Address: " &


ds.Tables(0).Rows(0).Item(7) & "</font>"
lblsiteaddress.Text = "<br /><font size='3'>Site Address: " &
ds.Tables(0).Rows(0).Item(8) & "</font>"

lblwanttoandtype.Text = "<font size='4'>" & ds.Tables(0).Rows(0).Item(6) & " |


Property for " & ds.Tables(0).Rows(0).Item(5) & "</font>"

lbldesc.Text = "<font size='3'>" & ds.Tables(0).Rows(0).Item(27) & "</font>"

lbltrantype.Text = "<font size='4'>Transaction Type: " &


ds.Tables(0).Rows(0).Item(23) & "</font>"
lblpossession.Text = "<font size='4'>" & ds.Tables(0).Rows(0).Item(24) & " |
Possession on " & ds.Tables(0).Rows(0).Item(25) & "/" & ds.Tables(0).Rows(0).Item(26) &
"</font>"

lblsqftrate.Text = "<font size='4'>Rate per SQ-FT: Rs. " &


ds.Tables(0).Rows(0).Item(16) & "/-</font>"

148
lblcovered.Text = "<font size='3'>Covered Area: " & ds.Tables(0).Rows(0).Item(11)
& " " & ds.Tables(0).Rows(0).Item(12) & "</font>"
lblcarpet.Text = "<font size='3'>Carpet Area: " & ds.Tables(0).Rows(0).Item(13) &
" " & ds.Tables(0).Rows(0).Item(14) & "</font>"

lblproprietor.Text = "<font size='4'>Proprietor: " & ds.Tables(0).Rows(0).Item(3) &


"</font>"

lblbedrooms.Text = "<font size='3'>No. Of Bedrooms: " &


ds.Tables(0).Rows(0).Item(17) & "</font>"
lblbathrooms.Text = "<font size='3'>No. Of Bathrooms: " &
ds.Tables(0).Rows(0).Item(18) & "</font>"
lblbalco.Text = "<font size='3'>No. Of Balconies: " &
ds.Tables(0).Rows(0).Item(19) & "</font>"

lblfurnished.Text = "<font size='3'>Furnishing: " & ds.Tables(0).Rows(0).Item(20)


& "</font>"
lblfloor.Text = "<font size='3'>Floor Number: " & ds.Tables(0).Rows(0).Item(21) &
" Of (" & ds.Tables(0).Rows(0).Item(22) & ")</font>"
End If
End If
Catch ex As Exception
End Try
End Sub

Protected Sub imgbtn1_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles imgbtn1.Click
Dim a As String = ""
a = imgbtn1.ImageUrl
imgpic1.ImageUrl = a
End Sub

Protected Sub imgbtn2_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles imgbtn2.Click
Dim a As String = ""
a = imgbtn2.ImageUrl
imgpic1.ImageUrl = a
End Sub

Protected Sub imgbtn3_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles imgbtn3.Click
Dim a As String = ""
a = imgbtn3.ImageUrl
imgpic1.ImageUrl = a
End Sub

149
Protected Sub imgbtn4_Click(ByVal sender As Object, ByVal e As
System.Web.UI.ImageClickEventArgs) Handles imgbtn4.Click
Dim a As String = ""
a = imgbtn4.ImageUrl
imgpic1.ImageUrl = a
End Sub
End Class

UPLOADADS.ASPX

<%@ Page Language="VB" MasterPageFile="~/Master_User.master"


AutoEventWireup="false" CodeFile="UploadAds.aspx.vb" Inherits="_Default" title="Upload
Ads | FindHomes.com" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<div class="wrap">
<div>
<div class="mid-grid">
<center>
<h2>Upload your Ads</h2>
<font color="gray">You can upload properties for free of cost. Find Homes won't charge
any cost for this.</font>
<table style="border:1px; border-color:Black; width:750px" align="center"
cellpadding="4" cellspacing="3">
<tr align="left">
<td colspan="2" align="center">
<asp:Button ID="btnnew" runat="server" Text="Make a new Advertisement"
CausesValidation="false" Width="350px" class="css_button1"
Height="37px"></asp:Button><br /><br />
</td>
</tr>
<tr align="left">
<td colspan="2" align="center">
<asp:ValidationSummary ID="vd1" runat="server" HeaderText="Please correct
the below errors:" ShowMessageBox="True" ShowSummary="False" />
</td>
</tr>
<tr align="left">
<td style="padding: 5px 5px; width:300px">Property ID</td>
<td style="padding: 5px 5px; width:450px" align="center"><asp:Label ID="lblid"
runat="server" Text="Not Available"></asp:Label></td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">Caption</td>
<td style="padding: 5px 5px" align="center">

150
<asp:TextBox ID="txtcaption" class="txtbox" runat="server" MaxLength="50"
Width="252px"></asp:TextBox>
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">Builder Name</td>
<td style="padding: 5px 5px" align="center">
<asp:TextBox ID="txtBuilder" class="txtbox" runat="server" MaxLength="50"
Width="252px"></asp:TextBox>
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">Builder Company Name</td>
<td style="padding: 5px 5px" align="center">
<asp:TextBox ID="txtBuilderComp" class="txtbox" runat="server"
MaxLength="50" Width="252px"></asp:TextBox>
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">I want to</td>
<td style="padding: 5px 5px" align="center">
<asp:RadioButton ID="radsale" runat="server" Text="Sale" Checked="True"
GroupName="prop" />
<asp:RadioButton ID="radrentout" runat="server" Text="Rent Out"
GroupName="prop" />
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">Type of property</td>
<td style="padding: 5px 5px" align="center">
<asp:DropDownList ID="ddltypeofproperty" runat="server" class="txtbox"
Width="253px" Height="30px">
<asp:ListItem>Multistorey Apartment</asp:ListItem>
<asp:ListItem>Builder Floor Apartment</asp:ListItem>
<asp:ListItem>Residental House</asp:ListItem>
<asp:ListItem>Villa</asp:ListItem>
<asp:ListItem>Penthouse</asp:ListItem>
<asp:ListItem>Studio Apartment</asp:ListItem>
<asp:ListItem>Office IT Park</asp:ListItem>
<asp:ListItem>Commercial Shop</asp:ListItem>
<asp:ListItem>Commercial Showroom</asp:ListItem>
<asp:ListItem>Commercial Land</asp:ListItem>

151
<asp:ListItem>Warehouse</asp:ListItem>
<asp:ListItem>Other</asp:ListItem>
</asp:DropDownList>
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">Office/Home Address</td>
<td style="padding: 5px 5px" align="center">
<asp:TextBox ID="txtaddress" class="txtbox" runat="server" MaxLength="200"
Height="100px" TextMode="MultiLine" Width="250px"></asp:TextBox>
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">Site Address</td>
<td style="padding: 5px 5px" align="center">
<asp:TextBox ID="txtsiteaddress" class="txtbox" runat="server"
MaxLength="200" Height="100px" TextMode="MultiLine" Width="250px"></asp:TextBox>
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">City</td>
<td style="padding: 5px 5px" align="center">
<asp:DropDownList ID="ddlcity" runat="server" Width="253px" Height="30px"
class="txtbox">
<asp:ListItem>Mumbai (Bombay)</asp:ListItem>
<asp:ListItem>Pune</asp:ListItem>
<asp:ListItem>Nagpur</asp:ListItem>
<asp:ListItem>Thane</asp:ListItem>
<asp:ListItem>Pimpri-Chinchwad</asp:ListItem>
<asp:ListItem>Nashik</asp:ListItem>
<asp:ListItem>Kalyan-Dombivali</asp:ListItem>
<asp:ListItem>Vasai-Virar</asp:ListItem>
<asp:ListItem>Aurangabad</asp:ListItem>
<asp:ListItem>Navi Mumbai</asp:ListItem>
<asp:ListItem>Solapur</asp:ListItem>
<asp:ListItem>Bhiwandi</asp:ListItem>
<asp:ListItem>Amravati</asp:ListItem>
<asp:ListItem>Nanded</asp:ListItem>
<asp:ListItem>Kolhapur</asp:ListItem>
<asp:ListItem>Sangli</asp:ListItem>
<asp:ListItem>Jalgaon</asp:ListItem>
<asp:ListItem>Akola</asp:ListItem>
<asp:ListItem>Latur</asp:ListItem>

152
<asp:ListItem>Dhule</asp:ListItem>
<asp:ListItem>Ahmednagar</asp:ListItem>
<asp:ListItem>Chandrapur</asp:ListItem>
</asp:DropDownList>
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">Locality</td>
<td style="padding: 5px 5px" align="center">
<asp:TextBox ID="txtlocality" class="txtbox" runat="server" MaxLength="50"
Width="252px"></asp:TextBox>
</td>
</tr>

<tr align="left">
<td colspan="2" align="center">
<font color="#0066ff" size="5">Area</font><br />
<hr style="color:Gray" />
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">Covered Area</td>
<td style="padding: 5px 5px" align="center">
<asp:TextBox ID="txtcoveredarea" class="txtbox" runat="server"
MaxLength="50" Width="148px"></asp:TextBox>
<asp:DropDownList ID="ddlcoveredarea" runat="server" Width="100px"
Height="30px" class="txtbox">
<asp:ListItem>Sq-ft</asp:ListItem>
<asp:ListItem>Sq-yrd</asp:ListItem>
<asp:ListItem>Sq-m</asp:ListItem>
<asp:ListItem>Cent</asp:ListItem>
</asp:DropDownList>
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">Carpet Area</td>
<td style="padding: 5px 5px" align="center">
<asp:TextBox ID="txtcarpetarea" class="txtbox" runat="server"
MaxLength="50" Width="148px"></asp:TextBox>
<asp:DropDownList ID="ddlcarpetarea" runat="server" Width="100px"
Height="30px" class="txtbox">
<asp:ListItem>Sq-ft</asp:ListItem>
<asp:ListItem>Sq-yrd</asp:ListItem>

153
<asp:ListItem>Sq-m</asp:ListItem>
<asp:ListItem>Cent</asp:ListItem>
</asp:DropDownList>
</td>
</tr>

<tr align="left">
<td colspan="2" align="center">
<font color="#0066ff" size="5">Sale Price</font><br />
<hr style="color:Gray" />
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">Expected Price (INR)</td>
<td style="padding: 5px 5px" align="center">
<asp:TextBox ID="txtexprice" class="txtbox" runat="server" MaxLength="50"
Width="252px"></asp:TextBox>
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">Price per Sq-ft (INR)</td>
<td style="padding: 5px 5px" align="center">
<asp:TextBox ID="txtpricesqft" class="txtbox" runat="server" MaxLength="50"
Width="252px"></asp:TextBox>
</td>
</tr>

<tr align="left">
<td colspan="2" align="center">
<font color="#0066ff" size="5">Property Features</font><br />
<hr style="color:Gray" />
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">No. of Bedrooms</td>
<td style="padding: 5px 5px" align="center">
<asp:DropDownList ID="ddlbedrooms" runat="server" Width="253px"
Height="30px" class="txtbox">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
<asp:ListItem>4</asp:ListItem>
<asp:ListItem>5</asp:ListItem>

154
<asp:ListItem>6</asp:ListItem>
<asp:ListItem>7</asp:ListItem>
<asp:ListItem>8</asp:ListItem>
<asp:ListItem>9</asp:ListItem>
<asp:ListItem>10</asp:ListItem>
<asp:ListItem>11</asp:ListItem>
<asp:ListItem>12</asp:ListItem>
<asp:ListItem>>12</asp:ListItem>
</asp:DropDownList>
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">No. of Bathrooms</td>
<td style="padding: 5px 5px" align="center">
<asp:DropDownList ID="ddlbathrooms" runat="server" Width="253px"
Height="30px" class="textbox">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
<asp:ListItem>4</asp:ListItem>
<asp:ListItem>5</asp:ListItem>
<asp:ListItem>>5</asp:ListItem>
</asp:DropDownList>
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">No. of Balconies (Optional)</td>
<td style="padding: 5px 5px" align="center">
<asp:DropDownList ID="ddlbalconies" runat="server" Width="253px"
Height="30px" class="txtbox">
<asp:ListItem>0</asp:ListItem>
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
<asp:ListItem>4</asp:ListItem>
<asp:ListItem>5</asp:ListItem>
<asp:ListItem>>5</asp:ListItem>
</asp:DropDownList>
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">Is your property</td>
<td style="padding: 5px 5px" align="center">

155
<asp:DropDownList ID="ddlfurnished" runat="server" Width="253px"
Height="30px" class="txtbox">
<asp:ListItem>--Furnished Status--</asp:ListItem>
<asp:ListItem>Furnished</asp:ListItem>
<asp:ListItem>Unurnished</asp:ListItem>
<asp:ListItem>Semi-Furnished</asp:ListItem>
</asp:DropDownList>
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">Floor No of your property</td>
<td style="padding: 5px 5px" align="center">
<asp:DropDownList ID="ddlfloornumberofproperty" runat="server"
Width="253px" Height="30px" class="txtbox">
</asp:DropDownList>
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">Total Floors in your building</td>
<td style="padding: 5px 5px" align="center">
<asp:DropDownList ID="ddltotalfloors" runat="server" Width="253px"
Height="30px" class="txtbox">
</asp:DropDownList>
</td>
</tr>

<tr align="left">
<td colspan="2" align="center">
<font color="#0066ff" size="5">Transaction Type , Property Availability or Age
of Construction</font><br />
<hr style="color:Gray" />
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">Transaction Type</td>
<td style="padding: 5px 5px" align="center">
<asp:DropDownList ID="ddltransactiontype" runat="server" Width="253px"
Height="30px" class="txtbox">
<asp:ListItem>New Property</asp:ListItem>
<asp:ListItem>Resale</asp:ListItem>
</asp:DropDownList>
</td>
</tr>

156
<tr align="left">
<td style="padding: 5px 5px">Possession Status</td>
<td style="padding: 5px 5px" align="center">
<asp:DropDownList ID="ddlpossession" runat="server" Width="253px"
Height="30px"
class="txtbox">
<asp:ListItem>Under Construction</asp:ListItem>
<asp:ListItem>Ready to move</asp:ListItem>
</asp:DropDownList>
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">Available from</td>
<td style="padding: 5px 5px" align="center">
<asp:DropDownList ID="ddlavailmonth" runat="server" Width="118px"
Height="30px" class="txtbox">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
<asp:ListItem>4</asp:ListItem>
<asp:ListItem>5</asp:ListItem>
<asp:ListItem>6</asp:ListItem>
<asp:ListItem>7</asp:ListItem>
<asp:ListItem>8</asp:ListItem>
<asp:ListItem>9</asp:ListItem>
<asp:ListItem>10</asp:ListItem>
<asp:ListItem>11</asp:ListItem>
<asp:ListItem>12</asp:ListItem>
</asp:DropDownList>&nbsp;
<asp:DropDownList ID="ddlavailyear" runat="server" Width="128px"
Height="30px" class="txtbox">

<asp:ListItem>2018</asp:ListItem>
<asp:ListItem>2019</asp:ListItem>
<asp:ListItem>2020</asp:ListItem>
<asp:ListItem>2021</asp:ListItem>
<asp:ListItem>2022</asp:ListItem>
<asp:ListItem>2023</asp:ListItem>
<asp:ListItem>2024</asp:ListItem>
<asp:ListItem>2025</asp:ListItem>
</asp:DropDownList>
</td>
</tr>

157
<tr align="left">
<td colspan="2" align="center">
<font color="#0066ff" size="5">Description</font><br />
<hr style="color:Gray" />
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">Add details of your property</td>
<td style="padding: 5px 5px" align="center">
<asp:TextBox ID="txtdesc" class="txtbox" runat="server" MaxLength="400"
Height="150px" TextMode="MultiLine" Width="252px"
placeholder="Eg: 3 BHK comfortable flat with 2 attached bathrooms located in
Mayur Vihar Phase I, Mumbai. 2 minutes walking distance from metro station, Schools, Star
City Mall and markets are located nearby."></asp:TextBox>
</td>
</tr>

<tr align="left">
<td colspan="2" align="center">
<font color="#0066ff" size="5">Upload pictures</font><br />
<hr style="color:Gray" />
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">Picture 1</td>
<td style="padding: 5px 5px" align="center">
<asp:FileUpload ID="fupic1" runat="server" />
<br />
<asp:LinkButton ID="lblpic1" runat="server" Font-Bold="True"
Font-Size="X-Small" ForeColor="Blue"></asp:LinkButton>
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">Picture 2</td>
<td style="padding: 5px 5px" align="center">
<asp:FileUpload ID="fupic2" runat="server" />
<br />
<asp:LinkButton ID="lblpic2" runat="server" Font-Bold="True"
Font-Size="X-Small" ForeColor="Blue"></asp:LinkButton>
</td>
</tr>

<tr align="left">

158
<td style="padding: 5px 5px">Picture 3</td>
<td style="padding: 5px 5px" align="center">
<asp:FileUpload ID="fupic3" runat="server" />
<br />
<asp:LinkButton ID="lblpic3" runat="server" Font-Bold="True"
Font-Size="X-Small" ForeColor="Blue"></asp:LinkButton>
</td>
</tr>

<tr align="left">
<td style="padding: 5px 5px">Picture 4</td>
<td style="padding: 5px 5px" align="center">
<asp:FileUpload ID="fupic4" runat="server" />
<br />
<asp:LinkButton ID="lblpic4" runat="server" Font-Bold="True"
Font-Size="X-Small" ForeColor="Blue"></asp:LinkButton>
</td>
</tr>

<tr align="left">
<td colspan="2" style="padding: 5px 5px">
<br />
<asp:CheckBox ID="chkterms" runat="server"
Text="I am the owner/I have the authority to post this property.I agree not to
provide incorrect property information or state a discriminatory preference.In case, the
information does not comply with FindHomes terms, FindHomes.com has the right to
edit/remove the property from their site."
Checked="True" Enabled="False" />
</td>
</tr>

<tr align="left">
<td colspan="2" align="center" style="padding: 5px 5px">
<asp:Button ID="btnsave" runat="server" Text="Submit Now" Width="252px"
class="css_button1" Height="37px"></asp:Button>
</td>
</tr>
<tr align="left">
<td colspan="2">
<asp:RequiredFieldValidator ID="rfv1" runat="server"
ErrorMessage="Enter Caption." ControlToValidate="txtcaption"
Display="None"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="rfv2" runat="server"
ErrorMessage="Ener Builder Name." ControlToValidate="txtBuilder"
Display="None"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="rfv3" runat="server"

159
ErrorMessage="Enter Developer Company Name."
ControlToValidate="txtBuilderComp"
Display="None"></asp:RequiredFieldValidator>

<asp:RequiredFieldValidator ID="rfv4" runat="server"


ErrorMessage="Enter Office/Home Address." ControlToValidate="txtaddress"
Display="None"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="rfv5" runat="server"
ErrorMessage="Enter Site Address." ControlToValidate="txtsiteaddress"
Display="None"></asp:RequiredFieldValidator>

<asp:RequiredFieldValidator ID="rfv6" runat="server"


ErrorMessage="Enter Locality." ControlToValidate="txtlocality"
Display="None"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="rfv7" runat="server"
ErrorMessage="Enter Covered Area." ControlToValidate="txtcoveredarea"
Display="None"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="rfv8" runat="server"
ErrorMessage="Enter Carpet Area." ControlToValidate="txtcarpetarea"
Display="None"></asp:RequiredFieldValidator>

<asp:RequiredFieldValidator ID="rfv9" runat="server"


ErrorMessage="Enter Your Expected Price." ControlToValidate="txtexprice"
Display="None"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="rfv10" runat="server"
ErrorMessage="Enter Rate per Sq-ft." ControlToValidate="txtpricesqft"
Display="None"></asp:RequiredFieldValidator>

<asp:RequiredFieldValidator ID="rfv11" runat="server"


ErrorMessage="Enter Site Description." ControlToValidate="txtdesc"
Display="None"></asp:RequiredFieldValidator>
</td>
</tr>
</table>
</center>
</div>
</div>
</div>
</asp:Content>

UPLOADADS.ASPX.VB

Imports ASP.global_asax
Imports System.Data
Imports System.Data.SqlClient

160
Partial Class _Default
Inherits System.Web.UI.Page
Dim cmd As SqlCommand
Dim da As SqlDataAdapter
Dim ds As DataSet
Dim val As Integer
Dim str As Integer
Dim i, count, value As Integer

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles


Me.Load
Dim editmode As String = ""
Try
editmode = Request.QueryString("em").ToString()
Catch ex As Exception
editmode = ""
End Try

If Not Page.IsPostBack Then


connection_create()
disable()

'Fill DDL's
ddlfloornumberofproperty.Items.Clear()
ddltotalfloors.Items.Clear()

ddlfloornumberofproperty.Items.Add("-2")
ddlfloornumberofproperty.Items.Add("-1")
ddlfloornumberofproperty.Items.Add("0")

For x = 1 To 200
ddlfloornumberofproperty.Items.Add(x)
ddltotalfloors.Items.Add(x)
Next

If editmode <> "" Then


'Code for edit
btnnew.Enabled = False
btnsave.Enabled = True
enable()
Session("save") = "1"
display(editmode)
Else
'Code for new
btnnew.Enabled = True
btnsave.Enabled = False

161
End If
End If
End Sub

Public Sub enable()


txtcaption.Enabled = True
txtBuilder.Enabled = True
txtBuilderComp.Enabled = True

radsale.Enabled = True
radrentout.Enabled = True

ddltypeofproperty.Enabled = True

txtaddress.Enabled = True
txtsiteaddress.Enabled = True

ddlcity.Enabled = True
txtlocality.Enabled = True

txtcoveredarea.Enabled = True
ddlcoveredarea.Enabled = True

txtcarpetarea.Enabled = True
ddlcarpetarea.Enabled = True

txtexprice.Enabled = True
txtpricesqft.Enabled = True

ddlbedrooms.Enabled = True
ddlbathrooms.Enabled = True
ddlbalconies.Enabled = True
ddlfurnished.Enabled = True
ddlfloornumberofproperty.Enabled = True
ddltotalfloors.Enabled = True

ddltransactiontype.Enabled = True
ddlpossession.Enabled = True
ddlavailmonth.Enabled = True
ddlavailyear.Enabled = True

txtdesc.Enabled = True

fupic1.Enabled = True
fupic2.Enabled = True
fupic3.Enabled = True

162
fupic4.Enabled = True
End Sub

Public Sub disable()


txtcaption.Enabled = False
txtBuilder.Enabled = False
txtBuilderComp.Enabled = False

radsale.Enabled = False
radrentout.Enabled = False

ddltypeofproperty.Enabled = False

txtaddress.Enabled = False
txtsiteaddress.Enabled = False

ddlcity.Enabled = False
txtlocality.Enabled = False

txtcoveredarea.Enabled = False
ddlcoveredarea.Enabled = False

txtcarpetarea.Enabled = False
ddlcarpetarea.Enabled = False

txtexprice.Enabled = False
txtpricesqft.Enabled = False

ddlbedrooms.Enabled = False
ddlbathrooms.Enabled = False
ddlbalconies.Enabled = False
ddlfurnished.Enabled = False
ddlfloornumberofproperty.Enabled = False
ddltotalfloors.Enabled = False

ddltransactiontype.Enabled = False
ddlpossession.Enabled = False
ddlavailmonth.Enabled = False
ddlavailyear.Enabled = False

txtdesc.Enabled = False

fupic1.Enabled = False
fupic2.Enabled = False
fupic3.Enabled = False
fupic4.Enabled = False

163
End Sub

Public Sub clear()


Try
txtcaption.Text = ""
txtBuilder.Text = ""
txtBuilderComp.Text = ""

radsale.Checked = True
radrentout.Checked = False

ddltypeofproperty.SelectedIndex = 0

txtaddress.Text = ""
txtsiteaddress.Text = ""

ddlcity.SelectedIndex = 0
txtlocality.Text = ""

txtcoveredarea.Text = ""
ddlcoveredarea.SelectedIndex = 0

txtcarpetarea.Text = ""
ddlcarpetarea.SelectedIndex = 0

txtexprice.Text = ""
txtpricesqft.Text = ""

ddlbedrooms.SelectedIndex = 0
ddlbathrooms.SelectedIndex = 0
ddlbalconies.SelectedIndex = 0
ddlfurnished.SelectedIndex = 0
ddlfloornumberofproperty.SelectedIndex = 0
ddltotalfloors.SelectedIndex = 0

ddltransactiontype.SelectedIndex = 0
ddlpossession.SelectedIndex = 0
ddlavailmonth.SelectedIndex = 0
ddlavailyear.SelectedIndex = 0

txtdesc.Text = ""

fupic1.Dispose()
fupic2.Dispose()
fupic3.Dispose()
fupic4.Dispose()

164
'imgphoto.ImageUrl = "~/images/products/NAvail.jpg"
Catch ex As Exception
End Try
End Sub

Protected Sub getdata()


da = New SqlDataAdapter("select * from PropertyDetails", con)
ds = New DataSet
da.Fill(ds)
End Sub

Private Sub autogenerate()


Call getdata()
count = ds.Tables(0).Rows.Count

Dim arr As New ArrayList


arr.Clear()
If count = 0 Then
value = 1
Else
For a = 0 To count - 1
arr.Add(ds.Tables(0).Rows(a).Item(0))
arr.Sort()
Next

For Each sss In arr


value = sss
Next

value = value + 1
End If
End Sub

Public Sub display(ByVal pid As String)


Try
da = New SqlDataAdapter("select * from PropertyDetails where propertyid='" & pid & "'
", con)
ds = New DataSet
da.Fill(ds)

If ds.Tables(0).Rows.Count > 0 Then


lblid.Text = ds.Tables(0).Rows(0).Item(1)
txtcaption.Text = ds.Tables(0).Rows(0).Item(2)
txtBuilder.Text = ds.Tables(0).Rows(0).Item(3)
txtBuilderComp.Text = ds.Tables(0).Rows(0).Item(4)

165
If ds.Tables(0).Rows(0).Item(5) = "Sale" Then
radsale.Checked = True
ElseIf ds.Tables(0).Rows(0).Item(5) = "Rent Out" Then
radrentout.Checked = True
End If

ddltypeofproperty.Text = ds.Tables(0).Rows(0).Item(6)
txtaddress.Text = ds.Tables(0).Rows(0).Item(7)
txtsiteaddress.Text = ds.Tables(0).Rows(0).Item(8)
ddlcity.Text = ds.Tables(0).Rows(0).Item(9)
txtlocality.Text = ds.Tables(0).Rows(0).Item(10)

txtcoveredarea.Text = ds.Tables(0).Rows(0).Item(11)
ddlcoveredarea.Text = ds.Tables(0).Rows(0).Item(12)

txtcarpetarea.Text = ds.Tables(0).Rows(0).Item(13)
ddlcarpetarea.Text = ds.Tables(0).Rows(0).Item(14)

txtexprice.Text = ds.Tables(0).Rows(0).Item(15)
txtpricesqft.Text = ds.Tables(0).Rows(0).Item(16)

ddlbedrooms.Text = ds.Tables(0).Rows(0).Item(17)
ddlbathrooms.Text = ds.Tables(0).Rows(0).Item(18)
ddlbalconies.Text = ds.Tables(0).Rows(0).Item(19)

ddlfurnished.Text = ds.Tables(0).Rows(0).Item(20)
ddlfloornumberofproperty.Text = ds.Tables(0).Rows(0).Item(21)
ddltotalfloors.Text = ds.Tables(0).Rows(0).Item(22)

ddltransactiontype.Text = ds.Tables(0).Rows(0).Item(23)
ddlpossession.Text = ds.Tables(0).Rows(0).Item(24)

ddlavailmonth.Text = ds.Tables(0).Rows(0).Item(25)
ddlavailyear.Text = ds.Tables(0).Rows(0).Item(26)

txtdesc.Text = ds.Tables(0).Rows(0).Item(27)

'Images
If ds.Tables(0).Rows(0).Item(28) <> "" Then
lblpic1.Text = ds.Tables(0).Rows(0).Item(28)
End If

If ds.Tables(0).Rows(0).Item(29) <> "" Then


lblpic2.Text = ds.Tables(0).Rows(0).Item(29)
End If

166
If ds.Tables(0).Rows(0).Item(30) <> "" Then
lblpic3.Text = ds.Tables(0).Rows(0).Item(30)
End If

If ds.Tables(0).Rows(0).Item(31) <> "" Then


lblpic4.Text = ds.Tables(0).Rows(0).Item(31)
End If
End If
Catch ex As Exception
End Try
End Sub

Protected Sub btnsave_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles btnsave.Click
Dim sqlq As String = ""
Try
str = 0
If Session("save").Equals(str) Then
'insert
autogenerate()
Dim rad As String
If radsale.Checked = True Then
rad = "Sale"
Else
rad = "Rent Out"
End If

Dim p1, p2, p3, p4 As String : p1 = "" : p2 = "" : p3 = "" : p4 = ""


If fupic1.FileName <> "" Then
fupic1.SaveAs(Server.MapPath("~") & "/images/PropertyImages/" & lblid.Text &
"a.jpg")
p1 = lblid.Text & "a.jpg"
Else
p1 = ""
End If

If fupic2.FileName <> "" Then


fupic2.SaveAs(Server.MapPath("~") & "/images/PropertyImages/" & lblid.Text &
"b.jpg")
p2 = lblid.Text & "b.jpg"
Else
p2 = ""
End If

If fupic3.FileName <> "" Then

167
fupic3.SaveAs(Server.MapPath("~") & "/images/PropertyImages/" & lblid.Text &
"c.jpg")
p3 = lblid.Text & "c.jpg"
Else
p3 = ""
End If

If fupic4.FileName <> "" Then


fupic4.SaveAs(Server.MapPath("~") & "/images/PropertyImages/" & lblid.Text &
"d.jpg")
p4 = lblid.Text & "d.jpg"
Else
p4 = ""
End If

Dim email As String


email = ""
Try
email = Session("LoginId").ToString
Catch ex As Exception
email = ""
End Try
If email = "" Then
MsgBox("Session Expired. Please Login Again", MsgBoxStyle.Information, "")
Response.Redirect("LogOut.aspx")
Exit Sub
End If

sqlq = "Insert into PropertyDetails values(" & value & ",'" & lblid.Text & "','" &
txtcaption.Text & "','" & txtBuilder.Text & "', '" & txtBuilderComp.Text & "', '" & rad & "', '" &
ddltypeofproperty.Text & "', '" & txtaddress.Text & "', '" & txtsiteaddress.Text & "', '" &
ddlcity.Text & "', '" & txtlocality.Text & "', '" & txtcoveredarea.Text & "', '" &
ddlcoveredarea.Text & "', '" & txtcarpetarea.Text & "', '" & ddlcarpetarea.Text & "', '" &
txtexprice.Text & "', '" & txtpricesqft.Text & "', '" & ddlbedrooms.Text & "', '" &
ddlbathrooms.Text & "', '" & ddlbalconies.Text & "', '" & ddlfurnished.Text & "', '" &
ddlfloornumberofproperty.Text & "', '" & ddltotalfloors.Text & "', '" & ddltransactiontype.Text
& "', '" & ddlpossession.Text & "', '" & ddlavailmonth.Text & "', '" & ddlavailyear.Text & "', '" &
txtdesc.Text & "', '" & p1 & "', '" & p2 & "', '" & p3 & "', '" & p4 & "', '" & email & "')"
cmd = New SqlCommand
cmd.Connection = con
cmd.CommandText = sqlq
cmd.ExecuteNonQuery()
'imgphoto.ImageUrl = "~/images/products/" + lblid.Text + ".jpg"

168
MsgBox("Your Advertisement has been submitted. It will be activated soon.",
MsgBoxStyle.Information, "Success")

Else
'update code

Dim p1, p2, p3, p4 As String : p1 = "" : p2 = "" : p3 = "" : p4 = ""


If fupic1.FileName <> "" Then
fupic1.SaveAs(Server.MapPath("~") & "/images/PropertyImages/" & lblid.Text &
"a.jpg")
p1 = lblid.Text & "a.jpg"
Else
p1 = ""
End If

If fupic2.FileName <> "" Then


fupic2.SaveAs(Server.MapPath("~") & "/images/PropertyImages/" & lblid.Text &
"b.jpg")
p2 = lblid.Text & "b.jpg"
Else
p2 = ""
End If

If fupic3.FileName <> "" Then


fupic3.SaveAs(Server.MapPath("~") & "/images/PropertyImages/" & lblid.Text &
"c.jpg")
p3 = lblid.Text & "c.jpg"
Else
p3 = ""
End If

If fupic4.FileName <> "" Then


fupic4.SaveAs(Server.MapPath("~") & "/images/PropertyImages/" & lblid.Text &
"d.jpg")
p4 = lblid.Text & "d.jpg"
Else
p4 = ""
End If

Dim rad As String


If radsale.Checked = True Then
rad = "Sale"
Else
rad = "Rent Out"
End If

169
sqlq = "update PropertyDetails set caption='" & txtcaption.Text & "',buildername='" &
txtBuilder.Text & "',buildercompname='" & txtBuilderComp.Text & "',wantto='" & rad &
"',typeofproperty='" & ddltypeofproperty.Text & "',officehomeaddress='" & txtaddress.Text &
"',siteaddress='" & txtsiteaddress.Text & "',city='" & ddlcity.Text & "',locality='" &
txtlocality.Text & "',coveredarea='" & txtcoveredarea.Text & "',coveredareatype='" &
ddlcoveredarea.Text & "',carpetarea='" & txtcarpetarea.Text & "',carpetareatype='" &
ddlcarpetarea.Text & "',expectedprice='" & txtexprice.Text & "',pricepersqft='" &
txtpricesqft.Text & "',noofbedrooms='" & ddlbedrooms.Text & "',noofbathrooms='" &
ddlbathrooms.Text & "',noofbalconies='" & ddlbalconies.Text & "',furnished='" &
ddlfurnished.Text & "',floorno='" & ddlfloornumberofproperty.Text & "',totalfloors='" &
ddltotalfloors.Text & "',transactiontype='" & ddltransactiontype.Text & "',possessionstatus='" &
ddlpossession.Text & "',availfrommonth='" & ddlavailmonth.Text & "',availfromyear='" &
ddlavailyear.Text & "',description='" & txtdesc.Text & "' where propertyid='" & lblid.Text & "' "
cmd = New SqlCommand
cmd.Connection = con
cmd.CommandText = sqlq
cmd.ExecuteNonQuery()

If fupic1.FileName <> "" Then


sqlq = "update PropertyDetails set picture1='" & lblid.Text & "a.jpg" & "' where
propertyid='" & lblid.Text & "'"
cmd = New SqlCommand
cmd.Connection = con
cmd.CommandText = sqlq
cmd.ExecuteNonQuery()
End If

If fupic2.FileName <> "" Then


sqlq = "update PropertyDetails set picture2='" & lblid.Text & "b.jpg" & "' where
propertyid='" & lblid.Text & "'"
cmd = New SqlCommand
cmd.Connection = con
cmd.CommandText = sqlq
cmd.ExecuteNonQuery()
End If

If fupic3.FileName <> "" Then


sqlq = "update PropertyDetails set picture3='" & lblid.Text & "c.jpg" & "' where
propertyid='" & lblid.Text & "'"
cmd = New SqlCommand
cmd.Connection = con
cmd.CommandText = sqlq
cmd.ExecuteNonQuery()
End If

If fupic4.FileName <> "" Then

170
sqlq = "update PropertyDetails set picture4='" & lblid.Text & "d.jpg" & "' where
propertyid='" & lblid.Text & "'"
cmd = New SqlCommand
cmd.Connection = con
cmd.CommandText = sqlq
cmd.ExecuteNonQuery()
End If

MsgBox("Your Advertisement has been modified.", MsgBoxStyle.Information,


"Success")

End If

clear()
lblid.Text = "Not Available"
disable()

btnnew.Enabled = True
btnsave.Enabled = False
Session("save") = ""
Response.Redirect("UploadAds.aspx")

Catch ex As Exception
End Try
End Sub

Protected Sub btnnew_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles btnnew.Click
Try
enable()
autogenerate()
btnnew.Enabled = False
btnsave.Enabled = True
clear()
Session("save") = 0

lblid.Text = "Prop" & value


Catch ex As Exception
End Try
End Sub

171
DATA ENTRY SCREENS

1.HOME PAGE

172
2.SUBCRIBE PAGE

173
2.ABOUT US

3.CONTACT US

174
4.LOGIN PAGE

175
5.REGISTRATION FORM

176
6.USER PROFILE

7.UPLOAD ADS

177
7. MY ADS

178
8.REPORTS

179
Test
Cases,Test
Data

180
What is Test Case?
“A Test Case has a component that describe an input, action or event expected response, to
determine if a feature of an application is working correctly.”

Software testing can be stated as the process of validating and verifying that a computer
program/application/product:

 Meets the requirements that guided its design and development.


 Works as expected
 Can be implemented with the same characters.

And satisfies the needs of Stakeholders.
Why we Write Test Case?
A Test Case in Software Engineering is a set of conditions or variables under which a tester will
determine whether an application , software system or one of its feature is working as it was
originally established for it to do.
The basic objective to write test case is to validate testing coverage for the application.
Test Cases bring some sort of standardization and minimize the ad-hoc approach in testing.

181
Test Case
Purpose: Short sentence or two about the aspect of the system is being
tested. If this gets too long break the test case up or put more
information into descrition.

Assumptions Assumptions that must be met before the test case can be run.
: Example “Logged In”, “guest login allowed” ,
“user testuser exits”.

Test Data: List of variables and possible values used in the test case. You
cal list specific values or describe value ranges. The test case
should be performed once for each combination
Of values. These values written in set notation one per line.
E.g; LoginId{Valid login, invalid login,login empty}

Steps: Steps to carry out the test. See step formatting rules below:
1. Visit Login page
2. Enter User Name
3. Enter Password
4. Click Login

Expected Valid username and password


Results: ….Here you have to paste your Login Page image

Actual Test Data:


Results: ….Empty username and empty password
Here you have to paste your empty user name and password
field.. along with message box in alert type message
box……….
After than invalid username and password image along with
msgbox…. (Total there should be 4 images)
1 FOR pls enter pwd 1 fr

182
pls enter email
2 3 fr pls enter valid pwd
3 pls enter valid email….

Comments: If username and password are correctly entered only then you
will be taken to next page.

Purpose: If the values entered in the text box are correct


and then the data is accepted.
Assumptions: The values in the textbox should be correctly
entered should be numeric only, alphabets only
appropriate email formats.
Test Data: List of variables and their possible values used
in the test cases. You can list specific values or
describe value ranges. The test case should be
performed once for combination of values.
These values written in set notation, one per
line.
Steps: 1. Visit Add Delivery boy form
2. Enter Details.
3. And check validation replies.
Expected Result: Valid Data:
(1st image should be Entered everything
correctly and msgbox should be 1record saved)

Actual Results: Test Data:


2nd image invalid email address image along
with msgbox
Test Data: Empty Enteries:
Don’t Write First Name along with screen
layout and image and msgbox…
Invalid mobile number along with screen

183
layout and image and msgbox…

Comments: If all the details are correct then the records in


field are saved in database and you can view
those records in grid view to.

184
Reports
Layout

185
References
And
Bibliography

186
References
 Murach’s Visual Basic 2008
 College Practical
 Integrated Approach to Software
Engineering

187
188

You might also like