You are on page 1of 72

FOOD RECOMMENDATION SYSTEM BASED ON BMI

A project submitted to the Bharathidasan University


in partial fulfillment of the requirements
for the award of the Degree of

BACHELOR OF COMPUTER APPLICATIONS

Submitted by

S . SAMUEL MOSES DANIEL


Register Number: 175113551

Under the guidance of


Ms. S.KANCHANA MCA.,NET.,
Assistant Professor

DEPARTMENT OF COMPUTER APPLICATIONS


BISHOP HEBER COLLEGE (AUTONOMOUS)
(Nationally Reaccredited at the ‘A’ Grade by NAAC with the CGPA of 3.58 out of 4)
(Recognized by UGC as “College of Excellence”)
(Affiliated to Bharathidasan University)

TIRUCHIRAPPALLI-620 017

APRIL – 2020
DECLARATION

I hereby declare that the project work presented is originally done by me under

the guidance of MS. S.KANCHANA MCA.,NET., Assistant Professor, Department

of Computer Applications, Bishop Heber College (Autonomous), Tiruchirappalli-

620 017 and has not been included in any other thesis/project submitted for any other

degree.

Name of the Candidate : S .SAMUEL MOSES DANIEL

Register Number : 175113551

Batch : 2017-2020

Signature of the Candidate


S.SAMUEL MOSES DANIEL
Ms. S. KANCHANA MCA.,NET.,
Assistant Professor,
Department of Computer Applications,
Bishop Heber College (Autonomous),
Tiruchirappalli – 620017

Date:

CERTIFICATE

This is to certify that the project work entitled “FOOD RECOMMENDATION

BASED ON BMI” is a bonafide record work done by S.SAMUEL MOSES DANIEL , Register

Number:175113551 in partial fulfillment of the requirements for the award of the

degree of BACHELOR OF COMPUTER APPLICATIONS during the period 2017 - 2020.

Place: Signature of the Guide


DEPARTMENT OF COMPUTER APPLICATIONS
BISHOP HEBER COLLEGE (AUTONOMOUS),
(Nationally Reaccredited at the ‘A’ Grade by NAAC with the CGPA of 3.58 out of 4)
(Recognized by UGC as “College of Excellence”)
(Affiliated to Bharathidasan University)

TIRUCHIRAPPALLI - 620017

Date:

Course Title: FOOD RECOMMENDATION SYSTEM BASED ON BMI


Course Code: U15CA6PJ

CERTIFICATE

The Viva-Voce examination for the candidate S.SAMUEL MOSES

DANIEL Register Number: 175113551..… was held on _________________.

Signature of the Guide Signature of the HOD

Examiners:

1.

2.
ACKNOWLEDGEMENTS

First of all, I would like to thank ALMIGHTY GOD for his abundant grace. Good health
and knowledge to do this Project.

I express my sincere gratitude to Dr.D.PAUL DHAYABARAN, M.Sc.,M.Phil., PGDCA.,


Ph.D., Principal of Bishop Heber College (Autonomous), Trichy for providing me an
opportunity to do my course in this prestigious institution.

I am highly indebted to thank Dr. J. JAMES MANOHARAN, M.C.A.., PGDCA., M.Phil.,


Associate Professor and Head, Department of Computer Applications(S.F), Bishop Heber
College (Autonomous), Trichy for having given me permission to pursue this project.

I wish to place on record my gratitude to Ms. S. KANCHANA, MCA.,NET., Assistant


Professor in Department of Computer Applications(S.F), Bishop Heber College
(Autonomous), Trichy, for her support during this project work

. I record my deep sense of gratitude to my beloved parents and my friends for their
encouragement and moral support extended during the period of my project.
SYNOPSIS

The Online Food Recommendation System based on BMI about human diets. It acts as a diet
consultant similar to a real dietician. Dieticians are educated with nutrient value of foods. A
dietician consults a person based on his schedule, body type, height and weight. The system
too asks all this data from the user and processes it. It asks about how many hour the user
works, his height, weight, age etc. The system stores and processes this data and then calculates
the nutrient value needed to fill up users needs. The system then shows an appropriate diet to
the users and asks if user is ok with it, else it shows other alternate diets to fill up users needs.

Software Description

Front End : PHP, ASP.NET


Back end : MYSQL, SQL Server
Modules
Admin
• Login
• Add Diet Food and Exercise
Nutrition
• Register
• Login
• Response
User
• Register
• Login
• Diet Details
• Query
CONTENTS

S.NO CHAPTERS PAGE.NO


PROJECT DESCRIPTION
1.1 Introduction 1
1. 1.2 Existing system 2
1.3 Proposed system 3
1.3.1 Hardware specifications 3
1.3.2 Software specifications 3
LOGICAL DEVELOPMENT
2. 2.1 Architectural Design 7
2.2 Data Flow Diagram 4
DATABASE DESIGN
3.1 Data Dictionary 19
3. 3.2 Table Design 20
3.3 Relationship Diagram 22
4. PROGRAM DESIGN 23
5. TESTING 25
6. CONCLUSION 29
7. REFERENCES 30
8. APPENDIX
8.1 Source code 47
8.2 output screening 31
1.PROJECT DESCRIPTIONS

1.1 INTRODUCTION
Now a days, a human being suffering from many health problems such as fitness problem,
maintaining proper diet problem, etc. Therefore, developing this website for providing
special dietician information and proper exercise knowledge for normal persons and for
handicap peoples also. The effective personal dietary guidelines are very essential for
managing our health, preventing chronic diseases and the interactive diet planning helps a
user to adjust the plan in an easier way. The website is to be produced on Food
Recommendation System based on BMI. Here there are two persons, the admin and user.
The user fills the registration form and then login to the website. After login users have to
fill personal information including age, weight, height and gender. For calculating BMI
age, weight, height, and gender are necessary. On the basis of calculated BMI (Body Mass
Index) food recommendation system will display the proper dietician for logged user

