Documente Academic
Documente Profesional
Documente Cultură
On
Friendsworld.co.in
For
Submitted By
Ashutosh Thakur
(Enroll. No. 072776930)
This is certify that Ashutosh Thakur has carried out the work embodies in this project is entitled
“Friendsworld.co.in” under my guidance and supervision in fulfillment of the requirement for
MCA 4th semester Mini Project from IGNOU. The Work in this project is original and I am
completely satisfied with this work, and wish her all success in future life.
(Project Manager)
ACKNOWLEDGEMENT
Many persons have contributed to make this project Friendsworld.co.in a reality. I would
especially like to express my appreciation to Mr. Ikram for his unstinted support,
encouragement and his painstakingly and meticulous effort towards developing this software.
I acknowledge the help and cooperation received from all the faculty members of Ducat
Academy Noida. Several colleagues and students have contributed directly and indirectly to
the contents this software, as they had given me numerous ideas. Their criticism gave me the
much-needed hints about the areas that needed elaboration and amendments and also to
present them with greater clarity.
I sincerely express my gratitude to Mr. Vipul Mishra, the present center manager of Ducat
Consultancy Ltd Noida, for his support and help in the final preparation of this Report.
Thanking you!
Ashutosh Thakur
S.NO. TOPIC
1. Preface
3. Theoretical Background
i. Module Of Friendsworld.co.in
4. Problem Definition
5. Benefits To User
6. System Analysis
i. Project Planning
v. System Planning
v. Output Requirements
8. Methodology Used
i. Introduction
9. System Implementation
i. E-R Diagram
i. Introduction
v. Exception Handling
18. Code
20. Conclusion
i. Advantages
ii. Limitation
22. References
i. Bibliography
PREFACE
When A Computer Software succeeds-when it meets the needs of the people who use it, when
it performs flawlessly over along period of time, when it is easy to modify and even easier to
use-it can and does change things for the better. But when software fails-when its users are
dissatisfied, when it is error prone, when it is difficult to change and even harder to use-bad
things can and do happen.
We all want to build software that makes things better, avoiding the bad things that
lurk in the shadow of failed efforts. To succeed we need discipline when software is designed
and built. Many individuals and companies still develop software haphazardly, even as they
build systems to service the most advanced technologies of the day. As a result, the quality of
the software that we produce suffers and bad things happen.
The report starts with a comprehensive introduction to the project undertaken as its very
First Section. It includes objectives and scope of the project; about the front-end tool used i.e.
ASP.Net with C# and the back-end tool i.e. SQL Server 2005. The second part presents and
discusses the theoretical background of the project. The third section encompasses all the
problems of the software that includes what is expected from the software, the demands and
the requirements of the end-users. The fourth part is the System analysis and design section.
This part focuses on requirements analysis and specification, analysis issues, detailed
procedures and the database designs. In The fifth section, different approaches to formal
evaluation and review techniques are explored. The sixth section highlights the methodology
adopted for this project. The
seventh part suggests the steps required to implement the software on the user machine. The
eighth part discusses the hardware and software requirements of the user machines. The ninth
part deals with the cost benefit analysis. The tenth section contains the data flow diagrams.
The next section is the flowchart part. The next section is for the entity
relationship diagram of the project. The thirteenth part explains the methodology used for
testing. The fourteenth section is the test report. The fifteenth part is the most important part of
the project i.e. the code for the software. The sixteenth part is the user manual section. The
seventeenth part is the annexure for the topic that includes some details about the
organization, the data dictionary, definitions, acronyms and abbreviations used in the report.
The final section is the reference part that contains a list of the books and reports that were
referred during the development of the project and the report as well.
The emphasis in this report is to document the important concepts and techniques
used for the successful development of this project.
I do hope fervently that, through this report, the readers will get a real picture of what
the project is all about. I also wish that may this software satisfies all the needs and
requirements of the organization, for which it is meant.
OBJECTIVES & SCOPE OF THE PROJECT
The main objective of the project is to establish a network among the people residing in
all over the world. All the information can be easily accessed and shared among the
people.
This system provides users to register their various types of profile like social, personal,
general, professional.
This system provides users to send a scrap message, images, and music files to their
friends. User can maintain the scrap book whatever scraps he has send to users.
The system provides users to upload the photos so that user can maintain own album.
This system provides user to join the communities according to their scenario.
This system provides the user to maintain their friend list and user can update their
friend list.
This system provides user to send invitation to another friend to join the
Friendworld.co.in and can add to their friend list for future.
THEORETICAL BACKGROUND
The primary goal of this software is to provide an internet social network service which
designed to help users meet new friends and maintain existing relationships. The main goal of
the service is to make your social life and that of your friends, more active and stimulating.
Friendsworld.co.in’s social network can help you both maintain existing relationships and
establish new ones by reaching out to people you have never met before who you interact
With is entirely up to you.
MODULES OF FRIENDSWORLD.CO.IN
Each Friendsworld.co.in module has different requirements from the others. This section
describes the requirements, design, and implementation of each module.
Scrap Module
Security Module
Profile Module
Friend Invitation Module
Registration Module
Scrap Module—the scrap module provides facility of sending scrap and receiving scraps.
Security Module—the security module requires a user to sign on before accessing certain
screens, and manages the sign on process
Profile Module—the profile module enables user to change his/her profile and friends profile.
The module facilitate user to maintain various type of profiles like personal, professional,
social.
Friend Invitation Module—the friend invitation module provides feature of sending invitation
to his/her friends.
Registration Module—using Registration module, a new user can get registered by filling
registration forms.
PROBLEM DEFINITION
Fully customized.
In the current working system the user faces so many problems. Some of them are
given below:
Earlier there was no such social portal which provided such kind of real interaction in terms of
exchanging personal profile, or common platform where one could interact with others.
Feelings of loneliness.
Lack of customization
Computer software has become a driving force. It is the engine that drives business decision-
making. The Application is a working demonstration of how to use blueprints principles in a
real application design. This document is an online guide to the design and the implementation
of the application Enterprise Applications with web technology. Each release of the
application maintains consistent design features such as separating logic and presentation,
using web component for control and web pages for presentation, using business components,
and so on.
High-level design features, this document goes deeper into the implementation details of the
current application release. This document is provided as an online-only resource so that it
may be continually extended and updated. This document begins with a description of the
separate applications that the sample application comprises, describes the modular structure
of the FRIENDWORLD.CO.IN application, and provides an in-depth description of several
pieces of the modules. Conclusively this software will provide following benefits to its users:
Providers the platform to interact to there friends and also fine new friends around the
world.
Shows the graphically the upcoming birthdays of you friends so now you don’t have to
remember your friends birthdays.
Provides the way to send or receives messages form your friends and family member
and makes you connected to others even you are far away from him.
Provider some storage space where you can store you memorable memories in the
form of photos and videos.
You can do instant chat with your friend easily because it is very easy and user friendly.
Requirements analysis is a software engineering task that bridges the gap between system
level requirements engineering and software design. Requirements engineering activities
result in the specification of software’s operational characteristics (function, data and
behavior), indicate software’s interface with other system elements, and establish constraints
that software must meet. The most commonly used requirements technique is to conduct a
meeting or interview. The first meeting between a software engineer (the analyst) and the
customer can be likened to the awkwardness of a first date between two adolescents. Neither
person knows what to say or ask; both are worried that they do say will be misinterpreted; both
are thinking about where it might lead (both likely have radically different expectations here);
both want to get the thing over with, but at the same time, both want it to be a success.
Gause and Weinberg suggest that the analyst start by asking CONTEXT-FREE
QUESTIONS. That is, a set of questions that will lead to a basic understanding of the problem,
the people who want a solution, the nature of the solution that is desired, and the effectiveness
of the first encounter itself.
The goal of the requirements gathering activity is to collect all relevant information
from the customer regarding the product to be developed with a view to clearly understanding
the customer requirements and weeding out the incompleteness and inconsistencies in these
requirements. The requirements analysis activity is begun by collecting all relevant data
regarding the product to be developed from the users of the product and from the customer
through interviews and discussions.
Data collection is done by taking the copies of the documents involved in its working
from the organization.
PROJECT PLANNING
Topic understanding.
Modular break-up of the system.
Processor logic for each module.
Database requirements.
TOPIC UNDERSTANDING
It is vital to understand the each and every aspect project. So as soon as the project was allocated, we
carefully went through the project to identify the requirements of the project.
Gantt chart is a project scheduling technique. Progress can be represented easily in Gantt
chart, by coloring each milestone when completed. The project will start in the month of
February and end will end after 4 months at the end May
Page | 25
FESIBILITY ANALYSIS
Feasibility study is conducted to select the best system that meets the performance
requirements. This entails an identification, description, and evaluation of the candidate
system, and the section of the best system for the job.
Many feasibility studies are disillusioning for both user and analyst. First the study often
pre-supposes that when feasibility of the documents is being prepared, the analysis is in
position to evaluate solutions. Second most studies tend to overlook the confusion
inherent in the system development … the constraints and the assumed attitudes. If the
feasibility study is to serve as decision document, it must answer three key questions:
Is there new and better way to do a job that will benefit the user?
What is recommended?
The most successful system projects are not necessary or most visible in business but
rather those that truly need user expectations. More projects failed because of inflated
expectations than for any other reasons.
Page | 26
TECHNICAL ANALYSIS
Technical feasibility centers on the current system and to what extent it can support the
proposed system, it includes current computer system specifications such as hardware,
software etc. it also involves financial considerations to accommodate the technical
enhancements. If the budget is serious constraint then the project is judged not feasible.
Though the system is developed in the generalized form, which covers all the
procedures and operations carried out in any Social networking site. The version used
in the system is ASP.Net and MS-SQL Server.
The features embedded in the system are latest and according to the need of the client.
Such as creating profile, adding friends and other feature that are required for social
networking site. The backend used is the latest Microsoft SQL Server version, which
also supports to view the database contents, relationship with the connected database
including the primary, foreign key. Any up gradations needed can be easily made in the
source code, thus decreasing the headache of changing each and every code. If in near
future, the latest version of ASP.Net/ MS-SQL Server to be installed then , the source
code handling the connection of the database can easily be modified. The codes are
easily compatible for the changes, as the latest version doesn't affect the core code.
MS-SQL Server can manage large amount of data and is simple and secure. Using
ASP.NET helps us to design the look of our application and its windows. ASP.NET full
open database connectivity (ODBC) with MS-SQL Server, Data accessibility, response
and output require less time.
Page | 27
COST ANALYSIS
The cost to conduct investigation was negligible, as the centre manager and teachers of
centre provided most of information.
The cost of essential hardware and software requirement is not very expensive.
Moreover hardware like Pentium I PC and software like ASP.NET and MS-SQL
Server2005 are easily available in the market.
Time is saved as all the work can be done by a simple mouse click.
Since benefits out base the cost, hence our project is economically feasible.
Page | 28
OPERATIONAL FESIBILITY
In this we determine what change will be brought in system, new skills required and
other human organization and political aspects.
Each user can easily use our site. However it is desirable that the user has the basic
knowledge of the computers.
Without making any changes in the rules and regulations of the existing system
proposed system can easily adopted.
LEGAL FESIBILITY
Our Project does not infringe with known acts, status or any pending legislation. Hence
it is legally feasible.
SOCIAL FESIBILITY
Since, the proposed system is inexpensive, easy to use, reduces human errors, fast
and simple, hence socially accepted by all organization and institutes being directly
affected by it.
Page | 29
FUNCTIONAL REQUIREMENTS
There must be a net connection and browser to view the web pages of respective
site
Page | 30
SYSTEM PLANNING
INTRODUCTION
Work breakdown structure is used to decompose a given task set recursively into small
activities. WBS provides a notation for representing the major tasks needed to be
carried out in order to solve a problem. The root of the tree is labeled by the problem
name. Each node of the tree is broken down into smaller activities that are made the
children of the node. Each activity is recursively decomposed into smaller sub-activities
until at the leaf level; the activities require approx. two weeks to develop. If a task is
broken down into a large number of very small activities, these can be distributed to a
large number of engineers. If the activity ordering permits, the solutions to these can be
carried out independently. Thus, it becomes possible to develop the product faster.
Page | 31
Application software
Page | 32
#ANALYSIS
*CONCEPTION
-CONCEPTION INITIATION
UNDERSTAND REQUIREMENTS
*REQUIREMENT ANALYSIS
~SCENARIO DEVELOPMENT
~FUNCTIONAL MODELING
-DATA ANALYSIS
~PERSISTENCY REQUIREMENT
-PERFORMANCE ANALYSIS
~LOAD REQUIREMENT
Page | 33
#DESIGN
*OVERALL DESIGN
*ARCHITECTURAL DESIGN
-DATA ANALYSIS
-MODULE DECOMPOSITION
-PROCESS DESIGN
*DETAIL DESIGN
-UNIT DESIGN
-MODULE DESIGN
-MECHANISMS DESIGN
-FUNCTIONAL DESIGNS
-SUBSYSTEM DESIGN
-INTERFACE DESIGN
-DFD PREPARATION
-FLOWCHART PREPARATION
Page | 34
#CODING
-MODULE PREPARATION
-MODULE IMPLEMENTATION
-UTILITIES DEVELOPMENT
-NAMESPACE ORGANIZATION
-IMPLEMENTATION OF MECHANISMS
-WORKFLOWS DEVELOPMENT
#TESTING
-MECHANISMS TESTING
-UNIT TESTING
-MODULE TESTING
-STRESS TESTING
-ROBUSTNESS TESTING
Page | 35
#DEPLOYMENT
-EXECUTABLE CREATION
-SET UP CREATION
#DOCUMENTATION
Page | 36
PERT CHART
PERT shows precedence relationships among the tasks and various stages of a
project. By the helps of PERT chart, a project manager can identify the activities and the
amount of time they require, show their interrelationships, specify their sequence, and
have a meant of monitoring progress on the project.
PERT makes use of tasks. Like milestone charts, it shows achievements. These
achievements however are not task achievements. They are terminal achievements,
called EVENTS.
The circles represent the beginning or completion of a task. The nodes at the network (
also referred as events ) establish the relationship among the different activities of the
project. The rules are available for construction networks:
Each activity is represented by one and only one arrow in the network.
This is the table of ‘Activity’ and it’s estimated time duration, which are used to
accomplish the project “FRIENDSWORLD.CO.IN”.
Page | 37
Activity Preprocessor(s) Duration (In Days)
A: Study - 15
B: Analysis A 15
C: Form Design B 8
D: Coding and Testing C 12
E: Database Design B 8
F: Connectivity D, E 10
G: Test with Database F 15
H: Documentation C 10
I: Error trapping F, H 10
J: Final Test I, J 10
5
E 8
A B C D F G I J
1 2 3 4 6 8 9 10 11
15 12 8 10 10 10 10
15
H 7
Page | 38
Page | 39
SYSTEM DESIGN
This software based on concept of the Model View Controller (MVC) design pattern.
MVC gives you a nice separation between your data (model), logic/business layer
(controller) and display (view). In theory, this allows you to change individual layers
without affecting the other layers. You could have a configurable data source (SQL,
XML, etc.) or have various controllers depending on the user (admin, anon, etc.) or
have various views (console, webform, winform). MVC makes it really easy to
implement change… which is what programming in the “real” world is all about. These
three objects are known as Model, View and Controller.
VIEW
View is the graphical data presentation (outputting) irrespective of the real data
processing. View is the responsible for look and feel, some custom formatting, sorting
etc. View is completely isolated from actual complex data operations. For example,
online product catalog view is completely separated from database connection, query,
tables etc. It simply gets final row-data from the model and puts some cosmetics and
formatting before displaying it in browser. View provides interface to interact with the
system. The beauty of MVC approach is that it supports any kind of view, which is
challenging in today’s distributed and multi-platform environment.
A MVC model can have multiple views, which are controlled by controller. View
interface can be of WEB-FORMS, HTML, XML/XSLT, XTML, and WML or can be
Windows forms etc.
Page | 40
MODEL
Page | 41
CONTROLLER
Since MVC handles the multiple views using the same enterprise model it is
easier to maintain, test and upgrade the multiple system.
It will be easier to add new clients just by adding their views and controllers.
Since the Model is completely decoupled from view it allows lot of flexibilities to
design and implement the model considering reusability and modularity. This
model also can be extended for further distributed application.
It is possible to have development process in parallel for model, view and
controller.
Page | 42
SOFTWARE ENGINEERING PARADIGM
In our project I have used Prototype model. The basic idea here is that instead
of freezing the requirements before a design or coding can proceed, a throwaway
prototype is built to understand the requirements. This prototype is developed based on
the currently known requirements. Development of the prototype obviously undergoes
design, coding and testing. But each of these phases is not done very formally or
thoroughly. By using this prototype, the client can get an "actual feel" of the system,
since the interactions with prototype can enable the client to better understand the
requirements of the desired system.
Prototyping is an attractive idea for complicated and large systems for which there is no
manual process or existing system to help determining the requirements. In such
situations letting the client "plan" with the prototype provides invaluable and intangible
inputs which helps in determining the requirements for the system. It is also an effective
method to demonstrate the feasibility of a certain approach. This might be needed for
novel systems where it is not clear those constraints can be met or that algorithms can
be developed to implement the requirements. The process model of the prototyping
approach is shown in the figure below.
Page | 43
PROTOTYPING MODEL
The basic reason for little common use of prototyping is the cost involved in this built-it-
twice approach. However, some argue that prototyping need not be very costly and can
actually reduce the overall development cost. The prototype is usually not complete
systems and many of the details are not built in the prototype. The goal is to provide a
system with overall functionality. In addition, the cost of testing and writing detailed
documents are reduced. These factors help to reduce the cost of developing the
prototype. On the other hand, the experience of developing the prototype will very
useful for developers when developing the final system. This experience helps to
reduce the cost of development of the final system and results in a more reliable and
better designed system.
ADVANTAGES OF PROTOTYPING
Users are actively involved in the development. It provides a better system to users, as
users have natural tendency to change their mind in specifying requirements and this
method of developing systems supports this user tendency. Since in this methodology a
working model of the system is provided, the users get a better understanding of the
system being developed. Errors can be detected much earlier as the system is mode
side by side. Quicker user feedback is available leading to better solutions.
Page | 44
DISADVANTAGES OF PROTOTYPING
Leads to implementing and then repairing way of building systems. Practically, this
methodology may increase the complexity of the system as scope of the system may
expand beyond original plans.
Page | 45
INPUT REQUIREMENTS
FOR LOGIN:
User Email ID which has to be registered in Frindsworld.co.in before
Login.
Password related to that user Email ID which is used to login.
Page | 46
OUTPUT REQUIREMENTS
Page | 47
EXTERNAL INTERFACE REQUIREMENTS
The user interface of software is responsible for all the interactions with the user. Almost
every software has a user interface. Many users often judge a software product based
on its user interface. An interface that is difficult to use leads to higher level of user
errors and ultimately leads to user dissatisfaction. Users become particularly irritated
when a system behaves in unexpected ways i.e. issued commands do not carry out
actions according to the intuitive expectations of the user. Therefore, sufficient care and
attention should be paid to the design of the user interface of any software product.
Development of a good user interface usually takes significant portion of the total
system development effort.
This software is developed keeping in mind the basic characteristics of a good user
interface. Some features of this software can be stated as:-
It is very easy to learn. It does not require its users to memorize commands.
Neither the users are asked to remember information from one screen to another
while performing various tasks using the interface.
The time and user effort necessary to initiate and execute different commands is
minimal.
The users can seek guidance and online help when they either forget a
command or are unaware of some features of the software.
Page | 48
PERFORMANCE CONSTRAINTS
DESIGN CONSTRAINTS
SOFTWARE CONSTRAINTS
HARDWARE CINSTRAINTS
Page | 49
ACCEPTANCE CRITERIA
Before finally implementing the software at the user’s site, the developer must
demonstrate that the system works on the source data and other information.
The developer will have to show through Test Cases that all the conditions and
requirements are satisfied.
Page | 50
Page | 51
INTRODUCTION
A software life cycle is the series of identifiable stages that a Software product
undergoes during its lifetime. The first stage in the life Cycle of any software product is
usually the feasibility study stage. The Subsequent stages are:
Requirement analysis and specification, design, coding, testing and maintenance. Each
of these stages is called a life cycle Phase. A life cycle model represents all the
activities required to make a software product transit through its life cycle phases. It also
captures the order in which these activities are to be undertaken. The most strict life
cycle model used is the Classical Life Cycle Model. However, in any practical software
development work, it is not possible to strictly follow the classical waterfall model from
every phase to its preceding phases.
METHODOLOGY ADOPTED
Structured system analysis techniques had been adopted for the analysis of the
algorithm and software development. Structured system design techniques had been
adopted for the design of the algorithm and software development. Prototyping model
for initial implementation had been used for early testing and module development.
Prototyping model had been used for the development of the Graphical User Interface.
Incremental Model had been used for the development of the software. Structured
development life cycle had been used for this project. PERT chart is the primary Tool
used for system planning.
Page | 52
Project cost had been estimated as a function of comparing the cost of similar available
products, effort estimation on the project, resources acquired for the project and
COCOMO Model as the theoretical reference.
Test plan was created to form the strategy of testing. This includes
the decision of testing techniques, decision of testing tools, and decision of milestones
when the testing will commence.
ANALYSIS METHODS
Structured system analysis techniques are used for the analysis of algorithm and
development.
Fact-finding: facts about the algorithm are collected from the books and Internet.
Fact analysis: facts are analyzed through different examples related to algorithm.
DFDs and flowchart are used to model the algorithm and logic design.
Page | 53
DESIGN METHODS
Layering has been done to refine the architecture. Initially, two layers are
introduced, system layer and application layer.
Page | 54
CODING METHODS
Event driven programming language ASP.Net had been used for coding the
modules and programs.
Structured English and pseudo-codes are used to closely refine the mechanisms
using the facility of defined objects.
Various stubs had been used to facilitate incremental coding followed by testing.
The basic philosophy followed at this stage:” code one line followed by rigorous
testing”.
Integrated development environment of .Net had been used for the development
of various modules in integrated manner.
Incremental compilation had been used to compile and test on which work was in
progress.
Page | 55
TESTING METHODS
Structured testing tools had been used for testing the programs.
The same group is responsible to test the reliability of software by using various
inputs and techniques, on various parts and functionalities.
Page | 56
Page | 57
SYSTEM IMPLEMENTATION
Direct Implementation Method is used to implement the system at the user’s site. No
special Equipment (Hardware Device) is required to install the Software. The only
requirement is the user must have an Internet Connection.
Page | 58
Page | 59
FRIENDSWORLD.CO.IN SPECIFICATION
The system specification is the final work produced by the system and requirements
engineer. It serves as the foundation for hardware engineering, software engineering,
database engineering and human engineering.
GUI offers a standard look and feel to application, thus reducing development and
learning time. Through this a user understands easily. An attractive GUI influence the
mind of user. GUI is an application environment that can work with graphical objects.
Page | 60
HARDWARE AND SOFTWARE SPECIFICATIONS
HARWARE SPECIFICATIONS
SOFTWARE SPECIFICATION
Page | 61
FRONT END AND BACK END
FRONT END
We use rich set of validation controls provided by ASP.NET and where we not achieved
this through validation control we implemented JavaScript for all the Client side
validations. We usually use lot of client side validation not server side. The form is not
submitted until user fills in correct data. It is extremely useful to restrict mistakes by
user.
User friendly
GUI
Separation of work (designing & coding)
Written once run anywhere
Middle-Tier
Asp.Net APIs
Page | 62
BACK END
We have used SQL Server as the Back End.SQL Server provides efficient/effective
solution for major database tech.
High Availability
Manageable security
Portability
SQL-SERVER
Security
Performance
Scalability
Reliability
Support RDMS concepts
Page | 63
FRONT END AND BACK END SECURITY
This security level is developed or designed by the s/w developer or designer. S/he
provides her/his s/w the security for the system, by considering many factors regarding
to the particular s/w.
LOGIN CHECKING
There are two login’s are provided in this software one for user and another for admin.
In order to avail the services of user have to provide a valid id and password and only
after entering correct id and password user will get entry otherwise they will be blocked
from accessing any services of this site. Similarly a login check is provided for admin
that check credentials for admin which can do any admin job. In this way, security has
been provided for both user section and admin section. There is also provision to
change the password in case password is known by other. Password recover section
provides users to recover their password whenever they have forgotten their password.
Page | 64
BACK END SECURITY
In this particular software our back end used is Sql-Server. So all the inbuilt security
aspects provided by the Sql-Server database is used as it is. It will provide the strong
feature of security so that it will be difficult to change, modify any personal or university
data. Information is vital to success, but when damaged or in the wrong hands, it can
threaten success. Sql-Server provides extensive security features to safe guard your
information from both unauthorized viewing and intentional or inadvertent damage. This
security is provided by granting or revoking privileges on a person- by- person and
privilege-by-privilege basis.
Page | 65
INTRODUCTION TO ASP.NET
Web Forms permits us to build powerful forms-based Web pages. When building these
pages, we can use Web Forms controls to create common UI elements and program
them for common tasks. These controls permit us to rapidly build up a WebForm.
Page | 66
ADVANTAGES Of ASP.NET
The .NET Framework comprises over 3,400 classes that we can employ in our
ASP.NET applications. We can use the classes in the .NET Framework to develop any
type of applications. Since ASP.NET is part of the .NET Framework, we can do all these
things from within an ASP.NET page. While ASP Classic pages are formed with
scripting languages such as VBScript and JavaScript. ASP.NET pages are formed with
full-blown programming languages such as Visual Basic and C#. And whereas there are
five standard objects accessible in the ASP Classic Framework (the Request,
Response, Application, Session, and Server objects), there are over 3,400 standard
objects in the .NET Framework that we can use in an ASP.NET page.
When an ASP.NET page is first requested, it is compiled and cached on the server.
This means that an ASP.NET page performs very rapidly. All ASP.NET code is
compiled rather than interpreted, which permits early binding, strong typing, and just-in-
time (JIT) compiling to native code.
XML-BASED
ASP.NET configuration settings are stored in XML-based files, which are human
readable and writable. Each one of our applications can have a different configuration
file and we can extend the configuration scheme according to our necessities.
Page | 67
CODE-BEHIND LOGIC
The main problem with ASP Classic pages is that an *.asp page does not yield
modularized code. Both HTML and Script are present in a single page. But Microsoft's
ASP.NET implementation contains a new-fangled method to break up business logic
code from presentation code. Each ASPX created in Visual Studio has an equivalent
class written in a .NET compliant language such as C#. This class consists of event
handlers, initialization code and other supporting code for the user interface in the
ASPX file. The C# file that hold this class is called the code-behind file and affords the
ASPX file's programmatic implementation.
We can easily build complex Web pages by bring together the pages out of ASP.NET
server controls. For example, by adding validation controls to a page, we can easily
validate form data.
Page | 68
INTODUCTION OF DATABASE MANAGEMENT SYSTEM
A DBMS is a software system that enables users to record and maintain database. It
provides an environment where in data can be stored and retrieved from database
easily and must efficiently. The data can be any thing that is deemed to be of significant
to the organization, the system is serving.
WHAT IS .NET?
.NET is set of common services which can be used from a number of languages and
have the following specialties:
The .NET frameworks are a multi-language environment for building, deploying, and
running web services and applications. The Microsoft .NET platform provides .NET
infrastructure and tools to build and operate a new generation of services.
Page | 69
SQL-SERVER 2005
Have been the workhouse for data management operation for over a decade and
continue to evolve and mature, providing sophisticated storage, retrieval and distribution
function to enterprise – wide data processing and management system compared to the
file system, RDBMS provides organization with capability to easily integrate and
leverage the massive amount of operational data into meaningful data.
The evolution of high-powered database engine such as SQL Server 2005 has
faster the development of advance enabling technology including client/server ,data
warehousing and online processing ,all of which comprise the core today’s state –of –art
information system. A database is an organized collection of related information. Any
meaningful data is called information. A database management system is a collection of
interrelated data a set of programs to access that data.
The SQL Server architecture in this section is generic architecture that applies all
platforms on which SQL run. These may be different platform, but the fundamentals are
same. Physically in its simplest form, an SQL database is nothing more than a set of
files on the disk. The physical relation of these files is irrelevant to the function of the
database.
Page | 70
Logically the database is divided into a set of user account, each of which is
identified by username and password unique to the database. Tables and objects are
owned one by one of these. SQL Server maintains its own list of authorized user and
their associated privileged, manages memory cache paging; control locking for
concurrent resource usage; dispatch and schedules users request ; manages space
usage within its table space structure.
Page | 71
SQL SERVER-2005 ARCHITECTURE
SQL FILES
There are major three sets of files on the disk that compose
database: 1) Database File 2) Control File 3) Redo Files
The most common is the database files where the data resides. The control and the
redo logs support the functioning of the architecture itself. All of these sets of files be
present, open and available to SQL Server for any data on database to be usable all
these files are binary files.
MEMORY
SQL Server uses the memory of the system to turn the user process and
to cache data objects. There are major areas used by SQL Server : memory that is
shared by all process against the data and the database memory that is local to each
individual user process.
SYSTEM MEMORY
SQL Server database wide system memory is known as the SGA (System Global SQL
Shared Area). The data and control structures in SGA are sharable and all SQL Server
background process uses them.
Page | 72
Page | 73
SYSTEM MAINTENANCE
System maintenance denotes any changes made to a software product after it has been
delivered to the customer. Maintenance is inevitable for almost any kind of product.
However, most products need maintenance due to the wear and tear caused by use.
On the other hand, software products do not need maintenance on this count, but need
maintenance to correct errors, enhance features, port to new platforms, etc.
Page | 74
To append new features in this software, the databases for student details, examination
details are sufficient enough for the task. Thus the software is capable enough of being
enhanced easily whenever requires by the user.
Page | 75
Page | 76
ENTITY RELATIONSHIP DIAGRAM
Page | 77
Page | 78
DATA FLOW DIAGRAM
INTRODUCTION
The DFD also known as the Bubble Chart is a simple graphical formalism that can be
used to represent a system in terms of the input data to the system. Various processing
carried out on these data, and the output data generated by the system. The main
reason why the DFD technique is so popular is probably because of the fact that DFD is
a very simple formalism-it is simple to understand and use. A DFD uses a very limited
number of primitive symbols to represent the functions performed by a system and the
data flow among these functions. Starting with a set of high-level functions that a
system performs, a DFD model hierarchically represents various sub functions. The five
different types of primitive symbols used for constructing DFDs are:
SYMBOLS USED
PROCESS
Page | 79
EXTERNAL ENTITY
DATA FLOW
A directed arc or an arrow is used as a data flow symbol. A data flow symbol represents
the data flow occurring between two processes, or between an external entity and a
process, in the direction of the data flow arrow. Data flow symbols are usually annotated
with the corresponding data names.
Page | 80
DATA STORE
A data store represents a logical file. It is represented using two parallel lines. A logical
file can represent either a data store symbol, which can represent either a data
structure, or a physical file on disk. Each data store is connected to a process by
means of a data flow symbol. The direction of the data flow arrow shows whether data
is being read from or written into a data store. A arrow flowing in or out of a data store
implicitly represents the entire data of the data store and hence connecting to a data
store need not be annotated with the name of the corresponding data items.
OUTPUT SYMBOL
The output symbol is used when a hard copy is produced and the user of the
copies cannot be clearly specified or there are several users of the output.
Page | 81
CONTEXT DIAGRAM
The context diagram is the most abstract data flow representation of a system. It
represents the entire system as a single bubble. This bubble is labeled according to the
main function of the system. The various external entities with which the system
interacts and the data flows occurring between the system and the external entities are
also represented.
LEVEL 0 DFD
Page | 82
FIRST LEVEL DFD
To develop the level 1 DFD, examine the high-level functional requirements. If there are
between three to seven high-level functional requirements, then these can be directly
represented as bubbles in the level 1 DFD. We can then examine the input data to
these functions and the data output by these functions, and represent them
approximately in the diagram.
LEVEL 1 DFD
Page | 83
Page | 84
STRUCTURE CHART
LOGUP
LOGIN
USERID
PASSWORD
SCRAPBOOK
SEND SCRAP
RECEIVE SCRAP
DELETE SCRAP
Page | 85
INVITE FRIENDS
SEND INVITATION
PHOTOS
VIDEOS
ADD VIDEOS
DELETE VIDEOS
SEND VIDEOS
Page | 86
Page | 87
Page | 88
TESTING METHODOLOGY AND TESTING STRATEGIES
There are following rules that can serve well as testing objectives:
A good test case is one that has a high probability of finding an as-yet-
undiscovered error.
TESTING STRATEGIES
UNIT TESTING
Page | 89
SYSTEM TESTING
During system testing the system is used experimentally to ensure that the software
does not fail i.e. it will run according to its specifications and in the way users expect.
Special test data are input for the processing and the results examine. A limited number
of users try to use it in unforeseen ways. It is preferable to discover any surprise before
the organization implements the system and depend upon it.
In many organizations persons other than those who wrote the original programs
to ensure more complete and unbiased testing and more reliable testing perform
testing.
The norms that were followed during the phase were that after the developer of the
software has satisfied regarding every aspect of the software under consideration he is
required to release the program source code. A setup name release is used to copy the
name file from the developers’ user area to a project area in the directory named with
developer user name. Here the entire final testing used to be done by persons other
than the developer himself .if some changes were desired in the program the developer
were required to use another setup. Retrieve, which copied back the latest version of
the program to developer areas.
As in this system data is entered at different levels I considered providing various types
of checks like range check, validity check, completeness check etc. in different data
entry screens according to the requirements.
Since the user are not familiar to the new system the data screens were designed in
such a way that were:
Consistent
Easy to use
Page | 90
System testing is the testing of the system against its initial objective. It is done either in
a simulated environment or in live environment.
TEST REVIEW
Test review is the process that ensures that testing is carried out as planned. Test
review decides whether or not the program is ready to be shipper out for implementation
SECURITY TESTING
Security testing attempt to verify that protection mechanism built into a system will, in
fact, protect it form penetration mechanisms.
White box test focus on the program control structure. Test cases are derived to ensure
that all statement in the program has been executed at least once during testing and
that all logical condition has been exercised. Basic path testing, a white box testing,
makes use of program graph to derive the set of linearly independent test that will
ensure coverage.
Page | 91
CODING TESTING
Condition testing is tests case design method that exercise the logical conditions
contain in a program module. A simple condition is a Boolean variable or a relational
expression.
BRANCH TESTING
I have used Branch testing that is probably for compound condition, the true and false
(in project i.e. null values) for each branch.
I have used data flow testing due to check the path of program according to the
locations of definitions and uses of variables in the program.
LOOP TESTING
In our project I have use only simple loop. And I have use m pass through the loop
where m<n.
Page | 92
BLACK BOX TESTING
Black box testing focuses on the functional requirements of the software. That is, black-
box testing enable the software engineer to derive set of input conditions that will fully
exercise all functional requirements for a program.
I have used graph-based testing method for removing errors associated with
relationships. The first step in this testing is to understand the objects that are modeled
in software and the relationship that connect these objects.
EQUIVALENCE PARTITIONING
Range of values
Boolean condition
Page | 93
BOUNDARY VALUE ANALYSIS
Boundary value analysis is a test case design technique that complements equivalence
partitioning. Rather than selecting any element of equivalence class the selection of test
cases at the edges of the class. Rather than focusing solely on the input condition,
ACCEPTENCE TESTING
When the function test was completed, we involved the user to make sure that the
system worked according to the user’s expectation. Thus the user did the final
acceptance test.
Page | 94
TEST CASES
Page | 95
RTest3 The user is If any of the If any of the required
supposed to fill all required field is left field is left empty
the mandatory empty then then relatively
fields when he / she relatively warning warning message is
register for new message is displayed.
user. displayed.
RTest4 All the details which The details are The details are
are filled by the stored in the stored in the
user should to be database only if all database only if all
stored to the the details are valid the details are valid
database. and ID is available and ID is available
otherwise their otherwise their
corresponding corresponding
message(s) is (are) message(s) is (are)
displayed. displayed.
HTest1 All options should If any user access If any user access
be access through any option it would any option it would
home page. be able to roll back be able to roll back ,
, or move foreword or move foreword
CHTests1 A user can change A user can change A user can change
the password of his the password of his the password of his /
/ her account. / her account. The her account. The
user needs to re- user needs to re-
enter password and enter password and
enter new desired enter new desired
password with one password with one
confirm password confirm password
field. field.
Page | 96
BNTest1 A user can navigate When a user click When a user click on
through the links or on a button or link a button or link then
buttons. then it should it should perform the
perform the corresponding
corresponding functionality.
functionality.
SNTest1 Session expired If user does not use If user does not use
after specific time. any control or any control or
navigate then after navigate then after
specific time his / specific time his /
her session her session expired.
expired.
Page | 97
Page | 98
SYSTEM SECURITY
The users will be classified in groups and each group will b provided access to identify
screens and reports. This access will be across different modules.
The group authorization right will also define whether they are permitted to view the
information only or can modify it as well.
USER AUTHENTICATION
Every registered user will have a login ID and password. The system administrator,
using the functionality provided by login control module, will create new login Ids and
maintain existing Ids using the user registration screen. Whenever a new user is
registered, a new login ID and password will be created. Users can change their own
passwords. The passwords will not be displayed on the screen while they are being
entered into the application.
Page | 99
USER AUTHORIZATION
For data entry and modification, permissions will be defined for the entry screens.
Administrator and Users both will be having different screens and different access
rights. Administrator would be able to manage different operations and functions
whereas a registered user would be able to access all the features available on the
website.
The USERNAME of the user will be displayed on the next page, and any item needed
on the different page will also be maintained using Session management.
Browser Session will expire and terminate user session after a certain period of
inactivity. The following data will be maintained throughout an active session.
EXCEPTION HANDLING
Page | 100
Page | 101
Login.aspx.cs
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Ducat.Forever.Database;
using Ducat.Forever.UI;
}
protected void btn_logon_Click(object sender, ImageClickEventArgs
e)
{
WebSession session = WebSession.Login(TextBox1.Text,
TextBox2.Text);
if (session != null)
{
Session["user_session"] = session.GetUserId;
Session["emailid"] = TextBox1.Text;
FormsAuthentication.RedirectFromLoginPage(TextBox1.Text,
false);
}
else
{
//lbl_error.Visible=true;
}
protected void btn_forgetpass_Click(object sender, EventArgs e)
{
Response.Redirect("Password_Recovery/Password_Recovery.aspx");
Page | 102
}
protected void btn_joinnow_Click(object sender, EventArgs e)
{
Response.Redirect("Account/NewAccount.aspx");
}
protected void TextBox2_TextChanged(object sender, EventArgs e)
{
}
}
Page | 103
Home.aspx.cs
}
function out(tx)
{
if(tx.value=="")
{
tx.value="Enter email address";
}
</script>
<table style="height: 50px;font-size:small" frame="void">
<tr>
<td style="width:99px;margin-right:200px; height: 208px;">
<table style="margin-top:5px;margin-bottom:250px;margin-
left:130px;margin-right:450px;background-color:White; width: 575px;
height: 174px;" id="TABLE1" cellpadding="0" cellspacing="0">
<tr >
<td colspan="6" style="text-align:left;width:600px"><asp:Label
ID="lbl" Text="Welcome," Font-Size="Small" runat="server"></asp:Label>
<asp:Label ID="lbluser" Font-Size="Large"
runat="server"></asp:Label></td>
</tr>
<tr style="border-width:5px;border-color:Black" >
<td colspan="5" style="text-align:left;border-width:thick"
onmouseout="this.style.backgroundColor='white'"
onmouseover="this.style.backgroundColor='#cccfff' ">
Set Your Status Here
</td><td style="border-width:5px; border-color:Black" ></td>
</tr>
<tr>
Page | 104
<td align="left" style="font-family:MS Sans Serif; font-size:xx-
small;width:100px"><asp:LinkButton ID="linkscrap" runat="server"
Text="scrap"
OnClick="linkscrap_Click"></asp:LinkButton> &nb
sp;
<asp:LinkButton ID="LinkButton13" runat="server"
onclick="LinkButton13_Click">scraptips</asp:LinkButton>
</td><td align="left" style="font-family:MS Sans Serif; font-
size:xx-small;width:100px"><asp:LinkButton ID="LinkButton1"
runat="server" Text="photos"
OnClick="LinkButton1_Click"></asp:LinkButton></td><td align="left"
style="font-family:MS Sans Serif; font-size:xx-
small;width:100px"><asp:LinkButton ID="LinkButton2" runat="server"
Text="fans"></asp:LinkButton></td><td align="left" style="font-
family:MS Sans Serif; font-size:xx-small;width:100px"><asp:LinkButton
ID="LinkButton3" runat="server" Text="message"
OnClick="LinkButton3_Click"></asp:LinkButton></td><td align="left"
style="font-family:MS Sans Serif; font-size:xx-
small;width:100px"><asp:LinkButton ID="LinkButton4" runat="server"
Text="photo of me"></asp:LinkButton></td>
</tr>
<tr>
<td style="height:5px;" align="left" ><asp:ImageButton ID="imgscrap"
ImageUrl="~/myimage/p_scrap.gif" Width="20px" Height="20px"
runat="server" OnClick="imgscrap_Click" /><asp:Label ID="lblscrap"
runat="server"></asp:Label></td><td align="left"><asp:ImageButton
ID="Image1" runat="server" ImageUrl="~/myimage/photos.gif" Width="20"
Height="20" /><asp:Label ID="lblphoto"
runat="server"></asp:Label></td><td align="left"><asp:ImageButton
ID="Image2" ImageUrl="~/image/fans.gif" runat="server" /><asp:Label
ID="lblfans" runat="server"></asp:Label></td><td
align="left"><asp:ImageButton ID="Image3" runat="server"
ImageUrl="~/image/i_letter.gif" OnClick="Image3_Click" /><asp:Label
ID="lblmessage" runat="server"></asp:Label></td><td
align="left"><asp:ImageButton ID="Image4" runat="server"
ImageUrl="~/image/myphoto.gif" /><asp:Label ID="lblmyphoto"
runat="server"></asp:Label></td>
</tr>
<tr>
<td colspan="7" style="text-align:left; height: 35px;">
<b>Today's fortune:</b>You are very expressive and positive in words,
act and feeling
</td >
</tr>
</table>
<br /> <br /> <br /> <br /> <br />
</td>
<td style="margin-left:50px; height: 208px;">
<br />
<br />
Page | 105
<table style="width:200px; background-color:White;height:150px;margin-
right:200px; z-index: 102; left: 791px; position: absolute; top:
132px;">
<tr>
<td style="text-align:left">
My Friends <asp:Label ID="lblfriendlist" runat="server"></asp:Label>
</td>
</tr>
<tr style="background-color:#cccfff">
<td>
<asp:Repeater ID="Repeater2" runat="server"
OnItemCommand="Repeater2_ItemCommand">
<HeaderTemplate>
<table>
</HeaderTemplate>
<ItemTemplate>
<tr>
<a href='home.aspx?userid=<%#Eval("userid")%>'><asp:Image
Height="40px" Width="40px" ID="im" runat="server"
ImageUrl='<%#Eval("imagename")%>' /></a>
<br />
<a href='home.aspx?userid=<%#Eval("userid")%>'><%#Eval("fid")
%></a>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td><asp:LinkButton ID="link" runat="server" Text="view all >>"
onclick="link_Click1"></asp:LinkButton></td><td> </td>
</tr>
</table>
</td>
<td style="height: 208px">
<table>
<tr>
<td>
</td>
Page | 106
</tr>
</table>
</td>
</tr>
</table>
</tr>
<tr>
<td colspan="2" style="height: 26px"><asp:TextBox
onclick="enter(this)" onblur="out(this)" ID="txtemailid"
runat="server" Text="Enter email address" ValidationGroup="friend"
></asp:TextBox> </td>
</tr>
<tr>
<td style="height: 26px">
<asp:LinkButton ID="lnkbadd" runat="server" ValidationGroup="friend"
OnClick="Button_Invite_Click" Text="Add" ForeColor="black" Font-
Bold="true" BorderStyle="solid"></asp:LinkButton>
</td>
<td style="height: 26px; width: 89px;"><a id="hplink" ><b> More
>></b></a></td>
</tr>
</table>
<table id="frndtable" runat="server" style="position:absolute; left:
192px; top: 371px; z-index: 101;">
<tr>
<td>
<table runat="server" style="margin-right:300px;margin-
left:20px;border-style:solid;margin-bottom:500px">
<tr>
<td >
<asp:Repeater ID="Repeater1" runat="server"
OnItemCommand="Repeater1_ItemCommand">
<HeaderTemplate>
Page | 107
<table border="2" >
<tr >
<td colspan="6" >
<center><u><b> FriendShip Invitation </b></u></center>
</td>
</tr>
<tr >
<td
style="width:30"><u><b>InvitationId</b></u></td><td><u><b>Sender</b></
u></td><td style="text-align:left;width:140px"><u><b>
DateOfInvitation</b></u></td><td style="text-
align:left;width:140px"><u><b>Message</b></u></td><td
><u><b>Accept</b></u></td><td><u><b>Reject</b></u></td>
</tr>
</HeaderTemplate>
<ItemTemplate >
<tr >
<td style="text-align:left" ><asp:Label ID="lblinvitation_id"
runat="server" Text='<%#Eval("invitation_id") %>'></asp:Label></td>
<td style="text-align:left" ><asp:Label ID="lblsender"
Text='<%#Eval("userid") %>' runat="server"></asp:Label></td><td
style="text-align:left;" ><asp:Label ID="lbldoi" Text='<%#Eval("doi")
%>' runat="server"></asp:Label> </td> <td style="text-align:left"
>Invites for friendship</td><td><asp:LinkButton ID="lnbaccept"
CommandName="accept" Text="Yes"
runat="server"></asp:LinkButton></td><td><asp:LinkButton
ID="lnbreject" CommandName="reject" Text="No"
runat="server"></asp:LinkButton></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
</td>
</tr>
</table>
</td>
</tr>
</table>
</asp:Content>
Page | 108
ViewAllFriend.aspx.cs
</ItemTemplate>
</asp:DataList>
</asp:Content>
Page | 109
Web.config
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<configSections>
<sectionGroup name="system.web.extensions"
type="System.Web.Configuration.SystemWebExtensionsSectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting"
type="System.Web.Configuration.ScriptingSectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler"
type="System.Web.Configuration.ScriptingScriptResourceHandlerSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices"
type="System.Web.Configuration.ScriptingWebServicesSectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization"
type="System.Web.Configuration.ScriptingJsonSerializationSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="Everywhere"/>
<section name="profileService"
type="System.Web.Configuration.ScriptingProfileServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication"/>
<section name="authenticationService"
type="System.Web.Configuration.ScriptingAuthenticationServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication"/>
<section name="roleService"
type="System.Web.Configuration.ScriptingRoleServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
Page | 110
allowDefinition="MachineToApplication"/></sectionGroup></sectionGroup>
</sectionGroup></configSections>
<appSettings>
<add key="dbtype" value="sqlserver"/>
<add key="connectionstring" value="Data Source=.;Initial
Catalog=orkut;Integrated Security=True"/>
<add key="maxconnection" value="2000"/>
</appSettings>
<connectionStrings>
</connectionStrings>
<location path="Password_Recovery">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
<location path="Password_Recovery.aspx">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
<location path="account">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
<location path="image">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
<location path="images">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
Page | 111
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Windows.Forms,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=B77A5C561934E089"/></assemblies></compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Forms">
<forms loginUrl="login.aspx"
defaultUrl="home.aspx"></forms>
</authentication>
<authorization>
<deny users="?"/>
</authorization>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly"
defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI"
assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp"
namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions,
Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/></controls></pages>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false"
type="System.Web.Script.Services.ScriptHandlerFactory,
Page | 112
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false"
type="System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd"
validate="false" type="System.Web.Handlers.ScriptResourceHandler,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/></httpHandlers>
<httpModules>
<add name="ScriptModule"
type="System.Web.Handlers.ScriptModule, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/></httpModules></system.web>
<system.net>
<mailSettings>
<smtp deliveryMethod="PickupDirectoryFromIis">
</smtp>
</mailSettings>
</system.net>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs"
type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion"
value="v3.5"/>
<providerOption name="WarnAsError"
value="false"/></compiler>
<compiler language="vb;vbs;visualbasic;vbscript"
extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
warningLevel="4">
<providerOption name="CompilerVersion"
value="v3.5"/>
<providerOption name="OptionInfer" value="true"/>
<providerOption name="WarnAsError"
value="false"/></compiler></compilers></system.codedom>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule"/>
<add name="ScriptModule" preCondition="managedHandler"
type="System.Web.Handlers.ScriptModule, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/></modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<remove name="ScriptHandlerFactory"/>
<remove name="ScriptHandlerFactoryAppServices"/>
<remove name="ScriptResource"/>
Page | 113
<add name="ScriptHandlerFactory" verb="*"
path="*.asmx" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*"
path="*_AppService.axd" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" verb="GET,HEAD"
path="ScriptResource.axd" preCondition="integratedMode"
type="System.Web.Handlers.ScriptResourceHandler,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/></handlers></system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions"
publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0"
newVersion="3.5.0.0"/></dependentAssembly>
<dependentAssembly>
<assemblyIdentity
name="System.Web.Extensions.Design"
publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0"
newVersion="3.5.0.0"/></dependentAssembly></assemblyBinding></runtime>
</configuration>
Page | 114
MasterPage.master.cs
</script>
<style type="text/css">
.style1
{
height: 40px;
width: 76px;
}
.style2
{
width: 38px;
}
</style>
</head>
<body bgcolor="#cccfff">
<form id="form1" runat="server">
<div>
<table bgcolor="#cccfff" style="margin-top:0px">
<tr>
<td colspan="2" style="height: 48px">
<table bgcolor="#cccfff" id="TABLE1"
style="width:960px;margin-top:1px;height:10px; background-
color: #9999FF">
<tr>
<td class="style1">
<asp:ImageButton ID="ImageButton1" Font-Size="X-Small"
runat="server"
ImageUrl="~/image/friendworld_logo.bmp"/></td>
Page | 115
<td class="style2">
<asp:LinkButton ID="LinkButton1" ForeColor="white" Font-
Size="Small" runat="server"
OnClick="LinkButton1_Click">Home</asp:LinkButton></td>
<td>
<asp:LinkButton ID="LinkButton2" ForeColor="white" Font-
Size="small" runat="server"
OnClick="LinkButton2_Click">Profile</asp:LinkButton></td>
<td>
<asp:LinkButton ID="LinkButton3" ForeColor="white" Font-
Size="Small" runat="server"
OnClick="LinkButton3_Click">ScrapBook</asp:LinkButton></td>
<td>
<asp:LinkButton ID="LinkButton4" ForeColor="white" Font-
Size="Small" runat="server">Friends</asp:LinkButton></td>
<td>
<asp:LinkButton ID="LinkButton6" ForeColor="white" Font-
Size="Small" runat="server">Communities</asp:LinkButton></td>
<td>
<asp:Label ID="lblurl" Font-Size="Large" runat="server"
Text="Label" Font-Bold="True"></asp:Label></td>
<td>
<asp:TextBox ID="txturl" Font-Size="X-Small" Width="140px"
runat="server"></asp:TextBox></td>
<td>
<asp:LinkButton ID="linksignout" ForeColor="white"
Font-Size="Small" runat="server" Text="LogOut"
OnClick="linksignout_Click"></asp:LinkButton></td>
<td>
</td>
</tr>
<tr>
<td colspan="9">
<asp:TextBox ID="txtnotification" BackColor="Aqua"
ForeColor="Brown"
style="text-align:center;font-style:oblique; top: 109px;
left: 16px; position: absolute;"
runat="server" Height="25px" ReadOnly="true"
Wrap="true" Width="800px" Visible="false"
ontextchanged="txtnotification_TextChanged"></asp:TextBox>
<asp:Button ID="buthide" runat="server" Visible="false"
Text="hide" Font-Bold="true" OnClick="buthide_Click" />
</td>
</tr>
</table>
<center> <asp:SiteMapPath ID="SiteMapPath1" runat="server" Font-
Names="Verdana" Font-Size="0.8em" PathSeparator=" : ">
<PathSeparatorStyle Font-Bold="True" ForeColor="#990000"
/>
Page | 116
<CurrentNodeStyle ForeColor="#333333" />
<NodeStyle Font-Bold="True" ForeColor="#990000" />
<RootNodeStyle Font-Bold="True" ForeColor="#FF8000" />
</asp:SiteMapPath>
</center>
</td>
<td style="height: 48px"></td>
</tr>
<tr>
<td style="height: 363px">
<table bgcolor="white"
style="Left: 8px; width: 100px; position: absolute; top:
152px; height: 348px"
id="TABLE2" >
<tr>
<td colspan="2">
<img id="imguser" runat="server" height="80" style="width: 90px"
/><br />
</tr>
<tr>
Page | 117
<td style="width: 91px;height:30px">
<asp:Image ID="Image4" runat="server" Width="17"
ImageUrl="~/IMAGE/b11.gif" /></td>
<td><asp:LinkButton ID="LinkButton12" Font-Size="x-Small"
runat="server">Videos</asp:LinkButton></td>
</tr>
<tr>
<td style="height:30px; width: 91px;"><img id="testimg"
runat="server" src="myimage/testimonial.jpg" width="17" /></td>
<td><asp:LinkButton ID="lnkbtestimonial" runat="server"
Text="testimonials" ></asp:LinkButton></td>
</tr>
<tr>
<td colspan="2" style="height:0px"><b>------------------</b></td>
</tr>
<tr>
<td style="height:30px; width: 91px;"><img id="Img1" runat="server"
src="myimage/lists.gif" width="17" /></td>
<td><asp:LinkButton ID="lnkblist" runat="server"
Text="lists"></asp:LinkButton></td>
</tr>
<tr>
<td style="height:30px; width: 91px;"><img id="Img2" runat="server"
src="myimage/updates.png" width="13" /></td>
<td><asp:LinkButton ID="lnkbupdates" runat="server"
Text="updates"></asp:LinkButton></td>
</tr>
<tr>
<td style="width: 91px; height: 78px;">
<asp:Image ID="Image5" runat="server" Width="17"
ImageUrl="~/image/i_letter.gif" />
</td>
<td style="height: 78px" ><asp:LinkButton ID="LinkButton5" Font-
Size="x-Small" runat="server"
OnClick="LinkButton5_Click">Messages</asp:LinkButton></td>
</tr>
</table>
</td>
<td style="height: 363px;width:1070px">
<center> <asp:contentplaceholder id="ContentPlaceHolder1"
runat="server">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Page | 118
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</asp:contentplaceholder>
</center>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
Page | 119
WebUserControl.ascx
function TABLE1_onclick() {
// ]]>
</script>
</tr>
</table>
Page | 120
Global.asax
<script runat="server">
</script>
Page | 121
Account_Registration_Failure.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("~/Login.aspx");
}
}
Page | 122
Account_Registration_Notification.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("~/Login.aspx");
}
}
Page | 123
Account_User_Professional_Detail.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections;
public partial class account_Account_user_professional_detail :
System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void buttSubmit_Click(object sender, EventArgs e)
{
Hashtable ht = (Hashtable)Session["parameter"];
ht.Add("education", txteducation.Text);
ht.Add("college", txtcollege.Text);
ht.Add("degree", ddldgree.SelectedItem.Value);
ht.Add("year", ddlyear.SelectedItem.Value);
ht.Add("occupation", txtoccupation.Text);
ht.Add("industry", ddlindustry.SelectedItem.Value);
ht.Add("sub_industry", ddlsub_industry.SelectedItem.Value);
ht.Add("company", txtcompany.Text);
ht.Add("company_webpage", txtcompany_webpage.Text);
ht.Add("title", txttitle.Text);
ht.Add("work_email", txtwork_email.Text);
ht.Add("job_detail", txtjob_description.Text);
ht.Add("work_phone", txtwork_phone.Text);
ht.Add("career_skill", txtcareer_skill.Text);
ht.Add("career_interest", txtcareer_interest.Text);
Account obj = new Account();
bool flag= obj.Insert_User_details(ht, "Insert_row");
Page | 124
if (flag)
{
Response.Redirect("Account_Registration_Notification.aspx");
}
else
{
Response.Redirect("Account_Registration_Failure.aspx");
}
}
protected void ddldgree_SelectedIndexChanged(object sender,
EventArgs e)
{
}
}
Page | 125
Account_User_Social_Detail.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections;
public partial class account_Account_User_Social_detail :
System.Web.UI.Page
{
Page | 126
ht.Add("drinking", ddldrinking.SelectedItem.Value);
ht.Add("pets", ddlpets.SelectedItem.Value);
ht.Add("living", ddlliving.SelectedItem.Value);
ht.Add("hometown", txthometown.Text);
ht.Add("about_self", txtaboutme.Text);
ht.Add("passions", txtpassion.Text);
ht.Add("sports", txtsports.Text);
ht.Add("activity", txtactivity.Text);
ht.Add("music", txtmusic.Text);
ht.Add("tv_shows", txttvshows.Text);
ht.Add("movies", txtmovie.Text);
Session["parameter"] = ht;
Response.Redirect("Account_user_professional_detail.aspx");
}
}
Page | 127
MasterPage.Master.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
}
}
Page | 128
NewAccount.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections;
string
dob=ddldate.SelectedItem.Value+"/"+ddlmonth.SelectedIndex.ToString()+"
/"+ddlyear.SelectedItem.Value;
Page | 129
ht.Add("dob",dob);
ht.Add("city",ddlcity.SelectedItem.Value);
ht.Add("state",ddlstate.SelectedItem.Value);
ht.Add("postalcode",txtpostalcode.Text);
ht.Add("country",ddlcounty.SelectedItem.Value);
if (FileUpload1.HasFile)
{
ht.Add("image", "usephoto/" + txtuserid.Text + ".jpg");
FileUpload1.SaveAs(Server.MapPath("../usephoto/") +
txtuserid.Text + ".jpg");
FileUpload1.SaveAs(Server.MapPath("../scrapbook/usephoto/") +
txtuserid.Text + ".jpg");
}
else
{
ht.Add("image", "usephoto/" + "notavailble.JPG");
}
bool flag = obj.IsUserExists(txtuserid.Text,txtemailid.Text);
if (!flag)
{
Session["parameter"] = ht;
Response.Redirect("Account_user_social_detail.aspx?userid='" +
txtuserid.Text + "'");
}
else
{
txtuserid.Text = "";
txtemailid.Text = "";
lblerror.Visible = true;
lblerror.ForeColor = System.Drawing.Color.Red;
lblerror.Text = "<b> Emailid or UserId already
Exists</b>";
}
}
protected void ddldate_SelectedIndexChanged(object sender,
EventArgs e)
{
}
protected void radiomale_CheckedChanged(object sender,EventArgs e)
{
}
}
Page | 130
Account.cs
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Ducat.Forever.Database;
using System.Collections;
/// <summary>
/// Summary description for Account
/// </summary>
public class Account
{
}
public bool Insert_User_details(Hashtable ht, string query)
{
Connection con = ConnectionPool.GetConnection();
Page | 131
/* public bool Create_New_Account(string userid, string password,
string emailid,string fname,string lname,string gender,string
status,DateTime dob,string city,string state,string postalcode,string
country)
{
bool flag= IsUserExists(userid);
if(flag)
{
string query1="insert into user_login_detail
values('"+userid+"','"+password+"','"+emailid+"')";
Connection con=ConnectionPool.GetConnection();
int i= con.ExecuteNonQuery(query1);
string query2="insert into user_general_detail
values('"+fname+"','"+lname+"','"+gender+"','"+status+"','"+dob+"','"+
city+"','"+state+"','"+postalcode+"','"+country+"','"+userid+"')";
try
{
i = con.ExecuteNonQuery(query2);
}
catch
{
i= con.ExecuteNonQuery("delete from user_login_detail
where userid='" + userid + "'");
}
finally
{
ConnectionPool.FreeConnection(con);
}
}
return(flag);
}*/
Page | 132
{
int i= con.ExecuteNonQuery(query);
flag=true;
}
catch
{
flag=false;
}
finally
{
ConnectionPool.FreeConnection(con);
}
return(flag);
}
Page | 133
Current_User.cs
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Ducat.Forever.Database;
/// <summary>
/// Summary description for Current_User
/// </summary>
public class Current_User
{
Page | 134
FriendInvitation.cs
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Ducat.Forever.Database;
}
private static bool Validate_EmailId(string emailid)
{
bool flag = false;
Connection con = ConnectionPool.GetConnection();
object obj= con.ExecuteScalar("select count(*) from
user_login_detail where emailid='" + emailid + "'");
ConnectionPool.FreeConnection(con);
//.......................................................
Connection con1=ConnectionPool.GetConnection();
DataSet ds=con1.GetDataSet("select userid from
user_login_detail where emailid='"+emailid+"'");
ConnectionPool.FreeConnection(con1);
//.......................................................
Connection con2 = ConnectionPool.GetConnection();
Page | 135
Connection con3 = ConnectionPool.GetConnection();
}
return (flag);
}
public bool Send_Invitation_to_User(string emailid)
{
bool status ;
status = Validate_EmailId(emailid);
if (status)
{
return (status);
}
public DataTable Fetch_FriendList(string userid)
{
Connection con= ConnectionPool.GetConnection();
Page | 136
//DataSet ds= con.GetDataSet("select fid from friend_detail
where userid='" + userid + "'");
DataSet ds=con.GetDataSet("select * from image_table im right
join friend_detail fd on fd.fid=im.userid where
fd.userid='"+userid+"'");
ConnectionPool.FreeConnection(con);
return (ds.Tables[0]);
public friend()
{
}
public DataTable Find_Invitation_List(string emailid)
{
Connection con = ConnectionPool.GetConnection();
string query = "select userid,doi,invitation_id from
friend_invitation where invited_emailid='" + emailid + "' and
status=0";
DataSet ds=new DataSet();
ds=con.GetDataSet(query);
return (ds.Tables[0]);
}
public int Accept_Friendship(RepeaterItem item)
{
Connection con = ConnectionPool.GetConnection();
string reciever = userid;
Label sender = (Label)item.FindControl("lblsender");
Connection con1 = ConnectionPool.GetConnection();
object obj= con1.ExecuteScalar("select emailid from
user_login_detail where userid='" + userid + "'");
ConnectionPool.FreeConnection(con1);
Label invitationlbl =
(Label)item.FindControl("lblinvitation_id");
string query = "delete from friend_invitation where
invitation_id=" + invitationlbl.Text + "";
i = con.ExecuteNonQuery(query);
Page | 137
ConnectionPool.FreeConnection(con);
int ctr = Count_Friend();
return (ctr);
}
public void Reject_Friendship(RepeaterItem item)
{
Connection con = ConnectionPool.GetConnection();
Label
invitationlbl=(Label)item.FindControl("lblinvitation_id");
string query = "delete from friend_invitation where
invitation_id=" + invitationlbl.Text + "";
int i= con.ExecuteNonQuery(query);
ConnectionPool.FreeConnection(con);
}
public int Count_Friend()
{
Connection con = ConnectionPool.GetConnection();
DataSet ds= con.GetDataSet("select * from friend_detail where
userid='" +userid+ "'");
return (ds.Tables[0].Rows.Count);
}
Page | 138
MailMessage.cs
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Ducat.Forever.Database;
using System.Net.Mail;
public class MailMessage_class
{
public void Send_Message(string touser, string fromuser, string
subject, string body)
{
//Connection con = ConnectionPool.GetConnection();
//string query1 = "select emailid from user_login_detail where
userid='" + touser + "'";
//string query2="select emailid from user_login_detail where
userid='" + fromuser + "'";
//DataSet ds1 = con.GetDataSet(query1);
//ConnectionPool.FreeConnection(con);
//con=ConnectionPool.GetConnection();
//DataSet ds2=con.GetDataSet(query2);
//ConnectionPool.FreeConnection(con);
//string to_address = ds.Tables[0].Rows[0][0].ToString();
//MailAddress to = new MailAddress(to_address);
//MailAddress from = new
MailAddress(ds1.Tables[0].Rows[0][0].ToString());
//con = ConnectionPool.GetConnection();
//string query3="insert into MailMessage_detail
values('"+touser+"','"+fromuser+"','"+System.DateTime.Now.ToString()+"
','"+subject+"','"+body+"')";
//int i = con.ExecuteNonQuery(query3);
//ConnectionPool.FreeConnection(con);
//MailMessage mail = new MailMessage(from,to);
//mail.Subject = subject;
//mail.Body = body;
//SmtpClient client = new SmtpClient();
//client.Send(mail);
Page | 139
PasswordRecovery.cs
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Ducat.Forever.Database;
/// <summary>
/// Summary description for _1
/// </summary>
using System.Net.Mail;
return (obj.ToString());
Page | 140
SmtpClient client = new SmtpClient("smtp");
try
{
client.Send(mail);
flag = true;
}
catch (Exception exp)
{
flag = false;
}
return (flag);
Page | 141
GeneralProfile.cs
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Ducat.Forever.Database;
using Ducat.Forever.UI;
public static class GeneralProfile
{
static string userid;
public static string setuserid
{
set
{
userid = value;
}
}
public static void GeneralProfile_Bind_formview(FormView formview)
{
}
public static void GeneralProfile_UpdateProfile(FormView formview)
{
TextBox txtlname, txtfname, txtcity, txtstate, txtdob,
txtpostalcode;
DropDownList ddlcountry, ddlstatus, ddlgender;
txtfname = (TextBox)formview.Row.FindControl("txtfname");
txtlname = (TextBox)formview.Row.FindControl("txtlname");
Page | 142
txtcity = (TextBox)formview.Row.FindControl("txtcity");
txtstate = (TextBox)formview.Row.FindControl("txtstate");
txtdob = (TextBox)formview.Row.FindControl("txtdob");
txtpostalcode =
(TextBox)formview.Row.FindControl("txtpostalcode");
ddlstatus =
(DropDownList)formview.Row.FindControl("ddlstatus");
ddlgender =
(DropDownList)formview.Row.FindControl("ddlgender");
ddlcountry =
(DropDownList)formview.Row.FindControl("ddlcountry");
string query = "update user_general_detail set
fname='" + txtfname.Text + "',lname='" + txtlname.Text + "',gender='"
+ ddlgender.SelectedItem.Value + "',status='" +
ddlstatus.SelectedItem.Value + "',dob='" + txtdob.Text + "',city='" +
txtcity.Text + "',state='" + txtstate.Text + "',postalcode='" +
txtpostalcode.Text + "',country='" + ddlcountry.SelectedItem.Value +
"' where userid='"+userid+"'";
Connection con = ConnectionPool.GetConnection();
int i= con.ExecuteNonQuery(query);
ConnectionPool.FreeConnection(con);
GeneralProfile_Bind_formview(formview);
Page | 143
PersonalProfile.cs
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Ducat.Forever.Database;
}
public static void PersonalProfile_Update(FormView formview)
{
txtremark_afdate =
(TextBox)formview.Row.FindControl("txtremark_afdate");
Page | 144
txtremark_apast =
(TextBox)formview.Row.FindControl("txtremark_apast");
txtremark_abedroom =
(TextBox)formview.Row.FindControl("txtremark_abedroom");
txtideal_match =
(TextBox)formview.Row.FindControl("txtideal_match");
string query="update user_personal_detail set
headline='"+txtheadline.Text+"',self_remark='"+txtself_remark.Text+"',
height='"+txtheight.Text+"',ecolor='"+ddlecolor.SelectedItem.Value+"',
hcolor='"+ddlhcolor.SelectedItem.Value+"',best_remark='"+ddlbest_remar
k.SelectedItem.Value+"',remark_about_fdate='"+txtremark_afdate.Text+"'
,past_remark='"+txtremark_apast.Text+"',remark_about_bedroom='"+txtrem
ark_abedroom.Text+"',ideal_match='"+txtideal_match.Text+"'";
Connection con = ConnectionPool.GetConnection();
int i= con.ExecuteNonQuery(query);
ConnectionPool.FreeConnection(con);
formview.ChangeMode(FormViewMode.ReadOnly);
Page | 145
ProfessionalProfile.cs
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Ducat.Forever.Database;
}
public static void ProfessionalProfile_Bind_formview(FormView
formview)
{
}
public static void ProfessionProfile_UpdateProfile(FormView
formview)
{
TextBox txteducation, txtcollege, txtoccupation, txtcompany,
txtcompany_webpage,
txttitle,txtwork_email,txtjob_description,txtwork_phone,txtcareer_skil
l,txtcareer_interest;
Page | 146
DropDownList ddldegree, ddlyear, ddlindustry,ddlsub_industry;
txteducation =
(TextBox)formview.Row.FindControl("txteducation");
txtcollege = (TextBox)formview.Row.FindControl("txtcollege");
txtoccupation =
(TextBox)formview.Row.FindControl("txtoccupation");
txtcompany = (TextBox)formview.Row.FindControl("txtcompany");
txtcompany_webpage =
(TextBox)formview.Row.FindControl("txtcompany_webpage");
txttitle = (TextBox)formview.Row.FindControl("txttitle");
txtwork_email =
(TextBox)formview.Row.FindControl("txtwork_email");
txtjob_description =
(TextBox)formview.Row.FindControl("txtjob_description");
txtwork_phone =
(TextBox)formview.Row.FindControl("txtwork_phone");
txtcareer_skill =
(TextBox)formview.Row.FindControl("txtcareer_skill");
txtcareer_interest =
(TextBox)formview.Row.FindControl("txtcareer_interest");
ddldegree =
(DropDownList)formview.Row.FindControl("ddldgree");
ddlyear = (DropDownList)formview.Row.FindControl("ddlyear");
ddlindustry =
(DropDownList)formview.Row.FindControl("ddlindustry");
ddlsub_industry =
(DropDownList)formview.Row.FindControl("ddlsub_industry");
string query = "update user_professional_detail set
education='" + txteducation.Text + "',college='" + txtcollege.Text +
"',degree='" + ddldegree.SelectedItem.Value + "',year='" +
ddlyear.SelectedItem.Value + "',occupation='" + txtoccupation.Text +
"',industry='" +ddlindustry.SelectedItem.Value + "' ,sub_industry ='"
+ ddlsub_industry.SelectedItem.Value + "',company='" + txtcompany.Text
+ "',company_webpage='" + txtcompany_webpage.Text +
"',title='"+txttitle.Text+"',work_email='"+txtwork_email.Text+"',job_d
etail='"+txtjob_description.Text+"',work_phone='"+txtwork_phone.Text+"
',career_skill='"+txtcareer_skill.Text+"',career_interest='"+txtcareer
_interest.Text+"' where userid='" + userid + "'";
Connection con = ConnectionPool.GetConnection();
int i = con.ExecuteNonQuery(query);
ConnectionPool.FreeConnection(con);
formview.ChangeMode(FormViewMode.ReadOnly);
ProfessionalProfile_Bind_formview(formview);
Page | 147
SocialProfile.cs
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Ducat.Forever.Database;
Page | 148
ddlpets = (DropDownList)FormView1.Row.FindControl("ddlpets");
ddliving =
(DropDownList)FormView1.Row.FindControl("ddlliving");
txthometown =
(TextBox)FormView1.Row.FindControl("txthometown");
txtaboutme = (TextBox)FormView1.Row.FindControl("txtaboutme");
txtpassions =
(TextBox)FormView1.Row.FindControl("txtpassions");
txtsports = (TextBox)FormView1.Row.FindControl("txtsports");
txtactivity =
(TextBox)FormView1.Row.FindControl("txtactivities");
txtmusic = (TextBox)FormView1.Row.FindControl("txtmusic");
txttvshows = (TextBox)FormView1.Row.FindControl("txttvshows");
txtmovies = (TextBox)FormView1.Row.FindControl("txtmovies");
Page | 149
ScrapBook.cs
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Ducat.Forever.Database;
using Ducat.Forever.UI;
using System.IO;
public static class ScrapBook
{
static Connection con;
static DataSet ScrapBook_static_dataset;
static string ScrapBook_static_userid;
}
public static void ScrapBook_BindUserScrap(Repeater repeater)
{
con = ConnectionPool.GetConnection();
ScrapBook_static_dataset = con.GetDataSet("select
scrapid,scrap_message,from_user, doa,imageurl from scrap_detail where
to_user= '" + ScrapBook_static_userid + "' order by doa desc");
ConnectionPool.FreeConnection(con);
//return (ScrapBook_static_dataset);
repeater.DataSource = ScrapBook_static_dataset.Tables[0];
repeater.DataBind();
}
public static string GetImageUrl()
{
con = ConnectionPool.GetConnection();
ScrapBook_static_dataset= con.GetDataSet("select imageurl from
scrap_detail where to_user=" + ScrapBook_static_userid + "");
Page | 150
ConnectionPool.FreeConnection(con);
return
(ScrapBook_static_dataset.Tables[0].Rows[0][0].ToString());
}
public static string ScrapBook_Counter()
{
Connection con =
Ducat.Forever.Database.ConnectionPool.GetConnection();
ScrapBook_static_dataset = con.GetDataSet("select * from
scrap_detail where to_user='" +ScrapBook_static_userid + "'");
ConnectionPool.FreeConnection(con);
return
(ScrapBook_static_dataset.Tables[0].Rows.Count.ToString());
}
public static void ScrapBook_DeleteAll_Scrap(Repeater repeater)
{
int ctr = repeater.Items.Count;
for (int i = 0; i < ctr; i++)
{
CheckBox chk;
Label lbl;
chk = (CheckBox)repeater.Items[i].FindControl("chk");
if (chk.Checked)
{
Page | 151
lbl =
(Label)repeater.Items[i].FindControl("lblscrapid");
Connection con = ConnectionPool.GetConnection();
string query = "delete from scrap_detail where
scrapid=" + lbl.Text;
int j = con.ExecuteNonQuery(query);
ConnectionPool.FreeConnection(con);
}
}
}
public static void ScrapBook_Reply_Scrap(RepeaterItem item)
{
TextBox txt;
txt = (TextBox)item.FindControl("txtmessage");
Label lbl = (Label)item.FindControl("lblsender");
string current_date = System.DateTime.Now.ToString();
string query;
if(lbl.Text.Equals("self"))
query = "insert into scrap_detail
(imageurl,scrap_message,to_user,from_user)values ('" + "usephoto/" +
HttpContext.Current.Session["user_session"].ToString() + ".jpg" +
"','" + txt.Text + "','" +
HttpContext.Current.Session["user_session"].ToString() + "','self')";
else
query = "insert into scrap_detail
(imageurl,scrap_message,to_user,from_user)values ('" + "usephoto/" +
HttpContext.Current.Session["user_session"].ToString() + ".jpg" +
"','" + txt.Text + "','" + lbl.Text + "','" +
HttpContext.Current.Session["user_session"].ToString() + "')";
}
public static void ScrapBook_SelectAllScrap(Repeater repeater)
{
Page | 152
}
}
public static void ScrapBook_SelectNone(Repeater repeater)
{
int ctr = repeater.Items.Count;
for (int i = 0; i < ctr; i++)
{
CheckBox chk;
chk = (CheckBox)repeater.Items[i].FindControl("chk");
chk.Checked = false;
}
public static void ScrapBook_SendScrapSelf(string loc_query)
{
int i = con.ExecuteNonQuery(loc_query);
ConnectionPool.FreeConnection(con);
Page | 153
FriendHome.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
if (!Page.IsPostBack)
{
//}
int ctr = frnd.Count_Friend();
lblfriendlist.Text = "(" + ctr.ToString() + ")";
DataTable dt1 = frnd.Fetch_FriendList(userid);
Repeater1.DataSource = dt1;
Repeater1.DataBind();
Page | 154
}
}
protected void Repeater1_ItemCommand(object source,
RepeaterCommandEventArgs e)
{
LinkButton link = (LinkButton)e.Item.FindControl("lnkb");
string userid = link.Text;
Session["user_session"] = userid;
Response.Redirect("home.aspx?fid=" + userid + "");
}
protected void linkscrap_Click(object sender, EventArgs e)
{
ScrapBook.ScrapBook_SetUserId(Session["friend_id"].ToString());
Response.Redirect("~/ScrapBook/scrapbook.aspx");
}
}
Page | 155
Compose.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Ducat.Forever.Database;
public partial class Mailmessage_compose : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
DropDownList1.Items.Add(ds.Tables[0].Rows[i][0].ToString());
}
protected void LinkButton5_Click(object sender, EventArgs e)
{
bool flag=false;
string fromuser = Session["user_session"].ToString();
string absolute_path=null;
if(FileUpload1.HasFile)
Page | 156
{
string path=Server.MapPath("~/image/");
FileUpload1.SaveAs(path+FileUpload1.FileName);
flag=true;
absolute_path=path+FileUpload1.FileName;
}
string touser = DropDownList1.SelectedItem.Value;
string subject = txtsubject.Text;
string message = txtmessage.Text;
string query=null;
query = "insert into scrap_detail
(imageurl,scrap_message,to_user,from_user)values ('" + "usephoto/" +
HttpContext.Current.Session["user_session"].ToString() + ".jpg" +
"','" + txtmessage.Text + "','" + touser + "','" +
HttpContext.Current.Session["user_session"].ToString() + "')";
//if(flag)
//{
// query="insert into scrap_detail
values('"+absolute_path+"','"+
DateTime.Now+"','"+message+"','"+touser+"','"+fromuser+"')";
//}
//else
//{
// query="insert into scrap_detail values(default,'"+
DateTime.Now+"','"+message+"','"+touser+"','"+fromuser+"')";
//}
Connection con = ConnectionPool.GetConnection();
try
{
int i = con.ExecuteNonQuery(query);
lblnotification.Visible = true;
lblnotification.Text = "Scrap Sent Successfully!";
txtmessage.Text = "";
txtsubject.Text = "";
}
catch
{
lblnotification.Visible = true;
lblnotification.Text = "Scrap Sending Failure Error";
}
finally
{
ConnectionPool.FreeConnection(con);
}
Page | 157
}
protected void LinkButton6_Click(object sender, EventArgs e)
{
txtmessage.Text = "";
txtsubject.Text = "";
}
protected void LinkButton4_Click(object sender, EventArgs e)
{
}
protected void LinkButton2_Click(object sender, EventArgs e)
{
table1.Visible = false;
}
}
Page | 158
MailMessage.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Ducat.Forever.Database;
{
GridView1.Visible = true;
string query = "select to_user,scrap_message,doa from
scrap_detail where from_user='" + Session["user_session"].ToString() +
"'";
bind(query);
if (ctr > 0)
{
lblmessage.Visible = true;
lblmessage.Text = "List Of Scraps Sent";
Page | 159
else
{
lblmessage.Visible = true;
lblmessage.Text = "No Scrap Found";
}
}
protected void GridView1_SelectedIndexChanging(object sender,
GridViewSelectEventArgs e)
{
}
public void bind(string query)
{
DataSet ds = con.GetDataSet(query);
GridView1.DataSource = ds.Tables[0];
GridView1.DataBind();
ctr = ds.Tables[0].Rows.Count;
ConnectionPool.FreeConnection(con);
}
protected void GridView1_Sorting(object sender,
GridViewSortEventArgs e)
{
GridView1.Sort(e.SortExpression,SortDirection.Ascending);
string query = "select to_user,scrap_message,doa from
scrap_detail where from_user='" + Session["user_session"].ToString() +
"'";
bind(query);
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
GridView1.Visible = true;
Page | 160
string query = "select from_user,scrap_message,doa from scrap_detail
where to_user='" + Session["user_session"].ToString() + "'";
bind(query);
if (ctr > 0)
{
lblmessage.Visible = true;
lblmessage.Text = "List Of Scraps Recieved";
}
else
{
lblmessage.Visible = true;
lblmessage.Text = "No Scrap found";
}
}
}
Page | 161
Password_Recovery.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Ducat.Forever.Database;
if (ctr > 0)
{
Page | 162
else
{
lblerror.Text = "Unable to send Password";
}
}
else
{
lblerror.Text = "Invalid userid or emailid";
}
txtuser.Text = "";
txtemailid.Text = "";
}
}
Page | 163
GeneralProfile.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Ducat.Forever.Database;
GeneralProfile.GeneralProfile_Bind_formview(FormView1);
}
else
{
string userid = Session["user_session"].ToString();
GeneralProfile.setuserid = userid;
GeneralProfile.GeneralProfile_Bind_formview(FormView1);
}
Page | 164
protected void FormView1_ModeChanging(object sender,
FormViewModeEventArgs e)
{
if (e.NewMode.ToString().Equals("Edit"))
{
FormView1.ChangeMode(FormViewMode.Edit);
}
else if(e.NewMode.ToString().Equals("ReadOnly"))
{
FormView1.ChangeMode(FormViewMode.ReadOnly);
}
GeneralProfile.GeneralProfile_Bind_formview(FormView1);
}
protected void FormView1_ItemUpdating(object sender,
FormViewUpdateEventArgs e)
{
GeneralProfile.GeneralProfile_UpdateProfile(FormView1);
FormView1.ChangeMode(FormViewMode.ReadOnly);
GeneralProfile.GeneralProfile_Bind_formview(FormView1);
}
protected void FormView1_PageIndexChanging(object sender,
FormViewPageEventArgs e)
{
}
}
Page | 165
PersonalProfile.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
}
else
{
string userid = Session["user_session"].ToString();
PersonalProfile.setuserid = userid;
PersonalProfile.PersonalProfile_bind(FormView1,
userid);
}
}
protected void FormView1_ItemUpdating(object sender,
FormViewUpdateEventArgs e)
{
Page | 166
PersonalProfile.PersonalProfile_Update(FormView1);
PersonalProfile.PersonalProfile_bind(FormView1,
Session["user_session"].ToString());
}
protected void FormView1_ModeChanging(object sender,
FormViewModeEventArgs e)
{
if (e.NewMode.ToString().Equals("Edit"))
FormView1.ChangeMode(FormViewMode.Edit);
else if (e.NewMode.ToString().Equals("ReadOnly"))
FormView1.ChangeMode(FormViewMode.ReadOnly);
PersonalProfile.PersonalProfile_bind(FormView1,
Session["user_session"].ToString());
}
protected void FormView1_PageIndexChanging(object sender,
FormViewPageEventArgs e)
{
}
}
Page | 167
ProfessionalProfile.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
ProfessionalProfile.ProfessionalProfile_Bind_formview(FormView1);
ProfessionalProfile.setuserid =
Session["user_session"].ToString();
ProfessionalProfile.ProfessionalProfile_Bind_formview(FormView1);
}
protected void FormView1_PageIndexChanging(object sender,
FormViewPageEventArgs e)
{
}
protected void FormView1_ModeChanging(object sender,
FormViewModeEventArgs e)
Page | 168
{
if(e.NewMode.ToString().Equals("Edit"))
FormView1.ChangeMode(FormViewMode.Edit);
else if(e.NewMode.ToString().Equals("ReadOnly"))
FormView1.ChangeMode(FormViewMode.ReadOnly);
ProfessionalProfile.ProfessionalProfile_Bind_formview(FormView1);
}
protected void FormView1_ItemUpdating(object sender,
FormViewUpdateEventArgs e)
{
ProfessionalProfile.ProfessionProfile_UpdateProfile(FormView1);
}
}
Page | 169
Editsocial.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Ducat.Forever.Application;
using Ducat.Forever.Database;
using Ducat.Forever.UI;
public partial class localfolder_Editsocial : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
Bind_User_Social_Detail();
}
protected void ucl_Load(object sender, EventArgs e)
{
}
protected void ucl_Load1(object sender, EventArgs e)
{
}
protected void FormView1_ModeChanging(object sender,
FormViewModeEventArgs e)
{
if (e.NewMode.ToString().Equals("Edit"))
{
FormView1.ChangeMode(FormViewMode.Edit);
}
else
FormView1.ChangeMode(FormViewMode.ReadOnly);
Bind_User_Social_Detail();
}
protected void FormView1_ItemUpdating(object sender,
FormViewUpdateEventArgs e)
Page | 170
{
}
public void Bind_User_Social_Detail()
{
Connection con = ConnectionPool.GetConnection();
DataSet ds= con.GetDataSet("select * from
user_social_detail");
ConnectionPool.FreeConnection(con );
FormView1.DataSource = ds;
FormView1.DataBind();
}
protected void FormView1_PageIndexChanging(object sender,
FormViewPageEventArgs e)
{
}
}
Page | 171
Profile.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
else
{
LinkButton lk =
(LinkButton)Master.FindControl("LinkButton5");
lk.Visible = true;
Image im = (Image)Master.FindControl("Image5");
im.Visible = true;
}
}
protected void ucl_Load(object sender, EventArgs e)
{
}
}
Page | 172
Popupwindow.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
}
protected void Button1_Click(object sender, EventArgs e)
{
//string path=Session["aa"].ToString();
//Response.Redirect("Scrapbook.aspx?fid=" + path);
//Server.Transfer("scrapbook.aspx");]
//Response.Write("<script>window.close()</script>");
}
protected void Button1_Click1(object sender, EventArgs e)
{
Session["aa"] = FileUpload1.PostedFile.FileName;
Response.Write("<script>window.opener.location.href=window.opener.loca
tion.href;self.close();</script>");
}
}
Page | 173
Scrapbook.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.IO;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Ducat.Forever.Database;
if (Session["aa"] != null)
{
TextBox txt = (TextBox)Page.Master.FindControl("txturl");
txt.Text = Session["aa"].ToString();
img.Visible = true;
int width = 80;
int height = 80;
img.Width = width;
img.Height = height;
img.Src = txt.Text;
}
if (Session["userfriend"] != null &&
Session["userfriend"].ToString() !=
Session["user_session"].ToString())
{
LinkButton lk =
(LinkButton)Master.FindControl("LinkButton5");
lk.Visible = false;
Image im = (Image)Master.FindControl("Image5");
im.Visible = false;
Page | 174
else
{
LinkButton lk =
(LinkButton)Master.FindControl("LinkButton5");
lk.Visible = true;
Image im = (Image)Master.FindControl("Image5");
im.Visible = true;
}
if (!IsPostBack)
{
ScrapBook.ScrapBook_BindUserScrap(repeater1);
DropDownList
ddlist=(DropDownList)repeater1.Controls[0].FindControl("DropDownList1"
);
int index = ddlist.SelectedIndex;
int ctr = 0;
if (index == 1)
ctr = 3;
else if (index == 2)
ctr = 5;
else if (index == 3)
ctr = 10;
}
protected void repeater1_ItemCommand(object source,
RepeaterCommandEventArgs e)
{
if (e.CommandName.Equals("Delete"))
{
ScrapBook.ScrapBook_Delete_Scrap(e.Item);
ScrapBook.ScrapBook_BindUserScrap(repeater1);
Page | 175
else if (e.CommandName.Equals("Display"))
{
LinkButton link1, link2;
TextBox txt;
txt = (TextBox)e.Item.FindControl("txtmessage");
txt.Visible = true;
link1 = (LinkButton)e.Item.FindControl("link");
link1.Visible = true;
}
else if (e.CommandName.Equals("Reply"))
{
ScrapBook.ScrapBook_Reply_Scrap(e.Item);
ScrapBook.ScrapBook_BindUserScrap(repeater1);
}
else if (e.CommandName.Equals("Select_all"))
{
ScrapBook.ScrapBook_SelectAllScrap(repeater1);
}
else if (e.CommandName.Equals("Select_none"))
{
ScrapBook.ScrapBook_SelectNone(repeater1);
}
else if (e.CommandName.Equals("Delete_all"))
{
ScrapBook.ScrapBook_DeleteAll_Scrap(repeater1);
ScrapBook.ScrapBook_BindUserScrap(repeater1);
}
Page | 176
if (txturl.Text.Length > 0 || txtscrap.Text.Length > 0)
{
if (txturl.Text.Length > 0)
{
FileInfo fi = new FileInfo(txturl.Text);
fi.CopyTo(AppDomain.CurrentDomain.BaseDirectory+"Scrapbook\\scrapimage
\\"+Path.GetFileName(txturl.Text),true);
string path = "scrapimage/" +
Path.GetFileName(txturl.Text);
if (Session["userfriend"] != null)
{
query = "insert into scrap_detail
(imageurl,scrap_message,to_user,from_user)values ('" + "usephoto/" +
current_user + ".jpg" + "','" + path + "','" +
Session["userfriend"].ToString() + "','" + current_user + "')";
}
else
{
query = "insert into scrap_detail
(imageurl,scrap_message,to_user,from_user)values ('" + "usephoto/" +
current_user + ".jpg" + "','" + path + "','" + current_user +
"','self')";
}
txturl.Text = string.Empty;
img.Src = string.Empty;
Session["aa"] = null;
}
else
{
if (Session["userfriend"] != null)
{
query = "insert into scrap_detail
(imageurl,scrap_message,to_user,from_user)values ('" + "usephoto/" +
current_user + ".jpg" + "','" + message + "','" +
Session["userfriend"].ToString() + "','" + current_user + "')";
}
else
{
query = "insert into
scrap_detail(imageurl,scrap_message,to_user,from_user) values('" +
"usephoto/" + current_user + ".jpg" + "','" + message + "','" +
current_user + "','self')";
}
}
ScrapBook.ScrapBook_SendScrapSelf(query);
txtscrap.Text = "";
txturl.Text = "";
ScrapBook.ScrapBook_BindUserScrap(repeater1);
img.Visible = false;
txtpreview.Visible = false;
Page | 177
img.Visible = false;
}
}
}
if(txtscrap.Text!="")
{
//TextBox1.Attributes.Add("style", "overflow :hidden");
txtpreview.Visible = true;
int width = 670;
int height = 50;
txtpreview.Attributes.Add("style", "overflow:hidden");
txtpreview.Width = width;
txtpreview.Height = height;
txtpreview.Text = txtscrap.Text;
}
//tt.Text = "";
}
protected void link_photo_Click(object sender, EventArgs e)
{
Response.Write("<script>window.open('popupwindow.aspx',null,'height=23
0,width=500,resizable=no,scrollbars=no,top=150,left=150,toolbar=no,men
ubar=no')</script>");
Page | 178
protected void txtpreview_TextChanged(object sender, EventArgs e)
{
}
protected void scrap_tips_Click(object sender, EventArgs e)
{
Response.Write("<script>window.open('scraptip.htm',null,'height=450,
width=450,status=yes, resizable=no,left=150px, scrollbars=yes,
toolbar=no,menubar=no')</script>");
}
protected void repeater1_ItemDataBound(object sender,
RepeaterItemEventArgs e)
{
if (Session["userfriend"] != null &&
Session["user_session"]!=null)
{
if (Session["userfriend"].ToString() !=
Session["user_session"].ToString())
{
if (e.Item.ItemType == ListItemType.Header)
{
LinkButton delsel1 =
(LinkButton)e.Item.FindControl("LinkButton2");
delsel1.Visible = false;
LinkButton delsel2 =
(LinkButton)e.Item.FindControl("LinkButton3");
delsel2.Visible = false;
LinkButton delsel3 =
(LinkButton)e.Item.FindControl("LinkButton4");
delsel3.Visible = false;
LinkButton delsel4 =
(LinkButton)e.Item.FindControl("LinkButton5");
delsel4.Visible = false;
if (e.Item.ItemType == ListItemType.Item ||
e.Item.ItemType == ListItemType.AlternatingItem)
Page | 179
{
CheckBox ck1 =
(CheckBox)e.Item.FindControl("chk");
ck1.Visible = false;
LinkButton reply =
(LinkButton)e.Item.FindControl("LinkButton1");
reply.Visible = false;
Label lbl=(Label)e.Item.FindControl("lblsender");
if (lbl.Text !=
Session["user_session"].ToString())
{
LinkButton
lnkdel=(LinkButton)e.Item.FindControl("linkdelete");
lnkdel.Visible = false;
}
}
}
}
}
}
}
Page | 180
Scraptip.htm
Page | 181
.style1
{
height: 56px;
}
</style>
</head>
<body style="padding: 10px">
<div id="mboxfullr" style="margin-right: 0px">
<table cellpadding="0" cellspacing="0" border="0" class="module" ><tr>
<td class="style1">
<h2 style="font-family: Arial; font-size: x-large; font-weight: bold;
color: #800080">
<img alt="" src="friendworld_logo.bmp" /></h2>
<h2 style="font-family: Arial; font-size: x-large; font-
weight: bold; color: #800080">
</h2>
<h2 style="font-family: Arial; font-size: x-large; font-
weight: bold; color: #800080">Scraps
To Friends</h2>
</td><td class="style1" ></td></tr>
<tr><td class="boxmidlrg" >
<table class="listlight" border="0" cellpadding="2" cellspacing="2"
width="100%">
<tr>
<td>
Now, you can paste in photos, videos, audio, and flash widgets in
scraps to your friends. Here's how:
</td>
</tr>
<tr>
<td>
<ul class="bullets">
<li>Add images<br>
Copy and paste urls ending in .jpg, .gif, .png or .bmp and the image
will appear in the scrap.<br>
for example, http://example.com/example.jpg
</li>
<li>Add videos from YouTube<br>
Copy and paste the url and the video will appear in the scrap.<br>
for example, http://youtube.com/watch?v=videoid
</li>
<li>Add podcast/audio<br>
Copy and paste the url of an audio file and an audio player will
appear in the scrap.<br>
for example, http://example.com/example.mp3
</li>
<li>Add html-embeddable objects<br>
Create or upload your content at sites such as photobucket.com,
imageshack.com, rockyou.com or slide.com. Copy and paste the html
embed code to share it with your friends.<br>
</li>
</ul>
Page | 182
</td>
</tr>
</table>
</td><td class="boxmidr" ></td></tr>
<tr><td class="botl"></td><td class="botr"></td></tr>
<tr><td class="botl"> </td><td
class="botr"> </td></tr></table>
<table cellpadding="0" cellspacing="0" border="0" class="module"
><tr><td class="topl_g">
<h2 style="font-family: Arial; font-size: x-large; font-weight: bold;
color: #800080">Scraps
To Everyone</h2>
</td><td class="topr_g" ></td></tr>
<tr><td class="boxmidlrg" >
<table class="listlight" border="0" cellpadding="2" cellspacing="2"
width="100%">
<tr>
<td>b - ="100%">
<tr>
<td>b - <b>bold</b></td>
<td>u - <u>underline</u></td>
<td>i - <i>italic</i></td>
<td width="17%">8) - <img alt="" border="0"
src="http://img1.orkut.com/img/smiley/i_cool.gif" width="15"
height="15" ></td>
<td width="17%">:( - <img alt="" border="0"
src="http://img4.orkut.com/img/smiley/i_sad.gif" width="15"
height="15" ></td>
<td width="16%">:x - <img alt="" border="0"
src="http://img2.orkut.com/img/smiley/i_angry.gif" width="15"
height="15" ></td>
</tr>
<tr>
<td>:) - <img alt="" border="0"
src="http://img1.orkut.com/img/smiley/i_smile.gif" width="15"
height="15" ></td>
<td>;) - <img alt="" border="0"
src="http://img3.orkut.com/img/smiley/i_wink.gif" width="15"
height="15" ></td>
<td>:D - <img alt="" border="0"
src="http://img4.orkut.com/img/smiley/i_bigsmile.gif" width="15"
height="15" ></td>
<td>:o - <img alt="" border="0"
src="http://img1.orkut.com/img/smiley/i_surprise.gif" width="15"
height="15" ></td>
<td>:P - <img alt="" border="0"
src="http://img3.orkut.com/img/smiley/i_funny.gif" width="15"
height="15" ></td>
<td>/) - <img alt="" border="0"
src="http://img3.orkut.com/img/smiley/i_confuse.gif" width="15"
height="15" ></td>
</tr>
Page | 183
<tr>
<td><font color="aqua">aqua</font></td>
<td><font color="blue">blue</font></td>
<td><font color="#f0c0a0">fuchsia</font></td>
<td><font color="#ffd700">gold</font></td>
<td><font color="gray">gray</font></td>
<td><font color="green">green</font></td>
</tr>
<tr>
<td><font color="lime">lime</font></td>
<td><font color="maroon">maroon</font></td>
<td><font color="navy">navy</font></td>
<td><font color="olive">olive</font></td>
<td><font color="orange">orange</font></td>
<td><font color="pink">pink</font></td>
</tr>
<tr>
<td><font color="purple">purple</font></td>
<td><font color="red">red</font></td>
<td><font color="silver">silver</font></td>
<td><font color="teal">teal</font></td>
<td><font color="#ff00ff">violet</font></td>
<td><font color="yellow">yellow</font></td>
</tr>
<tr>
<td colspan="6">
<div class="listdivi ln"></div>
</td>
</tr>
<tr>
<td colspan="6">
<ul class="bullets">
<li>To change the font color of your text, type the name of the color
you wish to use in brackets.</li>
<li>To show an emoticon, type the key shown above for each emoticon in
brackets.</li>
<li>To make text bold, italic, or underlined, use [b], [i] and [u]
accordingly.</li>
<li>To make a word a link, use <?cs #trans ignore
?>[link]...[/link]<?cs #trans /ignore ?></li>
<li>I am [red]feeling[/red] [b][i]lucky[/i][/b] ! [:)] --> I am
<span style="color:red">feeling</span> <b><i>lucky</i></b> ! <img
src="http://img1.orkut.com/img/i_smile.gif"></li>
<li>[link=http://www.foreverfun.com]orkut[/link] --> orkut [<a
href="http://www.foreverfun.com">http://www.orkut.com</a>]</li>
<li>[link]http://www.foreverfun.com[/link] --> <a
href="http://www.foreverfun.com">http://www.orkut.com</a></li>
</ul>
</td>
</tr>
</table>
</td><td class="boxmidr" ></td></tr>
Page | 184
<tr><td class="botl"></td><td class="botr"></td></tr></table>
<div class="listdivi ln"></div>
<div class="parabtns">
<span class="lf">
<span class="grabtn"><a href="javascript:void(0);"
onclick="javascript:window.close(); return false;"
class="btn">close</a></span><span class="btnboxr"><img
src="http://img1.orkut.com/img/b.gif" alt="" height="1"
width="5"></span>
</span>
</div>
</body>
</html>
Page | 185
Default2.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
}
}
Page | 186
Page | 187
DATABASE DESIGN
Page | 188
DATA STRUCTURE
FRIEND DETAIL
FRIEND INVITATION
IMAGE
Page | 189
MAIL MESSAGE DETAIL
SCRAP DETAIL
USER ALBUM
Page | 190
USER GENERAL DETAIL
Page | 191
USER PERSONAL DETAIL
Page | 192
USER SOCIAL DETAIL
Page | 193
DEFINITIONS, ACRONYMS AND ABBREVIATIONS
Coding The design must be translated into machine readable form. The
code generation step performs this task.
Data store: A logical construct used to depict data that is being recorded
during manual and automated processes. Data stores are
organized by logical data groupings without regard to the
storage medium
DFD Data Flow Diagram-A diagram that shows the inputs and
outputs of a process and the data stores that store the data.
Page | 194
RAM Random Access Memory
Unit Testing The project is divided into small units and then the testing is
done on each unit separately.
White-Box It is a test case design method that uses the control the
Testing structure of the procedural design to derive test cases.
Page | 195
Page | 196
CONCLUSION
ADVANTAGES
All the procedure in this project is automatic accept the entry of data from the
user.
The project gives the user-friendly environment, which gives the way of working
in more efficient manner.
LIMITATIONS
This system not provides the facility to users so that they can set various
types of themes and send interesting themes to their friends.
Page | 197
Page | 198
FUTURE SCOPE
This software can be easily upgraded in the future. And also include many more
features for existing system.
In future this system will provide online video conferencing bringing people
together who are geographically separated.
In future user can maintain their play list and any friend of that user can get that
play list.
In future there will be privacy policy so that valid user in only permissible to enter
another’s profile and can’t change their profile.
Page | 199
DEPENDENCIES
It doesn’t matter how efficiently the application works, if the bandwidth is not
sufficient the transaction will take more time then expected.
.Net Framework for execution environment and Ado.Net Provides for database
connectivity.
Page | 200
Page | 201
BIBLIOGRAPHY
BOOKS
LIBRARY
MSDN
The MSDN Library is the essential reference for developers, with more than a
gigabyte of technical programming information; including sample code, documentation,
technical articles, the Microsoft Developer Knowledge Base, and anything else we might
need to develop solutions that implement Microsoft technology.
WEBSITE
www.apollohospital.com
www.ducatindia.com
www.ministryofhealth.com
Page | 202