Professional Documents
Culture Documents
BLOGGERS’ STOP
Developed By
Suprakas Sasmal
BCA
Roll No-821159064
Project Title
“Bloggers’ Stop”
ABSTRACT
A blog (a blend of the term web log) is a type of website or part of a
website. Blogs are usually maintained by an individual with regular
entries of commentary, descriptions of events, or other material such as
graphics or video. Entries are commonly displayed in reverse-
chronological order. Blog can also be used as a verb, meaning to
maintain or add content to a blog.
Last but not the least we would like to thank the entire Punjub Technical University
(PTU) for allowing us to proceed with the project.
--------------------------
Signature of the candidate
1. Introduction
07. Coding
10. Bibliography
1.INTRODUCTION
INTRODUCTION
Users will be able to write and share comment of a blog and also view other’s
blog .User can also share their photos, document and delete their
blogs/comments.
1.2 Survey
So, we thought of developing a web based application which would provide the
users all these packages from his terminal only as well as help them in writing
and view blogs. The Application was to be divided into two parts namely the
user part, and the administrator part. And each of these has their
corresponding features.
BLGGERS STOP” developed using ASP.NET with VB.NET as the backend in the
.NET Framework.
1.3 Analysis
Administration login
In admin mode the administrator can make changes the user
authentication status.
He can block a user to singing to the website and also has the
authority to allow login
He can so the all comments and blogs writing by various user.
A. Introduction
A.1 Purpose
A.2 Scope
A.3 Reference
B. General Description
A. Introduction
Software Requirement Specification (SRS) as a guide to the blogger to
describe accurately what the user wishes to obtain from the blog website. It
just exactly defines the software requirements and not the means of
obtaining the results.
A.1 Purpose: With the advent of the Twenty-first century the world
seems to have grown a lot smaller in context to data transfer and
communication; and one of the factors responsible for this growing trend is
"The Internet"!!
Social Networking Sites have taken the world by a storm, with millions of
people logging on these sites as an effective means of viable communication
and networking.
4. The web server sends a response to the web browser. HTTP protocol is
used to send the HTTP response to the web browser.
5. The web browser processes the response to the, displaying the web page.
6. The user enters data and performs an action, such as clicking a submit
button that causes the data to be send back to the web server.
9. The web server sends the response back to the web browser
10. HTTP is used to send the HTTP response to the web browse
11. The web browser processes the response to the web browser.
internet
Response
Request
Client(browser)
DATABASE
SERVER
ODBC
The web browser: - the browser is the vital component that provides an
interface between the user and the web server. The user sends a request
through the browser to the web server .when the web server return HTML page;
the browser displays it for the user.
The web server: - The web server bears the responsibility of servicing client
browser .a web server processes scripts and sends the resulting HTML page to
the client browser that requested it .the server-side script may be stand-alone
application or embedded in active server page. Web server can do more. They
can provide connections to other server-side components and expose
information stored on other server. These may be database server, mail and
news server. The web server also support client-side scripting .that means, we
can write code that can be executed by the browser .for example, when you
accept input from the user, and it can be validated at the client end before sent
to the server
Client and server authentication:- The identity and validity of the web server
and web browser can be ensure through the use of digital certificates that are
maintained by the certificate server .this authentication ensure that only
authorized user are allowed to access a web site or an application.
Planning the web application: - This is the stage where the functionality of the
application is planned. You identity the audience of the application and where
it will be deployed. User may access the application through the corporate
internet, the internet, or even an external. This will help us specify the purpose
of the application .once the purpose is identified; you can define the content of
the application. The last step is identifying the resource for developing the
application.
Designing the application:-This is the phase where you create the prototype of
the application .Here, you plan the structure of the application and also define
the navigational scheme for the application .you also plan the theme and
layout of the application .you can identify the HTML or ASP pages that will
comprise the application .you can determine whether to include client-side
script, server-side scripts, or both.
Constructing and testing the components of the application:- This is the phase
where you begin to create the component of the application .they may be
protocol provides the binding that connect this entire computer together.
NOTE:-A protocol is a set of rules that two or more computer use to share data
with each other.
Data base server: - Most application involves the use of data. The
application is required to store, retrieve and maintain data in database. Web
applications are no different. Typically, the user is allowed to search through
the database of product and service being offered. This is where a database
server steps in. a database is used to store data in database. User can access
the data and manipulate it. A web application can provide the user with the
interface to the database .for example, user can browser through the catalogue
of an online
HTML pages, ASP document, Activex component, and so on .here, you debug
the error that may occur as the application is being developed and tested.
Going live:-This is the next phase of the application development cycle .after
the various components of the application have been developed and tested ,it is
time to deploy the application on the web server .users now have access to the
application.
Idea
Planning Phase
Function specification
NO
complete?
YES
Design Phase
No Design complete?
NO
Complete?
Introduction to scripting
In its early days, HTML was developed in document format that could be used
to exchange information over the internet. the transfer of data was meant to be
platform independent .soon however ,the focus shift from academic and
scientific circle to that of the everyday user ,who now viewed the internet as a
source of information ,and entertainment .web page became more creative and
colourful in order to appeal to the ‘common‘ user. However the underlying style
and content of the page remained fixed .Developers had little or no control over
a web page once it was displayed.
Server-based scripts
Client-based scripts
Scripting is a method that can be used to create dynamic HTML pages and
provide user interaction. Initially, server-based scripts were used to provide
user interaction. Data from the client machine would be sent to the web server.
Server-based scripts would process the request and send the required page to
the client browser .with several users making simultaneous request, over a
period of time the web server would definitely get overload.
Data
Web client:
Web server: CGI Browser
Scripts Processin
Soon, the need for client side processing was felt. In client side processing, the
host browser support the use of scripts, which can be embedded in the HTML
document .the browser interprets and executes the code embedded in the page
illustrates the use of client side scripts.
Data
Web client:
browser
Web
server:CGI Processin Processing JavaScript
scripts vbScript
As a developer ,you can include scripts that change the content or style of a
web page in response to user input .If the application is data base oriented
,you can create scripts to validate the data entered by the user before it is sent
to the server for processing .For example ,you could write client side script to
verify if the user has entered data in all the required fields before the form is
submitted to the server for processing .there is no point in sending data to the
server only to find that the user has not entered his first name ,if it is required.
Client-side scripting: - In client –side scripting, the scripts are embedded in
the HTML document. The host browser internets and executes the code when
the page is display. You can use client –side scripts to:
Data Valid?
Yes
Meaning: Are there sufficient benefits in creating the system to make the
costs acceptable? Or Are the costs of not creating the system so great that it is
advisable to undertake the project.
This will include three major costs as described below:-
Cost of Hardware and Software
Cost of software to be acquired to build and run the product is a
onetime cost.
Buying a back end database is the major part of hardware and software cost.
Comparison between the Oracle database high cost and better features with
the My SQL server low cost and better support for the same vendor operating
system make this decision need oriented.
Benefits in reduced cost, error and Savings will be made by reduction of
present system expenses, time saving and increased accuracy.
The proposed system is economically feasible because the cost involved in
purchasing that hardware and the software are within approachable.
The personal cost like salaries of employees hired are also nominal, because
working in this system need not required a highly qualified professional .The
operating –environment costs are marginal .The less time involved also helped
in its economical feasibility.
Cost Avoidance: Future cost reduction in form of reduction in the number
of administrative staff needed and manual records maintains in organization.
Rise in cost will be avoided.
3.2.1 Technical Feasibility:
Meaning: Can the work for the project be done with current equipment
existing software technology and available personnel? If new technology is
needed, what is the likelihood that it can be developed?
Reply: In this project the work cannot be done by the current system
because currently all the records, filling, transactions, entries, are done by
manuals. It is really time consuming and margin of error is more.
Yes, the current available personnel can develop this system but special
training should be given to those personnel to improve their skills. Yes new
technology or software, which is currently working in the market, is to be
needed to develop this system. It can be developed easily with this software and
for a long term it is working effectively and margin of error is less.
To run this product the following technological consideration has to be kept
in mind by the Company.
MS Access Database as back-end is a good DBMS software with long-
standing track record in industry for the good technical aspect, extensibility,
concurrency and support needed for this purpose.
Sql Server and Windows Operating system are used while making this
product. Language such as JAVA is also used while making this project.
Hardware’s used in this project are –p3 processors 733 MHz, 64 MB
RAM, 10 GB hard disk. These hardware were already available on the existing
computer system. The software like MS-ACCESS, MS-WORD and operating
system used were already installed on the existing. So no additional hardware
and software were required to purchase and it is technically feasible.
Requirements
Design
Implementation
Testing
Maintenance
Progress flows from the top to the bottom, like a waterfall. The waterfall
development model has its origins in the manufacturing and construction
industries; highly structured physical environments in which after-the-fact
changes are prohibitively costly, if not impossible. Since no formal software
development methodologies existed at the time, this hardware-oriented model
was simply adapted for software development.
The problem is specified along with the desired service objectives (goals)
The constraints are identified
All the program units are integrated and tested to ensure that the complete
system meets the software requirements. After this stage the software is
delivered to the customer [Deliverable – The software product is delivered to the
client for acceptance testing.]
The usually the longest stage of the software. In this phase the software is
updated to:
Meet the changing customer needs.
Adapted to accommodate changes in the external environment
Correct errors and oversights previously undetected in the testing
phases.
Enhancing the efficiency of the software.
4.2 Implementation
4.2.1 Platform Used
Language Independence
The .NET Framework introduces a Common Type System, or CTS. The
CTS specification defines all possible data
types and programming constructs supported by the CLR and how they
may or may not interact with each other conforming to the Common
Language Infrastructure (CLI) specification. Because of this feature,
the .NET Framework supports the exchange of types and object
instances between libraries and applications written using any
conforming .NET language.
Base Class Library
The Base Class Library (BCL), part of the Framework Class Library (FCL),
is a library of functionality available to all languages using the .NET
Framework. The BCL provides classes which encapsulate a number of
common functions, including file reading and writing, graphic
rendering, database interaction, XML document manipulation and so on.
Simplified Deployment
The .NET Framework includes design features and tools that help
manage the installation of computer software to ensure that it does not
interfere with previously installed software, and that it conforms to
security requirements.
Security
The design is meant to address some of the vulnerabilities, such
as buffer overflows, that have been exploited by malicious software.
Additionally, .NET provides a common security model for all applications.
Portability
The design of the .NET Framework allows it theoretically to be platform
agnostic, and thus cross-platform compatible. That is, a program written
to use the framework should run without change on any type of system
for which the framework is implemented. While Microsoft has never
implemented the full framework on any system except Microsoft
Windows, the framework is engineered to be platform agnostic, and
cross-platform implementations are available for other operating systems
(see Silver light and the Alternative implementations section below).
Microsoft submitted the specifications for the Common Language
Infrastructure (which includes the core class libraries, Common Type
System, and the Common Intermediate Language), the C# language, and
the C++/CLI language to both ECMA and the ISO, making them available
as open standards. This makes it possible for third parties to create
compatible implementations of the framework and its languages on other
platforms.
Architecture
Common Language Infrastructure (CLI)
The purpose of the Common Language Infrastructure (CLI), is to provide
a language-neutral platform for application development and execution,
including functions for Exception handling, Garbage Collection, security,
and interoperability. By implementing the core aspects of the .NET
Framework within the scope of the CLI, this functionality will not be tied
to a single language but will be available across the many languages
supported by the framework. Microsoft's implementation of the CLI is
called the Common Language Runtime or CLR.
Assemblies
The CIL code is housed in .NET assemblies. As mandated by
specification, assemblies are stored in the Portable Executable (PE)
format, common on the Windows platform for all DLL and EXE files. The
assembly consists of one or more files, one of which must contain the
manifest, which has the metadata for the assembly. The complete name
of an assembly (not to be confused with the filename on disk) contains its
simple text name, version number, culture, and public key token. The
public key token is a unique hash generated when the assembly is
compiled, thus two assemblies with the same public key token are
guaranteed to be identical from the point of view of the framework. A
private key can also be specified known only to the creator of the
assembly and can be used for strong naming and to guarantee that the
assembly is from the same author when a new version of the assembly is
compiled (required to add an assembly to the Global Assembly Cache).
Metadata
All CIL is self-describing through .NET metadata. The CLR checks the
metadata to ensure that the correct method is called. Metadata is
usually generated by language compilers but developers can create their
own metadata through custom attributes. Metadata contains information
about the assembly, and is also used to implement the reflective
programming capabilities of .NET Framework.
Security
.NET has its own security mechanism with two general features: Code Access
Security (CAS), and validation and verification. Code Access Security is based
on evidence that is associated with a specific assembly. Typically the evidence
is the source of the assembly (whether it is installed on the local machine or
has been downloaded from the intranet or Internet). Code Access Security uses
evidence to determine the permissions granted to the code. Other code can
demand that calling
code is granted a specified permission. The demand causes the CLR to perform
a call stack walk: every assembly of each method in the call stack is checked
for the required permission; if any assembly is not granted the permission a
security exception is thrown.
Class library
The .NET Framework includes a set of standard class libraries. The class
library is organized in a hierarchy of namespaces. Most of the built in
APIs are part of either System.* or Microsoft.* namespaces. These class
libraries implement a large number of common functions, such as file
reading and writing, graphic rendering, database interaction, and XML
document manipulation, among others. The .NET class libraries are
available to all CLI compliant languages. The .NET Framework class
library is divided into two parts: the Base Class Library and the
Framework Class Library.
Memory management
The .NET Framework CLR frees the developer from the burden of
managing memory (allocating and freeing up when done); instead it does
the memory management itself. To this end, the memory allocated to
instantiations of .NET types (objects) is done contiguously from the
managed heap, a pool of memory managed by the CLR. As long as there
exists a reference to an object, which might be either a direct reference to
an object or via a graph of objects, the object is considered to be in use
by the CLR. When there is no reference to an object, and it cannot be
reached or used, it becomes garbage. However, it still holds on to the
memory allocated to it. .NET Framework includes a garbage
collector which runs periodically, on a separate thread from the
application's thread, that enumerates all the unusable objects and
reclaims the memory allocated to them.
Versions
Advantage of ASP.NET
ASP.NET supports strongly typed languages like VB, c#, and much
more.
ASP.NET pages get compiled instead of being interpreted, thus
their execution speed is faster than ASP pages.
ASP.NET pages are tidier than ASP pages. The code can be
separated from the HTML design and text. Thus, programmers can
work separately from the designers.
ASP.NET provides server controls that are declarative. You just
have to declare them and you can use them. Thus, the number of
lines of code to be written is reused.
ASP.NET supports re-use of code by the mechanism of inheritance.
For example, you can inherit c# classes and use them to provide
the required functionality.
ASP.NET has an inbuilt method called Trace, which helps you in
debugging a page. You can either display the trace information at
the end of the page or re-direct it to another location to check later.
Features of ASP.NET
ASP.NET can recognize the type of browser the client is using and
accordingly display the content to the client. For example, if the
client uses an up level browser (i.e.> 4.0 version), then the
validation is performed on the client –side and on the server-side.
However, if the client is using a down-level browser, then the
validation is performed only on the server-side.
ASP.NET improves performance by using server-side caching. It
allows you to cache the entire output of a page for re-use by other
clients.
ASP.NET functionality can be coded using different languages like
C# or VB.NET. However, only one language can be used for coding
in a single page.
ASP.NET ships with many built –in server controls that have the
common required functionalities. For example, the developer need
not create a control for accepting data; the textbox control is
provided for this purpose. Thus, the developers need not to recreate
these controls to obtain the required functionality.
A web service can be described as a function that can be deployed
over the web and can be called by any application or other services.
It can be a business application or a system function. ASP.NET
allows you to create such web services.
Introduction to C# language
When one class inherits from a second class, the inherited class
automatically includes all the non private methods and properties
of its parent class. In other words, what’s true of the parent is true
of the child, but not the other way around.
Inheritance is used throughout the .NET Framework. For example,
every ASP.NET page inherits from the base System.Web.UI.Page
class. The only reason that you can use properties such as the
IsPostback property in an ASP.NET page is that the page derives
from the base Page class.
All classes in the. NET Framework derives from the base System
.Object class. The Object Class is the great- grand mother of every
other class. This means that any methods or properties of the
Object class, such as the ToString() method, are shared by all
classes in the Framework.
Using Access Modifiers
C# supports the following access modifiers, which you can use when
declaring a class, method, or property:
Public—a public class, method, or property has no access
restrictions.
Protected—a protected method or property can be accessed only
within the class itself or a derived class.
Internal—An internal class, method, or property can be accessed
only by a component within the same assembly (dll file). Because
ASP.NET pages are compiled into different assemblies than the
contents of the App_Code folder, we cannot access an internal
member of a class outside of the App_Code folder.
Private—A private class, method, or property can be accessed only
within the class itself. Visual Basic .NET supports the following
access modifiers (also called access levels), which you can use when
declaring a class, method, or property.
Public—A Public class, method, or property has no access
restrictions.
Protected—A Protected method or property can be accessed only
within the class itself or a derived class.
Friend—A Friend class, method, or property can be accessed only
by a component within the same assembly (dll file). Because
ASP.NET pages are compiled into different assemblies than the
contents of the App_Code folder, you cannot access a Friend
member of a class outside of the App_Code folder.
Protected Friend—A Protected Friend method or property can be
accessed within the class itself or a derived class, or any other class
located in the same assembly.
Private—A Private class, method, or property can be accessed only
within the class itself.
ASP.NET controls
Label Control: - The label control display text at specific location on the web
page using the properties that the control has been assigned. Label can be
used as the caption of textbox or other control in a situation where using
access key for the Label moves the focus to the control to the right of the Label.
The TextBox control can be used to display three different types of input fields
depend-
Ing on the value of its TextMode property.The TextMode property accepts the
following
Three values:
. SingleLine—Displays a single-line input field.
Button control:- The button control display a push button on the web page
that the user can click to trigger a post back to the web server .A button can be
either a submit (default) button or a command button.
The image button control:- The image button control is used to display a
clickable image on web page that can be used to post back to the web server
when the image is clicked .this control generates an <input=”image”>element
when rendering to HTML.
The Calender control:- The calendar control display a calendar for either the
current month or selected month. it allows the user to select and move to the
next or previous month.the selectionchanged event causes a postback when
the user select new date ,and the visibleMonth Change event causes a
postback when the user selects different month to be viewed.
The Calendar control supports the following properties (this is not a complete
list):
DayNameFormat—Enables you to specify the appearance of the days of
the week.Possible values are FirstLetter, FirstTwoLetters, Full, Short, and
Shortest.
NextMonthText—Enables you to specify the text that appears for the
next month link.
NextPrevFormat—Enables you to specify the format of the next month
and previous month link. Possible values are CustomText, FullMonth,
and ShortMonth.
PrevMonthText—Enables you to specify the text that appears for the
previous month link.
SelectedDate—Enables you to get or set the selected date.
SelectedDates—Enables you to get or set a collection of selected dates.
SelectionMode—Enablesyou to specify how dates are selected. Possible
values are Day, DayWeek, DayWeekMonth, and None.
Validation Controls
The ASP.NETFramework includes three controls you can use to submit a form
to the server: the Button, LinkButton, and ImageButton controls. These
controls have the same function, but each control has a distinct
appearance.Using the Button Control the Button control renders a push
button that you can use to submit a form to the server.
The Button control supports the following properties (this is not a complete
list):
AccessKey—Enables you to specify a key that navigates to the Button
control.
CommandArgument—Enablesyou to specify a command argument that
is passed to the Command event.
CommandName—Enables you to specify a command name that is
passed to the command event.
Enabled—Enablesyou to disable the Button control.
OnClientClick—Enablesyou to specify a client-side script that executes
when the button is clicked.
PostBackUrl—Enablesyou to post a form to a particular page.
TabIndex—Enables you to specify the tab order of the Button control.
Text—Enablesyou to label the Button control.
UseSubmitBehavior—Enables you to use JavaScript to post a form.
Button control also supports the following method:Focus—Enables youto
set the initial form focus to the Button control.
Button control also supportsthe following two events:
Click—Raised when the Button control is clicked.
Command—Raised when the Button control is clicked.
The LinkButton control, like the Button control, enables you to post a form to
the server. Unlike a Button control, however, the LinkButton control renders a
link instead of a pushbutton. LinkButton control uses JavaScript to post the
form back to the server. Clicking the LinkButton invokes the JavaScript
__doPostBack() method, which posts the form to the server. When the form is
posted, the values of all the other form fields in the page are also posted to the
server.The LinkButton control supports the following properties (this is not a
complete list):
AccessKey—Enables you to specify a key that navigates to the Button
control.
CommandArgument—Enables you to specify a command argument that
is passed to the Command event.
CommandName—Enables you to specify a command name that is
passed to the Command event.
Enabled—Enables you to disable the LinkButton control.
OnClientClick—Enables you to specify a client-side script that executes
when the LinkButton is clicked.
PostBackUrl—Enables you to post a form to a particular page.
TabIndex—Enables you to specify the tab order of the LinkButton
control.
Text—Enables you to label the LinkButton control.
Focus—Enables you to set the initial form focus to the LinkButton
control.
The LinkButton control also supports the following two events:
Click—Raised when the LinkButton control is clicked.
The ImageButton control, like the Button and LinkButton controls, enables you
to post a form to the server. However, the ImageButton control always displays
an image.The ImageButton includes both an ImageUrl and AlternateText
property.The ImageUrl contains the path to the image that the ImageButton
displays. The AlternateText property is used to provide alternate text for the
image used by screen readers and text-only browsers.The ImageButton control
supports the following properties (this is not a complete list):
AccessKey—Enables you to specify a key that navigates to the
ImageButton control.
AlternateText—Enables you to provide alternate text for the image
(required for accessibility).
DescriptionUrl—Enables you to provide a link to a page that contains a
detailed description of the image (required to make a complex image
accessible).
CommandArgument—Enables you to specify a command argument that
is passed to the Command event.
CommandName—Enables you to specify a command name that is
passed to the Command event.
Enabled—Enables you to disable the ImageButton control.
GenerateEmptyAlternateText—Enables you to set the AlternateText
property to an empty string.
ImageAlign—Enables you to align the image relative to other HTML
elements in the Page .Possible values are AbsBottom, AbsMiddle,
Baseline, Bottom, Left, Middle, NotSet, Right, TextTop,and Top.
ImageUrl—Enables you to specify the URL to the image.
OnClientClick—Enables you to specify a client-sidescript that executes
when the ImageButton is clicked.
PostBackUrl—Enables you to post a form to a particular page.
TabIndex—Enables you to specify the tab order of the ImageButton
control.ImageButton control also supports the following method:
6.2 Back End: SQL Server
Relative to the authentication mode, a warning: in case you have installed the
SQL Express along with the installation of an Express Tool or Visual Studio
2005, you will not have the “sa” user password and will not be able to effect the
authentication through SQL Server Authentication. You will have to use
the Windows Authentication option to gain access to the program. In our
example, we will connect using Windows authentication.
Management Studio Work Area
After connected, the work area of Management Studio Express is then
presented, as Figure 2 shows. This window possesses the following areas:
Menu Bar, Toolbar, Object Explorer and Active Files.
Through the Object Explorer box we can navigate among all of the SQL Server
parts, especially the Databases folder, where the created databases and their
objects are contained in(tables,view,etc).In order to create a new database, it is
enough to right-click over the Databases folder and choose the New
Database option.
The window for the creation of the database is then opened, where you insert
the name, choose the owner and configure the initial size of the data and log
files. In our example, we call our new database “Library” and leave the initial
data file size at 3 MB, as you can verify in Figure 3. In the Options page, you
will be able to set some of the new database’s advanced options,
as: Compatibility level, where you choose with which version of the SQL Server
the new database will be compatible; Database Read-Only, where you decide if
the database created will be read-only; and Restrict Access, where you set the
database access restrictions. After performing all the actions, click the OK
button to finish our database creation.
Creating tables
Created the database, we will visualize and add the desired tables, diagrams
and views. To visualize our database’s folders, we will expand
the Databases objects and, after that, Tables, through the Object Explorer.
Once the database is open, the following folders’ structure is presented:
Functional Components
Let’s Blog is a social website. Behind this web site there is a sql database
named Blog.
5.1TABLE “Profiles”
5.2Table “msgs”
msgs table is used to keep records of massages of users
bold varchar(10) no
italic varchar(10) no
unline varchar(10) no
5.3Table “liking”
Liking is a table used to keep records for like and dislike comments
does
user
does
does msg
title
name D&t
photo
Create blog
Share photo
7.SNAPSHOTS
8.CODING
START
Code Behind The File
Imports System.IO
Partial Class _Default
Inherits System.Web.UI.Page
<System.Web.Services.WebMethod()> _
<System.Web.Script.Services.ScriptMethod()> _
Public Shared Function GetPictures() As AjaxControlToolkit.Slide()
Dim di As New DirectoryInfo(MyData.ImagePath)
Dim s(di.GetFiles.Length - 1) As AjaxControlToolkit.Slide
Dim x As Integer = 0
For Each fi As FileInfo In di.GetFiles()
s(x) = New AjaxControlToolkit.Slide(MyData.Url & fi.Name, "",
Path.GetFileNameWithoutExtension(fi.Name))
x += 1
Next
Return s
End Function
End Class
Imports System.IO
Imports System.Data.SqlClient
Partial Class _Default
Inherits System.Web.UI.Page
Session("dob") = rd.GetValue(5).ToString()
Session("photo") = rd.GetValue(6).ToString()
Session("ques") = rd.GetValue(7).ToString()
Session("answer") = rd.GetValue(8).ToString()
Session("highsc") = rd.GetValue(10).ToString()
Session("coll") = rd.GetValue(11).ToString()
Session("cnt") = rd.GetValue(12).ToString()
Session("state") = rd.GetValue(13).ToString()
Session("ht") = rd.GetValue(14).ToString()
Session("lang") = rd.GetValue(15).ToString()
Session("abt") = rd.GetValue(16).ToString()
Response.Redirect("home.aspx")
ElseIf rd.GetValue(9).ToString() = "block" Then
Label12.Text = "You are not allowed to visit ..."
Label12.Visible = True
End If
Else
Label12.Text = "Wrong Email/Password"
Label12.Visible = True
End If
rd.Close()
cn.Close()
End Sub
Imports System.Data.SqlClient
Partial Class home
Inherits System.Web.UI.Page
While rd2.Read()
lk = rd2.GetValue(3).ToString() + " , " + lk
End While
If lk = "" Then
Label9.Text = "No one likes ur blog"
Else
'Else
' TextBox2.Text = "No one likes your blog"
'End If
rd2.Close()
cn2.Close()
Dim cn As SqlConnection = New SqlConnection("Data Source=.;Initial
Catalog=blog;Integrated Security=true")
cn.Open()
Dim cmd As SqlCommand = New SqlCommand("select * from msgs where title='"
+ DropDownList1.SelectedItem.ToString() + "'", cn)
Dim rd As SqlDataReader = cmd.ExecuteReader()
rd.Read()
TextBox1.Text = rd.GetValue(1).ToString()
TextBox1.Font.Bold = True
TextBox1.Font.Bold = True
End If
TextBox1.Font.Italic = True
End If
If rd.GetValue(7).ToString() = "true" Then
TextBox1.Font.Underline = True
End If
'TextBox1.Font.Name = rd.GetValue(2).ToString()
'TextBox1.ForeColor =
System.Drawing.Color.FromName(rd.GetValue(3).ToString())
Dim sr As String = rd.GetValue(8).ToString()
Label8.Text = "Posted At : " + rd.GetValue(9).ToString() + " On " +
rd.GetValue(10).ToString()
Label8.Visible = True
rd.Close()
cn.Close()
End Sub
End If
End Sub
End Class
CREATE BLOG
Try
SqlDataSource1.Insert()
Response.Write("<script>alert('Blog Created
Successfully')</script>")
Response.Redirect("home.aspx")
Catch ex As Exception
Response.Write("<script>alert('Some problem occurred...try
again')</script>")
End Try
End Sub
TextBox2.Font.Bold = True
HiddenField1.Value = "true"
TextBox2.Font.Bold = False
HiddenField1.Value = "false"
End If
End Sub
TextBox2.Font.Underline = True
HiddenField3.Value = "true"
TextBox2.Font.Underline = False
HiddenField3.Value = "false"
End If
End Sub
TextBox2.Font.Italic = True
HiddenField2.Value = "true"
TextBox2.Font.Italic = False
HiddenField2.Value = "false"
End If
End Sub
Dim i As Integer
For i = 8 To 72 Step 4
DropDownList2.Items.Add(i)
Next
End If
End Sub
Imports System.Data.SqlClient
Partial Class view_blog
Inherits System.Web.UI.Page
If CheckBox1.Checked Then
CheckBox1.Text = "You Like This Blog"
cmd2 = New SqlCommand ("update liking set likes='yes' where
email='" + Session ("email").ToString () + "' and title='" +
DropDownList2.SelectedItem.ToString () + "'", cn2)
cmd2.ExecuteNonQuery ()
Else
CheckBox1.Text = "Unlike"
cmd2 = New SqlCommand("update liking set likes='no' where
email='" + Session("email").ToString() + "' and title='" +
DropDownList2.SelectedItem.ToString() + "'", cn2)
cmd2.ExecuteNonQuery ()
End If
End Sub
Try
SqlDataSource3.Insert()
Catch ex As Exception
Response.Write("error occurred...try again")
End Try
GridView1.DataBind()
End Sub
End If
Dim cn As SqlConnection
Dim cmd As SqlCommand
Dim rd As SqlDataReader
cn = New SqlConnection("server=.;database=blog;integrated
security=true")
cn.Open()
cmd = New SqlCommand("select * from msgs where title='" +
DropDownList2.SelectedItem.ToString() + "' ", cn)
rd = cmd.ExecuteReader()
rd.Read()
TextBox1.Text = rd.GetValue(1).ToString()
TextBox1.ReadOnly = True
TextBox1.Font.Bold = True
TextBox1.Font.Bold = True
End If
TextBox1.Font.Italic = True
End If
TextBox1.Font.Underline = True
End If
TextBox1.Font.Name = rd.GetValue(2).ToString()
TextBox1.ForeColor =
System.Drawing.Color.FromName(rd.GetValue(3).ToString())
Dim sr As String = rd.GetValue(8).ToString()
Label6.Text = "Posted At : " + rd.GetValue(9).ToString() + " On " +
rd.GetValue(10).ToString()
Label6.Visible = True
rd.Close()
cn.Close()
End Sub
End Sub
End Class
UPDATE ACCOUNT
Session("highsc") = TextBox4.Text
Session("coll") = TextBox5.Text
Session("cnt") = DropDownList1.Text
Session("state") = DropDownList2.Text
Session("ht") = TextBox6.Text
Session("lang") = TextBox7.Text
Session("abt") = TextBox8.Text
Session("gender") = DropDownList3.Text
End Sub
End Class
UPLOAD PICTURE
Imports System.IO
Partial Class upload_photo
Inherits System.Web.UI.Page
Public Shared i As Integer = 0
Dim di As DirectoryInfo
di = New DirectoryInfo(Server.MapPath("~/") +
Session("email").ToString())
For Each fi As FileInfo In di.GetFiles()
Dim hl As String
Dim img As New Image
img.Height = 50
img.Width = 50
img.BorderStyle = BorderStyle.Double
img.Height = 50
img.Width = 50
img.BorderStyle = BorderStyle.Double
End If
End Sub
Imports System.Data.SqlClient
Partial Class forgot_password
Inherits System.Web.UI.Page
End Sub
Label6.Visible = True
Label7.Visible = True
Label8.Visible = True
TextBox4.Visible = True
TextBox5.Visible = True
LinkButton2.Visible = True
Label4.Visible = False
Label5.Visible = False
DropDownList1.Visible = False
TextBox3.Visible = False
LinkButton1.Visible = False
Else
Response.Write("<script>alert('Plz give correct answer')</script>")
Label6.Visible = False
Label7.Visible = False
Label8.Visible = False
TextBox4.Visible = False
TextBox5.Visible = False
LinkButton2.Visible = False
Label4.Visible = True
Label5.Visible = True
DropDownList1.Visible = True
TextBox3.Visible = True
LinkButton1.Visible = True
End If
rd.Close()
cn.Close()
End Sub
Imports System.IO
Imports System.Data.SqlClient
End Sub
'Response.Redirect("start.aspx")
'Catch ex As HttpException
' Label15.Text = "Wrong mailid or net connection problem"
' Label15.Visible = True
'End Try
Catch ex As SqlException
Label8.Text = "Some problems occurred...try again"
Label8.Visible = True
End Try
End Sub
Imports System.Data.SqlClient
Partial Class change_password
Inherits System.Web.UI.Page
Dim cn As SqlConnection
Dim cmd As SqlCommand
If i = 1 Then
Label4.Text = "Your password has been changed"
Label4.Visible = True
Session("password") = TextBox2.Text
Try
Dim str As String
str = "Congratulations ... Your password has been changed Your New
Password Is: " + TextBox2.Text + " -- Bloggers Stop Team"
MailSender.SendEmail("tmaji70@gmail.com", "9233545892",
Session("email").ToString(), "Account Information", str,
System.Web.Mail.MailFormat.Text, "")
Label4.Text = "Password Changed Successfully,Check Mail For More Info..."
Label4.Visible = True
Catch ex As HttpException
Label4.Text = "Wrong mailid or net connection problem"
Label4.Visible = True
End Try
Else
Label4.Text = "Check Old Password"
Label4.Visible = True
End If
'cn.Close()
End Sub
End Sub
End Class
ADMIN LOG-IN
Code Behind The Form
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.style1
{
z-index: 1;
left: 2px;
top: 1px;
position: absolute;
height: 41px;
width: 1339px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
<p>
<asp:Image ID="Image1" runat="server" ImageUrl="~/image/c.png"
CssClass="style1" />
</p>
<asp:Image ID="Image2" runat="server" ImageUrl="~/IMAGE/no_admin.gif"
style="z-index: 1; left: 51px; top: 153px; position: absolute;
height: 490px; width: 694px" />
<asp:Image ID="Image3" runat="server" ImageUrl="~/IMAGE/ADMIN.png"
style="z-index: 1; left: 404px; top: 72px; position: absolute" />
<asp:Label ID="Label1" runat="server" Font-Bold="True"
Font-Names="Blackadder ITC" Font-Size="XX-Large" ForeColor="Maroon"
style="z-index: 1; left: 870px; top: 155px; position: absolute;
height: 72px; width: 337px"
Text="Please Sign In Here"></asp:Label>
<asp:Image ID="Image4" runat="server" ImageUrl="~/IMAGE/Sign_Here.jpg"
style="z-index: 1; left: 991px; top: 193px; position: absolute;
height: 120px; width: 82px" />
<asp:Login ID="Login1" runat="server" BackColor="#99CCFF"
BorderColor="#660066"
BorderStyle="Double"
style="z-index: 1; left: 813px; top: 316px; position: absolute;
height: 181px; width: 405px">
</asp:Login>
</form>
</body>
</html>
ADMIN HOME
End Sub
Catch ex As Exception
Response.Write("<script>alert('Some error occurred...try again')</script>")
End Try
End Sub
End
ACCOUNT CREATION PRE STEP
Code Behind The Form
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:Image ID="Image1" runat="server" ImageUrl="~/image/blog.jpg.png"
style="z-index: 1; left: 70px; top: 6px; position: absolute; height: 88px; width:
102px" />
<asp:Image ID="Image2" runat="server" ImageUrl="~/image/account creation.png"
style="z-index: 1; left: 173px; top: 35px; position: absolute" />
<asp:Image ID="Image3" runat="server" ImageUrl="~/image/blog-3.jpg"
style="z-index: 1; left: 172px; top: 69px; position: absolute; width: 1028px;
height: 590px" />
<asp:Label ID="Label1" runat="server" Font-Bold="True"
style="z-index: 1; left: 197px; top: 119px; position: absolute; height: 48px; width:
206px"
Text="Since we'll be friends, can you tell us your name?"></asp:Label>
<asp:Label ID="Label2" runat="server"
style="z-index: 1; left: 436px; top: 122px; position: absolute"
Text="First Name:"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server"
style="z-index: 1; left: 532px; top: 119px; position: absolute; height: 27px; width:
169px"></asp:TextBox>
<asp:Label ID="Label3" runat="server"
style="z-index: 1; left: 756px; top: 123px; position: absolute"
Text="Last Name :"></asp:Label>
<asp:TextBox ID="TextBox2" runat="server"
style="z-index: 1; left: 851px; top: 119px; position: absolute; height: 28px; width:
174px"></asp:TextBox>
<asp:Label ID="Label4" runat="server" Font-Bold="True"
style="z-index: 1; left: 201px; top: 189px; position: absolute; height: 25px; width:
200px"
Text="Sorry if we are rude, but when were you born?"></asp:Label>
<asp:Label ID="Label5" runat="server" Font-Bold="True"
style="z-index: 1; left: 688px; top: 194px; position: absolute"
Text="Gender:"></asp:Label>
<asp:Label ID="Label6" runat="server" Font-Bold="True"
style="z-index: 1; left: 288px; top: 288px; position: absolute"
Text="Terms of Service:"></asp:Label>
<asp:Label ID="Label7" runat="server" ForeColor="#FF0066"
style="z-index: 1; left: 419px; top: 290px; position: absolute"
Text="Please review the Google Terms of Service and Orkut Additional Terms
below:"></asp:Label>
<asp:ImageButton ID="ImageButton1" runat="server"
ImageUrl="~/image/i accept.png"
style="z-index: 1; left: 323px; top: 330px; position: absolute; height: 27px; width:
105px" />
<asp:TextBox ID="TextBox3" runat="server"
style="z-index: 1; left: 452px; top: 188px; position: absolute; height: 28px; width:
153px"></asp:TextBox>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:CalendarExtender ID="TextBox3_CalendarExtender" runat="server"
Enabled="True" TargetControlID="TextBox3">
</asp:CalendarExtender>
<asp:DropDownList ID="DropDownList1" runat="server"
style="z-index: 1; left: 787px; top: 190px; position: absolute">
<asp:ListItem></asp:ListItem>
<asp:ListItem>Feamle</asp:ListItem>
<asp:ListItem>Male</asp:ListItem>
</asp: DropDownList>
<asp:Label ID="Label8" runat="server" Font-Bold="True" Font-Size="Medium"
style="z-index: 1; left: 300px; top: 249px; position: absolute; height: 19px; width:
83px"
Text="Email-Id"></asp:Label>
<asp: TextBox ID="TextBox4" runat="server"
style="z-index: 1; left: 455px; top: 247px; position: absolute; height: 25px; width:
142px"></asp:TextBox>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings: blogConnectionString %>"
DeleteCommand="DELETE FROM [profiles] WHERE [email] = @email"
InsertCommand="INSERT INTO [profiles] ([fname], [lname], [email], [gender],
[dob]) VALUES (@fname, @lname, @email, @gender, @dob)"
SelectCommand="SELECT [fname], [lname], [email], [gender], [dob] FROM
[profiles]"
UpdateCommand="UPDATE [profiles] SET [fname] = @fname, [lname] = @lname,
[gender] = @gender, [dob] = @dob WHERE [email] = @email">
<DeleteParameters>
<asp:Parameter Name="email" Type="String" />
</DeleteParameters>
<InsertParameters>
<asp:ControlParameter ControlID="TextBox1" Name="fname"
PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="TextBox2" Name="lname"
PropertyName="Text"
Type="String" />
<asp:SessionParameter Name="email" SessionField="Email" Type="String" />
<asp:ControlParameter ControlID="DropDownList1" Name="gender"
PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="TextBox4" Name="dob"
PropertyName="Text"
Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="fname" Type="String" />
<asp:Parameter Name="lname" Type="String" />
<asp:Parameter Name="gender" Type="String" />
<asp:Parameter Name="dob" Type="String" />
<asp:Parameter Name="email" Type="String" />
</UpdateParameters>
</asp:SqlDataSource>
<asp:Button ID="Button1" runat="server"
style="z-index: 1; left: 489px; top: 332px; position: absolute; height: 25px; width:
101px"
Text="Cancel" />
</form>
</body>
</html>
ABOUT US
Code Behind The Form
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="about us.aspx.vb"
Inherits="about_us" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
<p>
</p>
<asp:Image ID="Image4" runat="server" ImageUrl="~/IMAGE/BSTOP.png"
style="z-index: 1; left: 395px; top: 53px; position: absolute" />
</form>
</body>
</html>
9.Testing
Testing
5.2.1 Scope
A primary purpose for testing is to detect software failures so that defects
may be uncovered and corrected. This is a non-trivial pursuit. Testing
cannot establish that a product functions properly under all conditions but
can only establish that it does not function properly under specific
conditions. The scope of software testing often includes examination of code
as well as execution of that code in various environments and conditions as
well as examining the aspects of code: does it do what it is supposed to do
and do what it needs to do. In the current culture of software development, a
testing organization may be separate from the development team. There are
various roles for testing team members. Information derived from software
testing may be used to correct the process by which software is developed.
Software testing methods are traditionally divided into black box testing and
white box testing. These two approaches are used to describe the point of view
that a test engineer takes when designing test cases.
Specification-based testing
Specification-based testing aims to test the functionality of software
according to the applicable requirements. Thus, the tester inputs data into,
and only sees the output from, the test object. This level of testing usually
requires thorough test cases to be provided to the tester, who then can simply
verify that for a given input, the output value (or behaviour), either "is" or "is
not" the same as the expected value specified in the test case.
Specification-based testing is necessary, but it is insufficient to guard against
certain risks.
Therefore, black box testing has the advantage of "an unaffiliated opinion,"
on the one hand, and the disadvantage of "blind exploring," on the other.
Blogger Stop system was successfully designed and developed as per the
specifications. It was extensively tested using a database which contains data similar
to what can be expected in an actual database. The system was found to work
satisfactorily without any errors under all conditions.
11.CONCLUSION
Summary and Conclusions
Summary of Achievements
The following achievements were made during the project:
The main difficulty that was encountered during this project was that we had to
learn a new technology ASP.net as well as a new language C# with which we
were not at all familiar with earlier .
Time constraint.
Learning the use of triggers.
7.2 Limitations
Since, every system has some limitations so our proposed system is also not
untouchable in this regard. The main limitations of our system are:
C# corner.com
Codeproject.com
Dynamicdrive.com
Books