1
1.2 EXISTING SYSTEM
The existing Dietitian System of getting a diet plan is completely manual. People need to visit
their local Dietitian physically to know the suggested diet plan. The user has to wait for their
appointment with the Dietitian. The user might have to wait for long hours some times. This
makes it very inconvenient for the users to get their diet plan. They have to wait just to get the
information about what they should eat. This is not efficient when looked from an end user’s
point of view.

Disadvantages of Existing System

• IT doesn’t takes users health condition into account.


• It does not asks user about his daily routine and food choices
• It Doesn’t provide any video for user
• It doesn’t provide direct answer from various dieticians

2
1.3 PROPOSED SYSTEM

The proposed food recommendation system is having information of diet plans. The system
measures a user’s body mass index based on user height and weight. The user has to then enter
his eating timings and the system presents user the diet plan that would be best for that
particular user. All the food items along with the quantity are shown to the user. If the user
doesn’t like the current diet plan, the system modifies food items keeping the total nutritional
value same.

Advantages of Proposed System

• The application also eliminates the travelling cost in visiting a dietician.


• The usage of this application greatly reduces the time required to get the best diet
plan as it is standalone application and there is no danger of one point failure
• No need of consulting doctor for diet plans.
• This system provides full details of the nutrient constitution in body and if required
more or not along with the plan by just answering to some queries.
• Saves money and very effective and give accurate results as it is coded with keeping
diet chart in mind.
• There is alternative diet chart provided by the system if the user doesn’t like any.

1.3.1 HARDWARE SPECIFICATION


• Processor : Dual core processor 2.6.0 GHZ
• RAM : 1GB
• Hard disk : 160 GB
• Compact Disk : 650 Mb
• Keyboard : Standard keyboard

1.3.2 SOFTWARE SPECIFICATION


• Operating System : Windows XP, Windows 7
• Language : Asp.net
• IDE : Microsoft Visual Studio 2010
• Back End : SQL Server 2010

3
2. LOGICAL DEVELOPMENT

2.1 DATA FLOW DIAGRAM


A two-dimensional diagram explains how data is processed and transferred in a system.
The graphical depiction identifies each source of data and how it interacts with other data
sources to reach a common output. Individuals seeking to draft a data flow diagram must
identify external inputs and outputs, determine how the inputs and outputs relate to each other,
and explain with graphics how these connections relate and what they result in. This type of
diagram helps business development and design teams visualize how data is processed and
identify or improve certain aspects.

DATA FLOW SYMBOLS


Symbol Description

An entity. A source of data or a


destination for data.

A process or task that is


performed by the system.

A data store, a place where data


is held between processes.

A data flow.

4
LEVEL 0
The Level 0 DFD shows how the system is divided into 'sub-systems' (processes), each
of which deals with one or more of the data flows to or from an external agent, and which
together provide all of the functionality of the system as a whole. It also identifies internal data
stores that must be present in order for the system to do its job, and shows the flow of data
between the various parts of the system.

Admin

Food
User Recommend Database
ation System
based on
BMI

Nutrition

LEVEL 1

5
The next stage is to create the Level 1 Data Flow Diagram. This highlights the main
functions carried out by the system. As a rule, to describe the system was using between two
and seven functions - two being
a simple system and seven being a complicated system. This enables us to keep the model
manageable on screen or paper.

Login Store the data

Diet Food
Retrieving the data
details

Admin
User
details Retrieving the data

Exercise
details Retrieving the data

2.2 ARCHITECTURAL DIAGRAM


An allocated arrangement of physical elements which provides the design solution for
a consumer A system architecture or systems architecture is the conceptual model that defines

6
the structure, behavior, and more views of a system. An architecture description is a formal
description and representation of a system, organized in a way that supports reasoning about
the structures and behaviors of the system. System architecture can comprise system
components, the externally visible properties of those components, the relationships (e.g. the
behavior) between them. It can provide a plan from which products can be procured, and
systems developed, that will work together to implement the overall system. There have been
efforts to formalize languages to describe system architecture; collectively these are called
architecture description languages (ADLs).
Various organizations define systems architecture in different ways, including:
• Product or life-cycle process intended to satisfy the requirements of the functional
architecture and the requirements baseline.
• Architecture comprises the most important, pervasive, top-level, strategic inventions,
decisions, and their associated rationales about the overall structure (i.e., essential
elements and their relationships) and associated characteristics and behavior.
• If documented, it may include information such as a detailed inventory of current
hardware, software and networking capabilities; a description of long-range plans and
priorities for future purchases, and a plan for upgrading and/or replacing dated
equipment and software

The composite of the design architectures for products and their life-cycle processes.

7
FOOD RECOMMENDATION SYSTEM BASED
ON BMI

Nutrition Admin User

Register Login Register

Add Diet Food Login


Login
and Exercise
Diet Details
Response

Query

8
2.3 SOFTWARE DESCRIPTION
DOT NET OVERVIEW VISUAL STUDIO .NET
Visual Studio .Net is the fast application improvement device for BASIC. Visual Studio
.Net offers complete mix with ASP.NET and empowers to move and customize server controls
and outline Web Forms as they ought to show up when client sees them. A percentage of
alternate points of interest of making BASIC applications in Visual Studio .Net are
• Visual Studio .Net is a Rapid Application (RAD) apparatus. Rather than adding every
control to the Web Form automatically, it serves to include these controls by utilizing tool
stash, sparing programming endeavors.

• Visual Studio .Net backings custom and composite controls. Can make custom controls
that embody a typical usefulness that may need to use in various applications.

• Visual Studio .Net makes a glorious showing of rearranging the creation and utilization
of Web Services. Mush of the software engineer neighborly stuff (making all the XML-based
reports) happens consequently, without much exertion on the developer's side.

• A characteristic based writing computer program is an effective idea that empowers


Visual Studio .Net to mechanize a considerable measure of software engineer unpleasant
assignments.

.NET Programming Dialects:


The .NET Framework gives an arrangement of instruments that assistance to assemble
code that works with the .NET Framework, Microsoft gives an arrangement of dialects that
are as of now .NET perfect. Fundamental is one of those dialects.
ASP.NET Environment:
Dynamic Server Pages were discharged by Microsoft to empower the formation of
element pages taking into account client information and cooperation with a Web website.
ASP.NET enhances the first ASP by giving code-behind. With ASP.NET and code-behind,
the code and HTML can be isolated.
ASP.NET Web administrations are XML-construct benefits that are presented with
respect to the Internet that can be gotten to by other Web administrations and Web
administration customers.
ASP.NET:

9
ASP.NET is more than the following form of Active Server Pages (ASP); it is a brought
together Web advancement stage that gives the administrations important to designers to
fabricate undertaking class Web applications. While ASP.NET is to a great extent sentence
structure perfect with ASP, it likewise gives another programming model and foundation for
more secure, versatile, and stable applications.
ASP.NET is an assembled, .NET-based environment; you can creator applications in
any .NET perfect dialect, including VisualBasic.NET, BASIC, and JScript.NET. Furthermore,
the whole .NET Framework is accessible to any ASP.NET application. Engineers can
undoubtedly get to the regale of these advances, which incorporate oversaw normal dialect
runtime environment, sort wellbeing, legacy, et cetera.
ASP.NET has been intended to work consistently with WYSIWYG HTML editors and
other programming instruments, including Microsoft Visual Studio .NET. Does this make
Web improvement simpler, as well as gives every one of the advantages that these apparatuses
bring to the table, including a GUI that designers can use to drop server controls onto a Web
page and completely coordinated investigating backing. Engineers can browse the
accompanying two elements when making a " ASP.NET application, Web Forms and Web
administrations, or consolidate these in any capacity they see fit.
• Web Forms permits you to assemble intense structures based Web pages. At the point
when building these pages, you can utilize ASP.NET server controls to make normal Ul
components, and system them for basic assignments. These controls permit you to quickly
assemble a Web Form out of reusable implicit or custom segments, rearranging the code of a
page.

• An XML Web administration gives the intends to get to server usefulness remotely

ASP.Net Architecture:

10
Features:
➢ Intuitive C++ Based Language

Utilize a dialect displayed on C++ linguistic structure, instantly commonplace to C++


and Java designers, and also natural new dialect builds that incredibly streamline advancement
errands
➢ Reliable Interoperability

Utilize code to call local Windows APIs, use pre-constructed COM parts, and influence
existing ActiveX controls to flawlessly coordinate existing applications and segments.
➢ Advanced, Component-Oriented Language

Exploit inborn backing for properties, indexers, delegates, single and


multidimensional clusters, propelled legacy, traits, forming, and XML remarks.

➢ Capable Debugging and Testing Tools

11
ASP .NET incorporates a capable remote and multi-dialect debugger, empowering
engineers to test applications and fabricate solid multi-level arrangements that compass
process limits and are composed in different programming dialects.
Net Framework Class Library :
Addition experienced and capable, constructed in usefulness, including a rich
arrangement of accumulation classes, systems administration bolster, multithreading bolster,
string and customary expression classes, and wide backing for XML, XML patterns, XML
namespaces, XSLT, XPath, and SOAP.
Powerful Web Development Environment:
Make Web-based arrangements in C# utilizing the mutual Web Forms Designer and
XML Designer. Engineers can likewise utilize IntelliSense elements and label finish or pick
the WYSIWYG manager for move and customize creating to construct intelligent Web
applications.
. NET Framework:
Microsoft planned VB from the beginning to exploit its new .NET Framework. The
.NET Framework is comprised of four sections, the Common Language Runtime, an
arrangement of class libraries, an arrangement of programming dialects, and the ASP.NET
environment. The .NET Framework was composed on account of three objectives. In the first
place, it was planned to make Windows applications considerably more solid, while likewise
furnishing an application with more prominent level of security.
Second, it was proposed to improve the advancement of Web applications and
administrations that work in the conventional sense, as well as on cell phones too. Finally, the
structure was intended to give a solitary arrangement of libraries that would work with various
dialects. The .NET Framework is the base for the new Microsoft .NET Platform. Furthermore,
it is a typical situation for building, conveying, and running Web applications and Web
Services. The .NET Framework contains a typical dialect runtime and basic class libraries -
like ADO .NET, ASP .NET and Windows Forms - to give propelled standard administrations
that can be coordinated into a mixed bag of PC frameworks. The .NET Framework gives a
component rich application environment, streamlined improvement and simple mix between
various diverse advancement dialects. The .NET Framework is dialect nonpartisan. At present
it bolsters C++, C#, Visual Basic, and Jscript. Microsoft's Visual Studio.NET is a typical
advancement environment for the new .NET Framework.
Coordinating with IIS

12
IIS is the web server is utilized here. IIS 5.0 or above is key for the ASP.NET for the
earth. This arrival of ASP.NET uses IIS 5.0 as the priKim host environment. IIS dependably
accept that an arrangement of accreditations maps to a Windows NT record and uses them to
verify a client. There are three various types of validation accessible in IIS 5.0: BASIC,
DIGEST, and INTEGRATED WINDOWS Authentication (NTLM or Kerberos). You can
choose the kind of verification to use in the IIS regulatory administrations.
On the off chance that you ask for a URL containing an ASP.NET application, the solicitation
and confirmation data are given off to the application. ASP.NET gives the two extra sorts of
verification depicted in the accompanying table.
Web Service:
Web administrations are ostensibly the most energizing and improve elements of
Microsoft's. NET activity and they are liable to significantly influence the way business
collaborate utilizing PC application. Rundown of conceivable Web administrations is as
changes as the rundown of conceivable business opportunities. Web administration would
normally perform a center business administration, for example, client confirmation, Visa
approval, valuing a derivates security, submitting a buy request for a stock or estimating a
same-day shipment.
A web administration is a part that performs a capacity or administration. A segment is
a bit of programming that has a very much characterized interface, shrouded internals, and the
ability of being found. By "found" implies that you can figure out what the part' manages
without expecting to see the code inside of it. A segment is like a strategy since we can call it
with contentions that fit an arrangement of parameters, and it has the ability of returning
results.
A web administration might likewise return data to the guest. This administration
dwells some place on the Web and can be gotten to from different areas on the Web. For this
administration to be called, there are various components that must be set up. To start with,
the guest must' know how to call the administration. Second, the call must be made over the
Web. At long last, the “web administration must know how to react”.

13
SQL Server 8.0
Social database frameworks are the most critical database frameworks utilized as a part of the
product business today. A standout amongst the most remarkable frameworks is Microsoft
SQL Server. SQL Server is a database administration framework created and showcased by
Microsoft. It runs solely under Windows NT and Windows 95/98.

➢ The most critical parts of SQL Server 8 are:

• SQL Server is anything but difficult to utilize.

• SQL Server scales from a portable tablet to symmetric multiprocessor frameworks.

• SQL Server gives information warehousing elements that as of recently have just been
accessible in Oracle and other more costly DBMSs.

A database framework is a general gathering of distinctive database programming segments


and databases containing the parts viz. Database application projects, Front-End segments,
Database administration frameworks, and Databases.
➢ A database framework must give the accompanying elements:

• A mixture of client interfaces

• Physical information autonomy

• Logical information autonomy

• Query advancement

• Data honesty

• Concurrency control

• Backup and recuperation

• Security and approval

SQL Server is a Relational Database Management System. The SQL Server social
dialect is called Transact-SQL.SQL is resource arranged dialect. This implies that SQL can
inquiry numerous lines from one or more tables utilizing only one announcement. This
component permits the utilization of this dialect at a coherently larger amount than procedural

14
dialects. Another vital property of SQL is its non-procedurally. SQL contains two sub dialects
DDL and DML.
SQL Server functions as a characteristic augmentation of Windows NT and windows
95/98.SQL Server is generally simple to oversee through the utilization of a graphical
registering environment for each undertaking of framework and database organization. SQL
Server uses administrations of Windows NT to offer new or expanded database capacities, for
example, sending and accepting messages and overseeing login security.
The SQL Server chairman's essential device for connecting with the framework is
Enterprise Manager. The Enterprise Manager has two primary purposes: Administration of
the database server and Management of database items.
• SQL Server Query Analyzer gives a graphical presentation of the execution
arrangement of a question and a programmed segment that recommends which list ought to
be utilized for a chose inquiry. This intelligent segment of SQL Server performs the
assignments like:

• Generating and executing Transact-SQL explanations

• Putting away the produced Transact-SQL explanations in a document

• Analyzing execution gets ready for produced inquiries

• Graphically representing the execution arrangement for a chose question.

A put away method is an exceptional sort of clump written in Transact-SQL utilizing


the SQL dialect and SQL augmentations. It is saved money on the database server to enhance
the execution and consistency of monotonous undertakings. SQL Server backings put away
methods and framework techniques. Put away techniques can be utilized for the
accompanying purposes: to control access approval, to make a review trial of exercises in
database tables, to discrete information definition & information control articulations
concerning a database & every single comparing application.
The database article perspective can be utilized for:
• Restricting the utilization of specific sections and lines of tables - that is to control
access to a specific piece of one or more tables,

• To shroud the points of interest of confounded inquiries, to limit embedded &


redesigned qualities to certain extents.

15
The Query Optimizer is the piece of SQL Server that chooses how to best perform a question.
It creates a few inquiry execution gets ready for the given question & chooses the arrangement
with the most minimal expense.
SQL Server can work in one of two security modes:
• Windows NT

• Mixed

Windows NT security mode solely utilizes Windows NT client records to sign into the
SQL Server framework. Blended mode permits clients to associate with SQL Server utilizing
the Windows NT security framework or the SQL Server framework. Moreover it gives three
security offices to controlling access to database objects:
• Transact-SQL explanations GRANT, DENY, and REVOKE.

• Views.

• Stored methodology

A Windows NT client record or a SQL server login name permits a client to sign into
the SQL server framework. A client who hence needs to get to a database of the framework
needs a database client record to work in the DB. In this manner clients must have a DB client
represent each DB they need to utilize. In the event that there is no such record the client may
be permitted to work in the DB under the visitor account."
Put away methods can likewise be utilized to limit information access. The confinement
of information access utilizing put away methodology is based upon the property that the
consent to execute a put away' strategy is free of any authorization for DB objects that are
referenced by the put away system.
SQL server gives an instrument called a trigger for upholding procedural respectability
requirements.
A DBMS Handles 2 Sorts Of Honesty Requirements:
➢ Declarative Integrity limitations characterized utilizing CREATE& ALTER
TABLE articulations.

➢ Procedural honesty requirements took care of by triggers.

A trigger is an instrument that is conjured when a specific activity happens on a specific table.
Every trigger has 3 general parts:

16
• A name

• The activity

• The execution

SQL server keeps record of every change it makes to the db amid an exchange. This is
essential in the event that a lapse happens amid the execution of the exchange. For this
situation all already executed explanations inside of the exchange must be moved back. SQL
server keeps every one of these records, specifically the previously, then after the fact values,
in one or more documents called the exchange log. Each DB of the SQL server framework
has its own particular exchange log. Concurrency in multi-client frameworks, for example,
SQL Server has chosen impact of execution. At the point when access to the information is
taken care of such that stand out project at once can utilize the information, preparing
moderates significantly. SQL Server like all different DBMSs takes care of this issue utilizing
exchanges. All announcements inside an exchange manufacture a nuclear unit. This implies
that either all announcements are executed or for the situation of disappointment, all
announcements are wiped out.
Elements of SQL Server
Microsoft SQL Server bolsters a full arrangement of elements that outcome in the
accompanying. SQL incorporates an arrangement of managerial and advancement instruments
that enhance our capacity to introduce, convey, oversee and use SQL Server over a few
locales.
➢ Adaptability

The same database motor can be utilized crosswise over stages going from smart phones
Microsoft Windows95 to substantial; multiprocessor servers running Microsoft Windows NT,
Enterprise Edition.
➢ Ease In Building Information Distribution Centers

SQL Server incorporates instruments for removing and examining synopsis


information for online investigative preparing (OLAP). SQL Server likewise incorporates
apparatuses for outwardly planning databases and breaking down information utilizing
English based inquiries.
SQL API (SQL Application Programming Interface)

17
Implanted SQL applications utilize the DB-library DLL to get to SQL server. The SQL
Server ODBC driver clients don't get to Microsoft SQL Server straightforwardly. They utilize
an application kept in touch with access the information in SQL Server. SQL Server can
likewise be gotten to through COM, Microsoft ActiveX, or Windows DNA (Windows
Distributed Internet Applications Architecture) parts. Applications are composed to get to
SQL Server through a database Application Programming Interface (API).
Web Clients:
A Web customer comprises of two sections:
• Dynamic Web pages containing different sorts of markup dialect which are created by
Web parts running in the Web level.

• Web program, which renders the pages got from the server.

A Web customer is now and again called a slim customer. Slim customers as a rule don't
question databases, execute complex business guidelines, or associate with legacy
applications.
HTML
HTML remains for Hyper Text Markup Language. It is a basic content designing dialect
used to make hypertext records. It is a stage free dialect not at all like most other programming
dialect. HTML is impartial and can be utilized on numerous stage or desktop. It is this
component of HTML that makes it mainstream as standard on the WWW. This adaptable
dialect permits the making of hypertext connections, otherwise called hyperlinks. These
hyperlinks can be utilized to unite reports on diverse machine, on the same system or on an
alternate system, or can even indicate purpose of content in the same record.
HTML is utilized for making archives where the accentuation is on the presence of the
record. It is likewise utilized for DTP. The records made utilizing HTML can have content
with diverse sizes, weights and hues. It can also contain graphics to make the document more effective.

18
3.DATABASE DESIGN
3.1 DATA DICTIONARY

FIELD NAME TYPE DESCRIPTION SAMPLE VALUES


Range nvarchar(50) Describe the range Healthyweight
Exercise nvarchar(MAX) Describe the exercise Yoga
FoodTime nvarchar(50) Describe the food time Breakfast
FoodName nvarchar(50) Describe the food name Checken
Calorie nvarchar(50) Describe the calorie 300
Name nvarchar(50) Describe the name Qwe
Fname nvarchar(50) Describe the father name Asd
Gender nvarchar(50) Describe the gender Male
Dob nvarchar(50) Describe the dob 12-1-99
Age nvarchar(50) Describe the age 18
Mobile nvarchar(50) Describe the mobile 9876543210
Email nvarchar(50) Describe the email qwe@gmail.com
Address nvarchar(50) Describe the address Salem
education nvarchar(50) Describe the education Bsc
userNAme nvarchar(50) Describe the username Kkkkk
PAssword nvarchar(50) Describe the password Qwe
NuutriName nvarchar(50) Nutrition name Sangavi
Qurery nvarchar(MAX) Describe the query Reduce belly
Answer nvarchar(MAX) Describe the answer 3 hour workout

19
3.2 TABLES DESIGN
A table is a data structure that organizes information into rows and columns. It can be
used to both store and display data in a structured format. For example, databases store data in
tables so that information can be quickly accessed from specific rows. Websites often use
tables to display multiple rows of data on page. Spreadsheets combine both purposes of a table
by storing and displaying data in a structured format.

Databases often contain multiple tables, with each one designed for a specific purpose.
For example, a company database may contain separate tables for employees, clients, and
suppliers. Each table may include its own set of fields, based on what data the table needs to
store. In database tables, each field is considered a column, while each entry (or record), is
considered a row. A specific value can be accessed from the table by requesting data from an
individual column and row.

Table Name: Exercise Table


Field Type Constraints
Range nvarchar(50) Checked
Exercise nvarchar(MAX) Checked

Table Name: Food Table


Field Type Constraints
FoodTime nvarchar(50) Checked
Range nvarchar(50) Checked
FoodName nvarchar(50) Checked
Calorie nvarchar(50) Checked

Table Name: Nutrition Table


Field Type Constraints
Name nvarchar(50) Checked
Fname nvarchar(50) Checked
Gender nvarchar(50) Checked
Dob nvarchar(50) Checked

20
Age nvarchar(50) Checked
Mobile nvarchar(50) Checked
Email nvarchar(50) Checked
Address nvarchar(50) Checked
Education nvarchar(50) Checked
Username nvarchar(50) Checked
Password nvarchar(50) Checked

Table Name: Query Table


Field Type Constraints
uUserName nvarchar(50) Checked
NuutriName nvarchar(50) Checked
Qurery nvarchar(MAX) Checked
Answer nvarchar(MAX) Checked

Table Name: Register Table


Field Type Constraints
Name nvarchar(50) Checked
FNAme nvarchar(50) Checked
Gender nvarchar(50) Checked
Dob nvarchar(50) Checked
Age nvarchar(50) Checked
Mobile nvarchar(50) Checked
Email nvarchar(50) Checked
Address nvarchar(50) Checked
username nvarchar(50) Checked
Password nvarchar(50) Checked

21
3.3 RELATIONSHIP DIAGRAM

Mobile Number Age

Email Id DOB

Address Gende
r
User Name Father
Name
Password
Name
New User

User
name
Upda Admin
te
Passwor
d
Food Nutrition
Information
Registration

Nam C_passwo
Food rd
Time
Father Name
Passwor
Range
Calori Gender User
es

Food DOB Address


Name Image

Age Email id

Mobile
Number

4.PROGRAM DESIGN

22
4.1MODULES

Admin
• Login
• Add Diet Food and Exercise
User
• Register
• Login
• Diet Details
• Query
Nutrition
• Register
• Login
• Response

4.2 MODULES DESCRIPTION


Admin Module
• Login
Admin has to login before he/she can access the admin dashboard. The admin can view
all the users and can search for a particular user using name or user ID. Any new
features can be added the admin dashboard upon request
• Add Diet Food and Exercise
In this module admin can add the diet food details and exercise according to their BMI
calculation .BMI was calculated by user height and weight.
User Module
• Enrollment
The user has to login before he/she can access the Dietitian System. New users have to
register themselves first. Once the users have logged in they have to provide their height
and weight. Once a user provides his/her height and weight, the system calculates body
mass index.

23
• Diet Details
In this module user can view the diet food details and exercise according to their BMI
calculation .BMI was calculated by user height and weight.
• Query
Those specializations are sorted out for the user as query-diet for posting query. The
corresponding nutrition will get the query in the inbox. In this module used to post the
doubts by user.
Nutrition
• Register
In this module, nutrition people register their details such as name, Education, address,
Phone no and mail id and so on. After that he get user name and password for enter
into the system.
• Login
Nutrition has to login before he/she can access the nutrition dashboard. The nutrition
can view all the users and can search for a particular user using name or user ID.
• Response
In this module used to answer the user query. Nutrition can view user details and their
query.

5. TESTING

Testing is a series of different tests that whose primary purpose is to fully exercise the computer
based system. Although each test has a different purpose, all work should verify that all system
24
element have been properly integrated and performed allocated function. Testing is the process
of checking whether the developed system works according to the actual requirement and
objectives of the system. The philosophy behind testing is to find the errors. A good test is one
that has a high probability of finding an undiscovered error. A successful test is one that
uncovers the undiscovered error. Test cases are devised with this purpose in mind. A test case
is a set of data that the system will process as an input.
5.1 UNIT TESTING

The first test in the development process is the unit test. The source code is normally divided
into modules, which in turn are divided into smaller units called units. These units have specific
behavior. The test done on these units of code is called unit test. Unit test depends upon the
language on which the project is developed. Unit tests ensure that each unique path of the
project performs accurately to the documented specifications and contains clearly defined
inputs and expected results. Functional and reliability testing in an Engineering environment.
Producing tests for the behavior of components (nodes and vertices) of a product to ensure their
correct behavior prior to system integration.

25
5.2INTEGRATION TESTING
Testing in which modules are combined and tested as a group. Modules are typically code
modules, individual applications, source and destination applications on a network, etc.
Integration Testing follows unit testing and precedes system testing. Testing after the product
is code complete. Betas are often widely distributed or even distributed to the public at large in
hopes that they will buy the final product when it is release.

26
5.3 VALIDATION TESTING
Valid and invalid data should be created and the program should be made to process this data
to catch errors. When the user of each module wants to enter into the page by the login page
using the use rid and password .If the user gives the wrong password or use rid then the
information is provided to the user like “you must enter user id and password”. Here the inputs

27
given by the user are validated. That is password validation, format of date are correct, textbox
validation. Changes that need to be done after result of this testing

CONCLUSION
“Food Recommendation System based on BMI” allows the user to know about his/her
actual diet information i.e. how much user had calories in their body on this basis system
displays workout and food suggestions. This software package is a strong enough to withstand
regressive facility for the Handicapped Peoples. This software reduces the time span and cost

28
for expert advices for diet. This site is exceptionally valuable to well being cares and dietician.
This product diminishes the time compass and cost for master advices for eating routine.

FUTURE ENHANCEMENTS
The future scope in this application is going to be the improved GUI of this application. A
proper workout schedule and routine will be provided to the user for a better fit life. Less use
of data base and conditioning algorithms and more use of Artificial Intelligence. This is a web
base application which can also be developed as an Android and IOS application.

REFERENCE

BOOK REFERENCE
• N.J. Belkin and W.B. Croft, “Information Filtering andInformation Retrieval: Two
Sides of the Same Coin?”Comm.
• P.J. Denning, “Electronic Junk,” Comm.
• Advanced .NET Remoting in VB.NET (Ingo Rammer, Apress, July 2002)

29
• ASP to ASP.NET Migration Handbook (Christian Nagel et al, Wrox, January 2003)
• Beginning Visual C# (Christian Nagel et al, Wrox, September 2001)
• Data-Centric .NET Programming (Christian Nagel et al, Wrox, December 2001)
• Professional .NET Network Programming 2nd Edition (Christian Nagel et al, Wrox,
September 2004)
• P.W. Foltz and S.T. Dumais, “Personalized InformationDelivery: An Analysis of
Information Filtering Methods,”Comm.
• P.S. Jacobs and L.F. Rau, “Scisor: Extracting Informationfrom On-Line News,
• S. Pollock, “A Rule-Based Message Filtering System,”ACM Trans. Office Information
Systems.

WEBSITE REFERENCE
• www.csharpcornar.com
• www. Microsoft.com/sql
• www.databasejournal.com
• www.microsoft.com/vcsharp

30
APPENDIX
SOURCE CODE
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

public partial class AddFood : System.Web.UI.Page


{

SqlConnection con = new SqlConnection(@"Data


Source=.\SQLEXPRESS;AttachDbFilename=|Datadirectory|\Artificaldb.mdf;Integrated
Security=True;User Instance=True");
SqlCommand cmd;

protected void Page_Load(object sender, EventArgs e)


{

}
protected void Button1_Click(object sender, EventArgs e)
{
cmd = new SqlCommand("insert into foodtb values('" + DropDownList2.Text + "','" +
DropDownList1.Text + "','" + TextBox1.Text + "','" + TextBox2.Text + "')", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
Response.Write("<Script> alert('Record Save!') </Script>");

}
protected void Button2_Click(object sender, EventArgs e)

31
{
TextBox1.Text = "";
TextBox2.Text = "";

}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

public partial class AddVide : System.Web.UI.Page


{

SqlConnection con = new SqlConnection(@"Data


Source=.\SQLEXPRESS;AttachDbFilename=|Datadirectory|\Artificaldb.mdf;Integrated
Security=True;User Instance=True");
SqlCommand cmd;

protected void Page_Load(object sender, EventArgs e)


{

}
protected void Button1_Click(object sender, EventArgs e)
{
cmd = new SqlCommand("insert into videotb values('" + DropDownList1.Text + "','" +
TextBox1.Text + "')", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
32
Response.Write("<Script> alert('Record Save!') </Script>");

}
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Text = "";

}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

public partial class AdminHome : System.Web.UI.Page


{

SqlConnection con = new SqlConnection(@"Data


Source=.\SQLEXPRESS;AttachDbFilename=|Datadirectory|\Artificaldb.mdf;Integrated
Security=True;User Instance=True");
SqlCommand cmd;

protected void Page_Load(object sender, EventArgs e)


{
cmd = new SqlCommand("select * from regtb", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
33
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class AdminLogin : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{
if (TextBox1.Text == "admin" & TextBox2.Text == "admin")
{

Response.Redirect("AdminHome.aspx");

}
else
{
Response.Write("<Script> alert('Password Incirrect!') </Script>");

}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
34
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

public partial class Answer : System.Web.UI.Page


{

SqlConnection con = new SqlConnection(@"Data


Source=.\SQLEXPRESS;AttachDbFilename=|Datadirectory|\Artificaldb.mdf;Integrated
Security=True;User Instance=True");
SqlCommand cmd;

protected void Page_Load(object sender, EventArgs e)


{
cmd = new SqlCommand("select * from Quertb where Answer ='' ", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
protected void Button1_Click(object sender, EventArgs e)
{
cmd = new SqlCommand("update Quertb set Answer='" + TextBox1.Text + "' where
id='" + GridView1.SelectedRow.Cells[1].Text + "'", con);

con.Open();
cmd.ExecuteNonQuery();
con.Close();
Response.Write("<Script> alert('Answer Send!') </Script>");

cmd = new SqlCommand("select * from Quertb where Answer ='' ", con);
35
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();

}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

public partial class BMICalculation : System.Web.UI.Page


{

protected void Page_Load(object sender, EventArgs e)


{

double a, b, c;

protected void Button1_Click(object sender, EventArgs e)


{

36
double meter = (Convert.ToDouble(TextBox3.Text) * 0.3048);
meter = meter * 2;
double bmi = (Convert.ToDouble(TextBox4.Text)) / meter;
if (bmi < 18.5)
Label4.Text = "Underweight";
else if (bmi >= 18.5 && bmi <= 24.9)
Label4.Text = "Healthyweight";
else if (bmi >= 25 && bmi <= 29.9)
Label4.Text = "Overweight";
else if (bmi >= 30)
Label4.Text = "Obese";

}
protected void Button3_Click(object sender, EventArgs e)
{
Session["typ"] = Label4.Text;

Response.Redirect("VideoPlay.aspx");

}
protected void Button4_Click(object sender, EventArgs e)
{
Session["typ"] = Label4.Text;

Response.Redirect("UserFoodInfo.aspx");
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
37
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;

public partial class NewNutrition : System.Web.UI.Page


{
SqlConnection con = new SqlConnection(@"Data
Source=.\SQLEXPRESS;AttachDbFilename=|Datadirectory|\Artificaldb.mdf;Integrated
Security=True;User Instance=True");
SqlCommand cmd;

protected void Page_Load(object sender, EventArgs e)


{

}
protected void Button1_Click(object sender, EventArgs e)
{
cmd = new SqlCommand("insert into nutritb values('" + TextBox1.Text + "','" +
TextBox2.Text + "','" + RadioButtonList1.Text + "','" + TextBox3.Text + "','" +
TextBox4.Text + "','" + TextBox5.Text + "','" + TextBox6.Text + "','" + TextBox7.Text
+ "','" + TextBox8.Text + "','" + TextBox9.Text + "')", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
Response.Write("<Script> alert('Record Save') </Script>");

}
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Text = "";
TextBox2.Text = "";
TextBox3.Text = "";
TextBox4.Text = "";
TextBox5.Text = "";
38
TextBox6.Text = "";
TextBox7.Text = "";
TextBox8.Text = "";
TextBox9.Text = "";

}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

public partial class NewUser : System.Web.UI.Page


{

SqlConnection con = new SqlConnection(@"Data


Source=.\SQLEXPRESS;AttachDbFilename=|Datadirectory|\Artificaldb.mdf;Integrated
Security=True;User Instance=True");
SqlCommand cmd;

protected void Page_Load(object sender, EventArgs e)


{

}
protected void Button1_Click(object sender, EventArgs e)
{
cmd = new SqlCommand("insert into regtb values('" + TextBox1.Text + "','" +
TextBox2.Text + "','" + RadioButtonList1.Text + "','" + TextBox3.Text + "','" +
TextBox4.Text + "','" + TextBox5.Text + "','" + TextBox6.Text + "','" + TextBox7.Text
+ "','" + TextBox8.Text + "')", con);
39
con.Open();
cmd.ExecuteNonQuery();
con.Close();
Response.Write("<Script> alert('Record Save') </Script>");

}
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Text = "";
TextBox2.Text = "";
TextBox3.Text = "";
TextBox4.Text = "";
TextBox5.Text = "";
TextBox6.Text = "";
TextBox7.Text = "";
TextBox8.Text = "";
TextBox9.Text = "";

}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

public partial class Ntriinfo : System.Web.UI.Page


{
SqlConnection con = new SqlConnection(@"Data
Source=.\SQLEXPRESS;AttachDbFilename=|Datadirectory|\Artificaldb.mdf;Integrated
Security=True;User Instance=True");
40
SqlCommand cmd;

protected void Page_Load(object sender, EventArgs e)


{
cmd = new SqlCommand("select * from regtb", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();

}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

public partial class NutriHome : System.Web.UI.Page


{
SqlConnection con = new SqlConnection(@"Data
Source=.\SQLEXPRESS;AttachDbFilename=|Datadirectory|\Artificaldb.mdf;Integrated
Security=True;User Instance=True");
SqlCommand cmd;

protected void Page_Load(object sender, EventArgs e)


{
cmd = new SqlCommand("select * from nutritb where username='" +
Session["name"].ToString() + "'", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
41
DataTable dt = new DataTable();
da.Fill(dt);
DetailsView1.DataSource = dt;
DetailsView1.DataBind();

}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

public partial class nutriQues : System.Web.UI.Page


{

SqlConnection con = new SqlConnection(@"Data


Source=.\SQLEXPRESS;AttachDbFilename=|Datadirectory|\Artificaldb.mdf;Integrated
Security=True;User Instance=True");
SqlCommand cmd;

protected void Page_Load(object sender, EventArgs e)


{

cmd = new SqlCommand("select * from Quertb where UserName='" +


Session["uname"].ToString() + "' and Answer !='' ", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
42
GridView1.DataSource = dt;
GridView1.DataBind();

}
protected void Button1_Click(object sender, EventArgs e)
{
cmd = new SqlCommand("insert into Quertb values('" + Session["uname"].ToString() +
"','" + TextBox1.Text + "','') ", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
Response.Write("<Script> alert('Query Send!') </Script>");

}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;

public partial class NutritionLogin : System.Web.UI.Page


{

SqlConnection con = new SqlConnection(@"Data


Source=.\SQLEXPRESS;AttachDbFilename=|Datadirectory|\Artificaldb.mdf;Integrated
Security=True;User Instance=True");
SqlCommand cmd;

protected void Page_Load(object sender, EventArgs e)


{

43
}
protected void Button1_Click(object sender, EventArgs e)
{
con.Open();
cmd = new SqlCommand("select * from nutritb where Username='" + TextBox1.Text +
"' and Password='" + TextBox2.Text + "'", con);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
Session["name"] = TextBox1.Text;
Response.Redirect("NutriHome.aspx");

}
else
{

Response.Write("<Script> alert('Password Mismatch') </script>");

}
con.Close();

}
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Text = "";
TextBox2.Text = "";

}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
44
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

public partial class UserFoodInfo : System.Web.UI.Page


{

SqlConnection con = new SqlConnection(@"Data


Source=.\SQLEXPRESS;AttachDbFilename=|Datadirectory|\Artificaldb.mdf;Integrated
Security=True;User Instance=True");
SqlCommand cmd;

protected void Page_Load(object sender, EventArgs e)


{
cmd = new SqlCommand("select * from foodtb where Type ='" +
Session["typ"].ToString() + "' and Time='Breakfast' ", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();

cmd = new SqlCommand("select * from foodtb where Type ='" +


Session["typ"].ToString() + "' and Time='Lunch' ", con);
SqlDataAdapter da1 = new SqlDataAdapter(cmd);
DataTable dt1 = new DataTable();
da1.Fill(dt1);
GridView2.DataSource = dt1;
GridView2.DataBind();

cmd = new SqlCommand("select * from foodtb where Type ='" +


Session["typ"].ToString() + "' and Time='Dinner' ", con);
SqlDataAdapter da2 = new SqlDataAdapter(cmd);
45
DataTable dt2 = new DataTable();
da2.Fill(dt2);
GridView3.DataSource = dt2;
GridView3.DataBind();

}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

public partial class UserHome : System.Web.UI.Page


{

SqlConnection con = new SqlConnection(@"Data


Source=.\SQLEXPRESS;AttachDbFilename=|Datadirectory|\Artificaldb.mdf;Integrated
Security=True;User Instance=True");
SqlCommand cmd;

protected void Page_Load(object sender, EventArgs e)


{
cmd = new SqlCommand("select * from regtb where username='"+Session
["uname"]+"'", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
DetailsView1.DataSource = dt;
DetailsView1.DataBind();

46
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;

public partial class UserLogin : System.Web.UI.Page


{
SqlConnection con = new SqlConnection(@"Data
Source=.\SQLEXPRESS;AttachDbFilename=|Datadirectory|\Artificaldb.mdf;Integrated
Security=True;User Instance=True");
SqlCommand cmd;

protected void Page_Load(object sender, EventArgs e)


{

}
protected void Button1_Click(object sender, EventArgs e)
{
con.Open();
cmd = new SqlCommand("select * from regtb where Username='" + TextBox1.Text + "'
and Password='" + TextBox2.Text + "'", con);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
Session["uname"] = TextBox1.Text;

Response.Redirect("UserHome.aspx");

47
}
else
{

Response.Write("<Script> alert('Password Mismatch') </script>");

}
con.Close();

}
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Text = "";
TextBox2.Text = "";

}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("NewUser.aspx");
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data;
using System.Data.SqlClient;

public partial class VideoPlay : System.Web.UI.Page


{
48
SqlConnection con = new SqlConnection(@"Data
Source=.\SQLEXPRESS;AttachDbFilename=|Datadirectory|\Artificaldb.mdf;Integrated
Security=True;User Instance=True");
SqlCommand cmd;

protected void Page_Load(object sender, EventArgs e)


{

cmd = new SqlCommand("select * from Videotb where Type ='" +


Session["typ"].ToString() + "'", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();

// ((HtmlControl)(form1.FindControl("ifrm"))).Attributes["src"] =
dr["MobileVideo"].ToString();
}
protected void Button1_Click(object sender, EventArgs e)
{

((HtmlControl)(form1.FindControl("ifrm"))).Attributes["src"] =
GridView1.SelectedRow.Cells[3].Text.ToString();

}
}

49
OUTPUT SCREENING
SCREEN SHOTS

50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65

You might also like