Вы находитесь на странице: 1из 87

A PROJECT REPORT

MUSIC PORTAL
(In partial fulfillment for the award of the degree of BCA)

Submitted by
Suhail (03721202010)and Gaganpreet singh (03621202010)

Maharaja Surajmal Institute


Affiliated to
Guru Govind Singh Indraprasatha University: DELHI
December-2012

CANDIDATES DECLARATION
I hereby declare that the project work entitled MUSIC
PORTAL submitted to the CMC ltd , as requirements of six
week summer training is a record of an original work done
during 11th June 2012 to 31thJuly 2012.
The matter embodied in this report has not been submitted by me
for the award of any other degree.

Suhail (03721202010) &


Gaganpreet singh(03621202010)
B.C.A 5th semester
Department of Computer Science
Maharaja Surajmal Institute
c-4, Janakpuri, new Delhi-58

CONTENTS
1. INTRODUCTION
1.1 PURPOSE
1.2 SCOPE
1.3 TECHNOLOGIES
1.3.1 OPERATING ENVIRONVENT
1.3.2 DEPLOYMENT ENVIRONMENT
1.3.3 DEVELOPMENT TOOLS
1.3.4 DEVELOPMENT ENVIRONMENT
2. COMPANY PROFILE
3. HARDWARE AND SOFTWARE SPECIFICATION
4. SYSTEM DESIGN
4.1 ENTITY RELATIONSHIP DIAGRAM
5. DATA DICTIONARY
6. MODULES IN THE PROJECT
7. SOURCE CODE
8. FUTURE SCOPE
9. SCREENSHOTS OF PROJECT
10. BIBLIOGRAPHY

ACKNOWLEDGEMENT
A project is an arduous task that can never be successful without
punctuality, patience, dedication, honesty and hard work. Without all
these, this project could never have happened. We express our sincere
gratitude to all those who initiated and helped us in successful
completion of our project. Sincere thanks and profound gratitude to our
Project guide Mr.Santosh and Ms.Nidhi for allowing us to carry out
the project work and for much valuable and useful information while
bringing out this project There are times in such project when you run
out of energy and just fed up of doing one project only and you just want
to finish it as soon as possible even if it not up to mark. The trainers
made us endure such times with their unfailing humors and warm
wishes.

1. INTRODUCTION

Music is an art form whose medium is sound and silence. Its common
elements are pitch (which governs melody and harmony), rhythm (and
its associated concepts tempo, meter, and articulation), dynamics, and
the sonic qualities of timbre and texture.
The creation, performance, significance, and even the definition of
music vary according to culture and social context. Music ranges from
strictly organized compositions (and their recreation in performance),
through improvisational music to aleatoric forms. Music can be divided
into genres and subgenres, although the dividing lines and relationships
between music genres are often subtle, sometimes open to individual
interpretation, and occasionally controversial. Within "the arts", music
may be classified as a performing art, a fine art, and auditory art. There
is also a strong connection between music and mathematics.
To many people in many cultures, music is an important part of their
way of life. Ancient Greek and Indian philosophers defined music as
tones ordered horizontally as melodies and vertically as harmonies.
Common sayings such as "the harmony of the spheres" and "it is music
to my ears" point to the notion that music is often ordered and pleasant
to listen to. However, 20th-century composer John Cage thought that
any sound can be music, saying, for example, "There is no noise, only
sound." Musicologist Jean-Jacques Nattiez summarizes the relativist,
post-modern viewpoint: "The border between music and noise is always
culturally definedwhich implies that, even within a single society, this
border does not always pass through the same place; in short, there is
rarely a consensus ... By all accounts there is
no single and intercultural universal concept defining what music might
be.
1.1 The purposes of the project :
The purpose of the our website is to deliver an easy-to-use music
sharing and downloading albums and songs When we get tired most
of us like to hear a song .We provide the user a platform on which he/she
can upload their own song and create his own playlist . The User can

also view songs uploaded by other users. Admin can upload the songs by
album name and singer name.
1.2 Project Scope:
The application should strengthen the weaknesses mentioned in
the ethnographic studies.
The application should be able to run on any system regardless of
the operating system or
hardware; within reason.The application will be installed on a
home users desktop computer or laptop using an installation
Wizard The application is design for all types of users The
application must function effectively and maintain an efficient level
of service with maximum
uptime to download songs.
Website Features :
The application shall allow the user to lawfully and freely distribute
music over the internet. For
each song the user should be charged a fee which is agreed
between the client and the provider.
Once the fee is paid the music is distributed to him/her.
From here onwards the user can they distributed the music using
their own personal hardware or
software. The application should inform the user which devices
are connected to the system at any
one time. The system should allow the distribution of music to
external devices as well as to other
systems by providing networking capability. The application will
finally incorporate advanced
searching and sorting facilities, making it easier for the user to
organize their music collection.

1.3 Tecnologies

1.3.1 Operating Environment


OE-1:
The web application will operate with the following Web
Browsers: Microsoft Internet Explorer version 7.0, 8.0, 9.0, Google
chrome
OE-2:
The web application shall operate on a server running the
latest versions of IIS (Internet Information Server).
OE-3:
The web application shall permit user access from Internet
connection
OE-4:

Operating System: Windows 2000, XP, 7

OE-5:

Software requirements: SQL Server 2005, .net framework

3.5.
OE-6:

Languages used are Asp.net using c# and scripting is done

using JavaScript.
OE-7:

Hardware

Requirements:

256(minimum)/512(recommended) MB RAM
OE-8:

Hard disc- N GB depending upon the requirement to store

data minimum of 25GB.


1.3.2 Development Tools
DT-1:
ASP.Net
As we need to develop Web Application for Employee Claims
Processing System (WECS). We will use ASP.Net as it is the new
Microsoft technology to develop any application which support and
integrate other server product for the internet. By ASP.Net we can
develop in web application by .NET framework and manage
environment with any .NET support language like C#.

DT-2: C#
.NET is built on the Windows Server System to take major
advantage of the OS and which comes with a host of different
servers which allows for building, deploying, managing and
maintaining Web-based solutions. The Windows Server System is
designed with performance as priority and it provides scalability,
reliability, and manageability for the global, Web-enabled
enterprise. The Windows Server System integrated software
products are built for interoperability using open Web standards
such as XML and SOAP.
.NET is a "Software Platform". It is a language-neutral
environment for developing rich .NET experiences and building
applications that can easily and securely operate within it. When
developed applications are deployed, those applications will
target .NET and will execute wherever .NET is implemented
instead of targeting a particular Hardware/OS combination. The
components that make up the .NET platform are collectively
called the .NET Framework.
The .NET Framework is a managed, type-safe environment for
developing and executing applications. The .NET Framework
manages all aspects of program execution, like, allocation of
memory for the storage of data and instructions, granting and
denying permissions to the application, managing execution of

the application and reallocation of memory for resources that are


not needed.
The

.NET

Framework

compatibility.

is

designed

Cross-language

for

compatibility

cross-language
means,

an

application written in Visual Basic .NET may reference a DLL


file written in C# (C-Sharp). A Visual Basic .NET class might be
derived from a C# class or vice versa.
The .NET Framework consists of two main components:
Common Language Runtime (CLR)
Class Libraries
The advantage of C# includes
Powerful Windows-based Applications
Building Web-based Applications
Simplified Deployment
Powerful, Flexible, Simplified Data Access
Improved Coding
Direct Access to the Platform
Full Object-Oriented Constructs
XML Web Services
COM Interoperability
DT-3: SQL Server 2005

EOCS Application uses SQL Server 2005 as storing the data.


Microsoft SQL Server 2005 as our database and it has so many
features which is ideal for our dot net based application. Features
Includes
Support for Multiple Platforms
Integration with Windows Back office servers
Integration with Microsoft .NET Enterprise Servers
Scalability
Replication
Centralized Management
Reliability
Automatingtasks
1.3.3 Development Environment
DE-1:
Most

1.Visual Studio 2008 IDE


advanced

integrated

development

environment

for

developing .NET application. Microsoft Visual Studio is an


integrated development environment (IDE) from Microsoft. It can
be used to develop console and graphical user interface
applications along with Windows Forms applications, web sites,
web applications, and web services in both native code together

with managed code for all platforms supported by Microsoft


Windows, Windows Mobile, Windows CE, .NET Framework,
.NET Compact Framework and Microsoft Silverlight.
Visual Studio includes a code editor supporting IntelliSense as
well as code refactoring. The integrated debugger works both as a
source-level debugger and a machine-level debugger. Other builtin tools include a forms designer for building GUI applications,
web designer, class designer, and database schema designer. It
allows plug-ins to be added that enhance the functionality at
almost every level - including adding support for source control
systems (like Subversion and Visual SourceSafe) to adding new
toolsets like editors and visual designers for domain-specific
languages or toolsets for other aspects of the software
development lifecycle (like the Team Foundation Server client:
Team Explorer).
Visual Studio supports languages by means of language services,
which allow any programming language to be supported (to
varying degrees) by the code editor and debugger, provided a
language-specific service has been authored. Built-in languages
include C/C++ (via Visual C++), VB.NET (via Visual Basic
.NET), and C# (via Visual C#). Support for other languages such
as Chrome, F#, Python, and Ruby among others has been made

available via language services which are to be installed


separately. It also supports XML/XSLT, HTML/XHTML,
JavaScript and CSS. Language-specific versions of Visual Studio
also exist which provide more limited language services to the
user. These individual packages are called Microsoft Visual
Basic, Visual J#, Visual C#, and Visual C++.

2. COMPANY PROFILE

CMC Limited is a leading IT solutions company and a


subsidiary of Tata Consultancy Services Limited (TCS Ltd.),
one of the world's leading Information Technology consulting,
services and business process outsourcing organisations and a
part of the Tata Group, India's best-known business
conglomerate.
With 18 offices, 150 service locations, 520 non-resident
locations and over 7,300 employees worldwide, CMC Ltd.
provides a wide spectrum of unique Information Technology
solutions and services to a clientele of premier organisations in
the government and private sectors.
CMC Americas Inc. is a subsidiary and services clients in the
US, while CMC branch offices in the UK and Dubai market the
companys products and services in Europe, Africa and the
Middle East. CMC continues to focus on consolidating its
dominant position in India, while expanding its reach globally.

3.HARDWARE & SOFTWARE SPECIFICATIONS

HARDWARE REQUIREMENTS

A minimum computer system that will help you


access all the tools in the course is a Pentium 166 or
better

512 megabytes of RAM or better.

Windows 98, 2000, XP,7, Vista.

Printer to print the tutorials


SOFTWARE REQUIREMENTS

Visual Studio 2008/2010


AJAX Toolkit
Microsoft Word

4. SYSTEM DESIGN
1. Entity-Relationship Diagram

5. DATA DICTIONARY

TABLE NAME :albumupload

TABLE NAME :songupload

TABLE NAME :suseri

6. MODULES
Home page Module
This is the Welcome screen of the MUSIC PORTAL website.
Here different users(user,admin) can go for various options.All will have
different home pages according to previliges.
Sign In Module
The registration form is meant to accept the user information. The user
had to enter user information viz.-username, password,confirm
password,email,security question,security answer capture . Then press
Create User button to register all the fed information.Sign pages will
be different for user and Admin.The user is successfully registered and
logged in and the details are stored in suseri table in database. Already
registered user can login by entering Correct username and password.
On entering wrong username or password, an error message will be
displayed. All admin,user can login for different functions.
Admin Module
In this various previliges have been given to admin .He can
~ Upload Songs for various Albums
~View user information.
User Module
It is the main module of the project. User Listen songs of various
albums,movies etc. He uploads and downloads songs for various
Movies.
Contact us Module
Here contact information is given here.URLs of different Songs related .
Music Websites is given here.
Anyone can give their feedback about anything by using Facebook and
Twiter.

7. Source code
Admin.aspx.cs
using
using
using
using
using
using
using
using
using
using
using
using

System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;

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


{
protected void Page_Load(object sender, EventArgs e)
{
if (Session == null)
{
Response.Redirect("adminlogin.aspx");
}
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("uploadsong.aspx");
}
protected void LinkButton2_Click(object sender, EventArgs e)
{
Response.Redirect("admin_users_view.aspx");
}
protected void LinkButton1_Click1(object sender, EventArgs e)
{
Session.Abandon();
Session.RemoveAll();
Response.Redirect("adminlogin.aspx");
}

Admin.aspx
<%@ Page Language="C#" MasterPageFile="~/MasterPage3_admin.master"
AutoEventWireup="true" CodeFile="admin.aspx.cs" Inherits="admin" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:Panel ID="Panel1" runat="server" Visible="True">
<asp:Label ID="Label2" runat="server" Text="Welcome " BackColor="#FFFFCC"
Font-Bold="True" Font-Size="Large" Height="34px"
Width="96px"></asp:Label>
<asp:Label ID="Label1" runat="server" BackColor="#FFFFCC" Font-Bold="True"
Font-Size="Large" Height="33px" Width="100px">Admin</asp:Label>
<div style="float:right;">
<asp:LinkButton ID="LinkButton5"
runat="server" Font-Bold="True" Font-Size="Large" Height="31px"
Width="151px" onclick="LinkButton1_Click1">logout</asp:LinkButton>
</div>
</asp:Panel>
<div>
<asp:LinkButton ID="LinkButton1" runat="server"
onclick="LinkButton1_Click"
BackColor="Yellow" Font-Bold="True" Font-Size="Larger"
ForeColor="Red"
BorderStyle="Double" Width="183px">Upload
Song</asp:LinkButton>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:LinkButton ID="LinkButton2" runat="server"
onclick="LinkButton2_Click"
BackColor="Yellow" Font-Bold="True" Font-Size="Larger"
ForeColor="Red"
BorderStyle="Double" Width="181px">View
Users</asp:LinkButton>

&nbsp;&nbsp;&nbsp;&nbsp;

<asp:LinkButton ID="LinkButton3" runat="server"


PostBackUrl="~/albumupload.aspx" BackColor="Yellow" FontBold="True"
Font-Size="Larger" ForeColor="Red" BorderStyle="Double"
Width="182px">Upload Album</asp:LinkButton>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:LinkButton ID="LinkButton4" runat="server" BackColor="Yellow"
Font-Bold="True" Font-Size="Larger" ForeColor="Red"
PostBackUrl="~/show_all_albums.aspx" BorderStyle="Double"
Width="181px">Show All Albums</asp:LinkButton>
<br />

</div>
</asp:Content>

admin_users_view.aspx.cs
using
using
using
using
using
using
using
using
using
using
using
using

System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;

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


{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void LinkButton1_Click(object sender,
{
Response.Redirect("uploadsong.aspx");
}
protected void LinkButton2_Click(object sender,
{
Response.Redirect("admin_users_view.aspx");
}
protected void LinkButton3_Click(object sender,
{
Response.Redirect("albumupload.aspx");
}
protected void LinkButton4_Click(object sender,
{
Response.Redirect("show_all_albums.aspx");
}
protected void LinkButton5_Click(object sender,
{
Session.Abandon();
Session.RemoveAll();

EventArgs e)

EventArgs e)

EventArgs e)

EventArgs e)

EventArgs e)

Response.Redirect("adminlogin.aspx");
}

admin_users_view.aspx
<%@ Page Language="C#" MasterPageFile="~/MasterPage3_admin.master"
AutoEventWireup="true" CodeFile="admin_users_view.aspx.cs"
Inherits="admin_users_view" %>

<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server">


<asp:Panel ID="Panel1" runat="server" Visible="True">
<asp:Label ID="Label5" runat="server" Text="Welcome " BackColor="#FFFFCC"
Font-Bold="True" Font-Size="Large" Height="34px"
Width="96px"></asp:Label>
<asp:Label ID="Label6" runat="server" BackColor="#FFFFCC" Font-Bold="True"
Font-Size="Large" Height="33px" Width="100px">Admin</asp:Label>
<div style="float:right;">
<asp:LinkButton ID="LinkButton5"
runat="server" Font-Bold="True" Font-Size="Large" Height="31px"
Width="151px" onclick="LinkButton5_Click" >logout</asp:LinkButton>
</div>
</asp:Panel>
<div>
<asp:LinkButton ID="LinkButton1" runat="server"
onclick="LinkButton1_Click"
BackColor="Yellow" Font-Bold="True" Font-Size="Larger"
ForeColor="Red"
BorderStyle="Double" Width="183px">Upload
Song</asp:LinkButton>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:LinkButton ID="LinkButton2" runat="server"
onclick="LinkButton2_Click"
BackColor="Yellow" Font-Bold="True" Font-Size="Larger"
ForeColor="Red"
BorderStyle="Double" Width="181px">View
Users</asp:LinkButton>

&nbsp;&nbsp;&nbsp;&nbsp;

<asp:LinkButton ID="LinkButton3" runat="server"


BackColor="Yellow" Font-Bold="True"
Font-Size="Larger" ForeColor="Red" BorderStyle="Double"
Width="182px"
onclick="LinkButton3_Click">Upload Album</asp:LinkButton>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:LinkButton ID="LinkButton4" runat="server" BackColor="Yellow"
Font-Bold="True" Font-Size="Larger" ForeColor="Red"
BorderStyle="Double" Width="181px"
onclick="LinkButton4_Click">Show All Albums</asp:LinkButton>
<br />
</div>
<div>

<br />

<br />
<center>
<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False"
DataSourceID="SqlDataSource1" BackColor="#DEBA84"
BorderColor="#DEBA84" BorderWidth="1px" CellPadding="3"
BorderStyle="None" CellSpacing="2" Width="775px">
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<Columns>
<asp:BoundField DataField="id_no" HeaderText="id_no"
InsertVisible="False"
ReadOnly="True" SortExpression="id_no" />
<asp:BoundField DataField="songname" HeaderText="songname"
SortExpression="songname" />
<asp:BoundField DataField="songaddress"
HeaderText="songaddress"
SortExpression="songaddress" />
<asp:BoundField DataField="uploadby" HeaderText="uploadby"
SortExpression="uploadby" />
<asp:HyperLinkField DataNavigateUrlFields="songaddress"
Text="Play" />
</Columns>
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<PagerStyle ForeColor="#8C4510"
HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#738A9C" ForeColor="White" FontBold="True" />
<HeaderStyle BackColor="#A55129" Font-Bold="True"
ForeColor="White" />
</asp:GridView>
</center>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT * FROM [songupload]"></asp:SqlDataSource>
</div>
</asp:Content>

adminlogin.aspx.cs
using
using
using
using
using
using
using
using
using
using
using
using

System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;

public partial class admin : 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")
{
Session["username"] = "admin";
Response.Redirect("admin.aspx");
}
else
Label3.Text = "Invalid Login Try Again !";
}
}

adminlogin.aspx
<%@ Page Language="C#" MasterPageFile="~/MasterPage3_admin.master"
AutoEventWireup="true" CodeFile="adminlogin.aspx.cs" Inherits="admin" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div>

<table align="center" style="border-style: ridge; border-width:


thick; height: 246px; width: 52%;">
<tr>
<td colspan="2" style="text-align: center">
ADMINISTRATOR LOGIN</td>
</tr>
<tr>
<td >
<asp:Label ID="Label1" runat="server" Font-Names="century
gothic"
ForeColor="black" Text="User Name"></asp:Label>
</td>
<td>
<asp:TextBox ID="TextBox1" runat="server"
Width="150px"></asp:TextBox>
&nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server"
ControlToValidate="TextBox1" ErrorMessage="*"
ForeColor="Lime"
ValidationGroup="a"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label2" runat="server" Font-Names="century
gothic"
ForeColor="black" Text="Password"></asp:Label>
</td>

<td>

<asp:TextBox ID="TextBox2" runat="server"


TextMode="Password" Width="150px"></asp:TextBox>
&nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator2"
runat="server"
ControlToValidate="TextBox2" ErrorMessage="*"
ForeColor="Lime"
ValidationGroup="a"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td colspan="2">
<asp:Button ID="Button1" runat="server" FontNames="century gothic"
onclick="Button1_Click" Text="Login"
ValidationGroup="a" />
</td>
</tr>
<tr>
<td colspan="2">
<asp:Label ID="Label3" runat="server" Font-Names="century
gothic"
ForeColor="White"></asp:Label>
</td>
</tr>
</table>

</div>
</asp:Content>

aftersignup.aspx.cs
using
using
using
using
using
using
using
using
using
using
using
using

System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;

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


{
protected void Page_Load(object sender, EventArgs e)
{
ImageButton1.Attributes.Add("onmouseover",
"src='images/home_button1.png'");
ImageButton1.Attributes.Add("onmouseout",
"src='images/home_button.png'");

ImageButton2.Attributes.Add("onmouseover",
"src='images/about_button1.png'");
ImageButton2.Attributes.Add("onmouseout",
"src='images/about_button.png'");
ImageButton3.Attributes.Add("onmouseover",
"src='images/contact_button1.png'");
ImageButton3.Attributes.Add("onmouseout",
"src='images/contact_button.png'");
ImageButton4.Attributes.Add("onmouseover",
"src='images/join_button1.png'");
ImageButton4.Attributes.Add("onmouseout",
"src='images/join_button.png'");
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("Default.aspx");
}
}

aftersignup.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="aftersignup.aspx.cs"


Inherits="aftersignup" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Your account Created</title>
</head>
<body background="images/bg.jpg">
<form id="form1" runat="server">
<div>

<div style="background-color:#ffffff;height:150px;">
<div style="float:left; height: 104px; width: 317px;">
<asp:Image ID="Image1" runat="server" Height="99px"
ImageUrl="~/images/flogo1.gif" Width="298px" />
</div>
<asp:Panel ID="Panel1" runat="server">
</asp:Panel>
</div>
<hr>
<div><center style="margin-left: 40px">
<asp:ImageButton ID="ImageButton1" runat="server"
ImageUrl="~/images/home_button.png"
PostBackUrl="~/Default.aspx" />
&nbsp;&nbsp;
&nbsp;&nbsp;
&nbsp;&nbsp;
<asp:ImageButton ID="ImageButton2" runat="server"

ImageUrl="~/images/about_button.png" PostBackUrl="~/aboutus.aspx"
/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:ImageButton ID="ImageButton3" runat="server"
ImageUrl="~/images/contact_button.png"
PostBackUrl="~/contact.aspx" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:ImageButton ID="ImageButton4" runat="server"
ImageUrl="~/images/join_button.png" PostBackUrl="~/signup.aspx" />
</center>
</div>
<br />
<div style="background-color:Yellow">
<asp:Label ID="Label1" runat="server"
Text="Congratulations !!! Your account has been successfully
created !!"
ForeColor="#C42B68" Font-Bold="True" Font-Size="XLarge"></asp:Label>
<br />
<br />
<center>
<asp:Button ID="Button1" runat="server" Text="Login Your Account"
onclick="Button1_Click" />
</center>
<br />
</div>

<hr/>
<br/>

<hr>
<div>
<center><font color="#C9015C"><p>
<a href="Default.aspx">Home</a> <span>|</span>
<a href="aboutus.aspx">About Us</a> <span>|</span>
<a href="signup.aspx">Join Us</a> <span>|</span>
<a href="terms_and_condition.aspx">Terms and Condition</a>
<span>|</span>
<a href="contact.aspx">Contact Us </a>
</p>
<p> &copy; 2012 Music Portal, LLC. All Rights Reserved.</p>
</font></center>
</div>
</div>
</form>
</body>

</html>

albumsong.aspx.cs
using
using
using
using
using
using
using
using
using
using
using
using
using

System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;
System.Data.SqlClient;

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


{
string str;
protected void Page_Load(object sender, EventArgs e)
{
str = Session["song"].ToString();
SqlConnection con = new SqlConnection();
con.ConnectionString = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|
datadirectory|\database.mdf;Integrated Security=True;User Instance=True";
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = "select * from albumupload where album='" + str +
"'";
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
GridView1.DataSource = dr;
GridView1.DataBind();
Label2.Text = Session["song"].ToString();
con.Close();

albumsong.aspx
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master"
AutoEventWireup="true" CodeFile="albumsong.aspx.cs" Inherits="Default3"
Title="Untitled Page" %>

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


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<div style="background:#ffffff;"><h2><asp:Label ID="Label1" runat="server"
Text="Album name:"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:Label
ID="Label2"
runat="server" ></asp:Label></h2></div>
<br />
<center>
<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False"
BackColor="#DEBA84" BorderColor="#DEBA84" BorderWidth="1px"
CellPadding="3" BorderStyle="None" CellSpacing="2" Height="138px"
style="width: 1000px" Width="850px">
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<Columns>
<asp:BoundField DataField="songname" HeaderText="songname"
SortExpression="songname" />
<asp:BoundField DataField="songaddress" HeaderText="songaddress"
SortExpression="songaddress" Visible="False" />
<asp:BoundField DataField="album" HeaderText="album"
SortExpression="album" />
<asp:BoundField DataField="singer" HeaderText="singer"
SortExpression="singer" />
<asp:HyperLinkField DataNavigateUrlFields="songaddress"
Text="Play" />
</Columns>
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<PagerStyle ForeColor="#8C4510"
HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#738A9C" ForeColor="White" FontBold="True" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
</asp:GridView></center>
<%--<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="select songname,songaddress,album,singer from
albumupload where album like '%cocktail%'">
</asp:SqlDataSource>--%>
</asp:Content>

albumupload.aspx.cs
using
using
using
using
using
using
using
using

System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;

using
using
using
using
using
using

System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;
System.IO;
System.Data.SqlClient;

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


{
SqlConnection con = new SqlConnection();
protected void Page_Load(object sender, EventArgs e)
{
con.ConnectionString = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|
datadirectory|\database.mdf;Integrated Security=True;User Instance=True";
}
protected void Repeater1_ItemCommand(object source,
RepeaterCommandEventArgs e)
{
Response.AddHeader("content-disposition", "attachment;filename=" +
e.CommandArgument);
Response.WriteFile(e.CommandArgument.ToString());
Response.End();
}
static int i = 0;
public void getval()
{
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = "select count(id_no) from albumupload";
con.Open();
i = Convert.ToInt32(cmd.ExecuteScalar());
con.Close();
//return i;

}
public void show()
{

SqlDataAdapter ad = new SqlDataAdapter("select * from albumupload


where id_no=" + i, con);
DataTable dt = new DataTable();
ad.Fill(dt);
rp.DataSource = dt;
rp.DataBind();

}
protected void Button1_Click1(object sender, EventArgs e)
{
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
if (FileUpload1.HasFile)
{

string ext = Path.GetExtension(FileUpload1.FileName);


if ((ext == ".mp3") || (ext == ".wma"))
{
FileUpload1.SaveAs(Server.MapPath("~\\upload\\") +
FileUpload1.FileName);
cmd.CommandText = "insert into
albumupload(songname,songaddress,album,singer)
values(@songname,@songaddress,@album,@singer)";
cmd.Parameters.AddWithValue("@songname",
FileUpload1.FileName);
cmd.Parameters.AddWithValue("@songaddress", "~\\upload\\" +
FileUpload1.FileName);
cmd.Parameters.AddWithValue("@album", TextBox1.Text);
cmd.Parameters.AddWithValue("@singer", TextBox2.Text);
con.Open();
try
{
int i = 0;
i = cmd.ExecuteNonQuery();
if (i > 0)
{
show();
}
Label1.Text = "mp3 Upload";
}
catch (Exception ex)
{
Label1.Text = "U Must Login first";
}
con.Close();
show();

}
else
{
}

Label1.Text = "Please select any file";

}
}
protected void LinkButton1_Click1(object sender, EventArgs e)
{
Session.Abandon();
Session.RemoveAll();
Response.Redirect("adminlogin.aspx");
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("uploadsong.aspx");
}
protected void LinkButton2_Click(object sender, EventArgs e)
{

Response.Redirect("admin_users_view.aspx");

albumupload.aspx
<%@ Page Language="C#" MasterPageFile="~/MasterPage3_admin.master"
AutoEventWireup="true" CodeFile="albumupload.aspx.cs" Inherits="albumupload"
%>
<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:Panel ID="Panel1" runat="server" Visible="True">
<asp:Label ID="Label5" runat="server" Text="Welcome " BackColor="#FFFFCC"
Font-Bold="True" Font-Size="Large" Height="34px"
Width="96px"></asp:Label>
<asp:Label ID="Label10" runat="server" BackColor="#FFFFCC" FontBold="True"
Font-Size="Large" Height="33px" Width="100px">Admin</asp:Label>
<div style="float:right;">
<asp:LinkButton ID="LinkButton5"
runat="server" Font-Bold="True" Font-Size="Large" Height="31px"
Width="151px" onclick="LinkButton1_Click1">logout</asp:LinkButton>
</div>
</asp:Panel>
<div>
<asp:LinkButton ID="LinkButton1" runat="server"
onclick="LinkButton1_Click"
BackColor="Yellow" Font-Bold="True" Font-Size="Larger"
ForeColor="Red"
BorderStyle="Double" Width="183px">Upload
Song</asp:LinkButton>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:LinkButton ID="LinkButton2" runat="server"
onclick="LinkButton2_Click"
BackColor="Yellow" Font-Bold="True" Font-Size="Larger"
ForeColor="Red"
BorderStyle="Double" Width="181px">View
Users</asp:LinkButton>

&nbsp;&nbsp;&nbsp;&nbsp;

<asp:LinkButton ID="LinkButton3" runat="server"


PostBackUrl="~/albumupload.aspx" BackColor="Yellow" FontBold="True"
Font-Size="Larger" ForeColor="Red" BorderStyle="Double"
Width="182px">Upload Album</asp:LinkButton>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<asp:LinkButton ID="LinkButton4" runat="server" BackColor="Yellow"


Font-Bold="True" Font-Size="Larger" ForeColor="Red"
PostBackUrl="~/show_all_albums.aspx" BorderStyle="Double"
Width="181px">Show All Albums</asp:LinkButton>
<br />
</div>
<div>
<asp:FileUpload ID="FileUpload1" runat="server" />

<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server"
ControlToValidate="FileUpload1" ErrorMessage="Please select some
file"
ValidationGroup="v1"></asp:RequiredFieldValidator>

<br />
<br />
<asp:Label ID="Label6" runat="server" Text="Album Name"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server"
ValidationGroup="v1"></asp:TextBox>
&nbsp;
<asp:Label ID="Label7" runat="server" Text="Singer"></asp:Label>
<asp:TextBox ID="TextBox2" runat="server"
ValidationGroup="v1"></asp:TextBox>
<br />
<br />

<br />
<asp:Label ID="Label1" runat="server"></asp:Label>
<br />
<asp:Button ID="Button1" runat="server" Text="Upload" Width="121px"
onclick="Button1_Click1" />

<asp:Repeater runat="server" ID="rp">


<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<table>
<tr><td><asp:LinkButton ID="LinkButton1" runat="server" Text='<
%#Eval("songaddress") %>'></asp:LinkButton></td></tr>
<tr><td><asp:Label ID="Label1" runat="server" Text='<%#Eval("songname")
%>'></asp:Label></td></tr>
<tr><td><video src= '<%#Eval("songname") %>' width="320" height="240" controls
="autobuffer"></video> </td></tr>

<tr><td><asp:Label ID="Label5" runat="server" Text='<%#Eval("likes")


%>'></asp:Label>
&nbsp; &nbsp;<asp:Label ID="Label4" runat="server"
Text="likes"></asp:Label></td></tr>
</table>
</ItemTemplate>
</asp:Repeater>
<br />
<br />
<center>
<asp:GridView ID="GridView2" runat="server"
AutoGenerateColumns="False"
DataSourceID="SqlDataSource2" BackColor="#DEBA84"
BorderColor="#DEBA84" BorderWidth="1px" CellPadding="3"
BorderStyle="None" CellSpacing="2" Width="1106px">
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<Columns>
<asp:BoundField DataField="songname" HeaderText="songname"
SortExpression="songname" />
<asp:BoundField DataField="songaddress"
HeaderText="songaddress"
SortExpression="songaddress" />
<asp:HyperLinkField DataNavigateUrlFields="songaddress"
HeaderText="Song Play"
Text="play" />
<asp:BoundField DataField="album" HeaderText="album"
SortExpression="album" />
<asp:BoundField DataField="singer" HeaderText="singer"
SortExpression="singer" />
</Columns>
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<PagerStyle ForeColor="#8C4510"
HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#738A9C" ForeColor="White" FontBold="True" />
<HeaderStyle BackColor="#A55129" Font-Bold="True"
ForeColor="White" />
</asp:GridView>
</center>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [songname], [songaddress], [album], [singer]
FROM [albumupload]">
</asp:SqlDataSource>
</div>
</asp:Content>

Capture.aspx.cs
using System;

using
using
using
using
using
using
using
using
using
using
using
using
using

System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;
System.Data.SqlClient;
System.Drawing;

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


{
protected void Page_Load(object sender, EventArgs e)
{
Bitmap b = new Bitmap(180, 51);
Graphics g = Graphics.FromImage(b);
g.Clear(Color.CadetBlue);
g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
Font f = new Font("arial", 30, FontStyle.Regular);
string randomstr = generatepassword();
Session["randomstr"] = randomstr;
g.DrawString(randomstr, f, Brushes.White, 2, 2);
Response.ContentType = "image/gif";
b.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Gif);
f.Dispose();
g.Dispose();
b.Dispose();
}
public string generatepassword()
{
string ch = "a,q,w,e,r,t,y,u,p,s,d,f,g,h,j,k,m,n,b,v,c,x,z";
ch += "A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,T,U,V,W,X,,Y,Z";
ch += "2,3,4,5,6,7,8,9";
char[] sep = { ',' };
string[] arr = ch.Split(sep);
string passwordstring = "";
string temp;
Random rand = new Random();
for (int i = 0; i < 4; i++)
{
temp = arr[rand.Next(0, arr.Length)];
passwordstring += temp;
}
return passwordstring;
}
}

Default.aspx.cs

using
using
using
using
using
using
using
using
using
using
using

System;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;

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


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

}
protected void LinkButton2_Click(object sender, EventArgs e)
{

}
protected void ImageButton1_Click(object
{
Session["song"] = Label1.Text;
Response.Redirect("albumsong.aspx");
}
protected void ImageButton2_Click(object
{
Session["song"] = Label2.Text;
Response.Redirect("albumsong.aspx");
}
protected void ImageButton3_Click(object
{
Session["song"] = Label3.Text;
Response.Redirect("albumsong.aspx");
}
protected void ImageButton4_Click(object
{
Session["song"] = Label4.Text;
Response.Redirect("albumsong.aspx");
}
protected void ImageButton5_Click(object
{
Session["song"] = Label5.Text;
Response.Redirect("albumsong.aspx");
}
protected void ImageButton6_Click(object
{
Session["song"] = Label6.Text;
Response.Redirect("albumsong.aspx");
}

sender, ImageClickEventArgs e)

sender, ImageClickEventArgs e)

sender, ImageClickEventArgs e)

sender, ImageClickEventArgs e)

sender, ImageClickEventArgs e)

sender, ImageClickEventArgs e)

Default.aspx
<%@ Page Language="C#"
AutoEventWireup="true"

MasterPageFile="~/MasterPage.master"
CodeFile="Default.aspx.cs" Inherits="_Default" %>

<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server">


<div style="background-color:#ffffff;">
<h1>Latest Bollywood Songs :</h1>
</div>
<center>
<div style="background-color:#ffffff;width:900px;">
<script type="text/javascript">
/***********************************************
* Conveyor belt slideshow script- Dynamic Drive DHTML code library
(www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
//Specify the slider's width (in pixels)
var sliderwidth="900px"
//Specify the slider's height
var sliderheight="154px"
//Specify the slider's slide speed (larger is faster 1-10)
var slidespeed=2
//configure background color:
slidebgcolor="#D6D3D6"
//Specify the slider's images
var leftrightslide=new Array()
var finalslide=''
leftrightslide[1]='<a href="maximum_2012.aspx" target=_blank><img
src="images/maximum.jpg" border=0 alt="Maximum Mp3 Songs"></a>'
leftrightslide[2]='<a href="cocktail_2012.aspx" target=_blank><img
src="images/cocktail.jpg" border=0 alt="Cocktail Mp3 Songs"></a>'
leftrightslide[6]='<a href="ferrari_ki_sawaari_2012.aspx" target=_blank><img
src="images/ferrarikisawaari.jpg" border=0 alt="Ferrari Ki Sawaari Mp3
Songs"></a>'
leftrightslide[5]='<a href="shanghai_2012.aspx" target=_blank><img
src="images/shanghai.jpg" border=0 alt="Shanghai Mp3 Songs"></a>'
leftrightslide[0]='<a href="teri_meri_kahaani_2012.aspx" target=_blank><img
src="images/terimerikahaani.jpg" border=0 alt="Teri Meri Kahaani Mp3
Songs"></a>'
leftrightslide[3]='<a href="qasam_se_qasam_se_2012.aspx" target=_blank><img
src="images/qsqs.jpg" border=0 alt="Qasam Se Qasam Se Mp3 Songs"></a>'

leftrightslide[4]='<a href="gangs_of_wasseypur_2012.aspx" target=_blank><img


src="images/gow.jpg" border=0 alt="Gangs Of Wasseypur Mp3 Songs"></a>'
leftrightslide[7]='<a href="bol_bachchan_2012.aspx" target=_blank><img
src="images/bolbachchan.jpg" border=0 alt="Bol Bachchan Mp3 Songs"></a>'

//Specify gap between each image (use HTML):


var imagegap=" "
//Specify pixels gap between each slideshow rotation (use integer):
var slideshowgap=5
////NO NEED TO EDIT BELOW THIS LINE////////////
var copyspeed=slidespeed
leftrightslide='<nobr>'+leftrightslide.join(imagegap)+'</nobr>'
var iedom=document.all||document.getElementById
if (iedom)
document.write('<span id="temp"
style="visibility:hidden;position:absolute;top:-100px;left:9000px">'+leftrightslide+'</span>')
var actualwidth=''
var cross_slide, ns_slide
function fillup(){
if (iedom){
cross_slide=document.getElementById? document.getElementById("test2") :
document.all.test2
cross_slide2=document.getElementById? document.getElementById("test3") :
document.all.test3
cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide
actualwidth=document.all? cross_slide.offsetWidth :
document.getElementById("temp").offsetWidth
cross_slide2.style.left=actualwidth+slideshowgap+"px"
}
else if (document.layers){
ns_slide=document.ns_slidemenu.document.ns_slidemenu2
ns_slide2=document.ns_slidemenu.document.ns_slidemenu3
ns_slide.document.write(leftrightslide)
ns_slide.document.close()
actualwidth=ns_slide.document.width
ns_slide2.left=actualwidth+slideshowgap
ns_slide2.document.write(leftrightslide)
ns_slide2.document.close()
}
lefttime=setInterval("slideleft()",30)
}
window.onload=fillup
function slideleft(){
if (iedom){
if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8))
cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed+"px"
else
cross_slide.style.left=parseInt(cross_slide2.style.left)
+actualwidth+slideshowgap+"px"

if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8))
cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed+"px"
else
cross_slide2.style.left=parseInt(cross_slide.style.left)
+actualwidth+slideshowgap+"px"
}
else if (document.layers){
if (ns_slide.left>(actualwidth*(-1)+8))
ns_slide.left-=copyspeed
else
ns_slide.left=ns_slide2.left+actualwidth+slideshowgap
if (ns_slide2.left>(actualwidth*(-1)+8))
ns_slide2.left-=copyspeed
else
ns_slide2.left=ns_slide.left+actualwidth+slideshowgap
}
}
if (iedom||document.layers){

with (document){
document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
if (iedom){
write('<div
style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflo
w:hidden">')
write('<div
style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';backgro
und-color:'+slidebgcolor+'" onMouseover="copyspeed=0"
onMouseout="copyspeed=slidespeed">')
write('<div id="test2" style="position:absolute;left:0px;top:0px"></div>')
write('<div id="test3" style="position:absolute;left:-1000px;top:0px"></div>')
write('</div></div>')
}
else if (document.layers){
write('<ilayer width='+sliderwidth+' height='+sliderheight+'
name="ns_slidemenu" bgColor='+slidebgcolor+'>')
write('<layer name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0"
onMouseout="copyspeed=slidespeed"></layer>')
write('<layer name="ns_slidemenu3" left=0 top=0 onMouseover="copyspeed=0"
onMouseout="copyspeed=slidespeed"></layer>')
write('</ilayer>')
}
document.write('</td></table>')
}
}
</script>
</div> </center> <br /><br />
<div style="height:450px;width:1300px">
<center>

<div style="float:left;height:411px; width:300px;backgroundcolor:#ffffff;">


<h2>Most Popular</h2>
<h3>Albums:</h3>
<br/>
<table border="1">
<tr><td>
<asp:Image ID="Image1" runat="server" Height="129px"
ImageUrl="~/images/cocktail.jpg" Width="142px" /></td><td
class="style1"><h4>
<asp:Label ID="Label1" runat="server"
Text="Cocktail"></asp:Label></h4>

<asp:ImageButton ID="ImageButton1" runat="server"


ImageUrl="~/images/play_logo.png" Height="25px"
Width="87px"
onclick="ImageButton1_Click"/>
<%--<asp:Image ID="Image7" runat="server" Height="25px"
ImageUrl="~/images/play_logo.png" Width="87px" /></a>--%>
</td></tr>
<tr><td>
<asp:Image ID="Image2" runat="server" Height="129px"
ImageUrl="~/images/ek-tha-tiger.jpg" Width="142px" /></td>
<td class="style1"><h4>
<asp:Label ID="Label2" runat="server" Text="Ek Tha
Tiger"></asp:Label></h4>
<asp:ImageButton ID="ImageButton2" runat="server" Height="25px"
ImageUrl="~/images/play_logo.png" Width="87px"
onclick="ImageButton2_Click"/>
<%--<asp:Image ID="Image8" runat="server" Height="25px"
ImageUrl="~/images/play_logo.png" Width="87px" />--%></a>
</td></tr>
</table>
</div>
<div style="float:left;height:411px; width:300px;backgroundcolor:#ffffff;">
<h2>Most Popular Punjabi</h2>
<h3>Albums:</h3>
<br/>
<table border="1">
<tr><td>
<asp:Image ID="Image3" runat="server" Height="129px"
ImageUrl="~/images/PropheC - Forever - Front.jpg" Width="142px"
/></td>
<td class="style2"><h4>
<asp:Label ID="Label3" runat="server" Text="Prophec
Forever"></asp:Label></h4>
<asp:ImageButton ID="ImageButton3" runat="server" Height="25px"
ImageUrl="~/images/play_logo.png" Width="87px"
onclick="ImageButton3_Click"/>
<%--<asp:Image ID="Image9" runat="server" Height="25px"
ImageUrl="~/images/play_logo.png" Width="87px" />--%></td></tr></a>

<tr><td>
<asp:Image ID="Image4" runat="server" Height="129px"
ImageUrl="~/images/international villager.jpg" Width="142px"
/></td>
<td class="style2"><h4>
<asp:Label ID="Label4" runat="server" Text="International
Villager"></asp:Label></h4>
<asp:ImageButton ID="ImageButton4" runat="server" Height="25px"
ImageUrl="~/images/play_logo.png" Width="87px"
onclick="ImageButton4_Click" />
<%--<asp:Image ID="Image10" runat="server" Height="25px"
ImageUrl="~/images/play_logo.png" Width="87px" />--%></td></tr></a>
</table>
</div>
<div style="float:left;height:411px; width:330px;backgroundcolor:#ffffff;">
<h2>Most Popular English</h2>
<h3>Albums:</h3>
<br/>
<table border="1">
<tr><td>
<asp:Image ID="Image5" runat="server" Height="129px"
ImageUrl="~/images/justin-bieber-believe-album-cover-deluxe.jpg"
Width="142px" /></td><td><h4>
<asp:Label ID="Label6" runat="server"
Text="Believe"></asp:Label> </h4>

Height="25px"

<asp:ImageButton ID="ImageButton6" runat="server"

ImageUrl="~/images/play_logo.png" Width="87px"
onclick="ImageButton6_Click"/>
<%--<asp:Image ID="Image11" runat="server" Height="25px"
ImageUrl="~/images/play_logo.png" Width="87px" />--%></td></tr></a>
<tr><td>
<asp:Image ID="Image6" runat="server" Height="129px"
ImageUrl="~/images/Akon 2012 - Konkrete Jungle.jpg" Width="142px"
/></td><td>
<h4>
<asp:Label ID="Label5" runat="server" Text="Konkrete
Jungle"></asp:Label></h4>
<asp:ImageButton ID="ImageButton5" runat="server"
Height="25px"

ImageUrl="~/images/play_logo.png" Width="87px"
onclick="ImageButton5_Click" />
<%--<asp:Image ID="Image12" runat="server" Height="25px"
ImageUrl="~/images/play_logo.png" Width="87px" />--%></td></tr></a>
</table></div>
<div style="float:right;height:350px;width:350px;backgroundcolor:#ffffff;">
<h2>Advertisement</h2>
<script type="text/javascript"><!-google_ad_client="pub-7804285882870799";
google_ad_host="pub-1556223355139109";

google_ad_width=336;
google_ad_height=280;
google_ad_format="336x280_as";
google_ad_type="text_image";
google_ad_host_channel="0001+S0011+L0001";
google_color_border="FFFFFF";
google_color_bg="FFFFFF";
google_color_link="000000";
google_color_url="249FA3";
google_color_text="222222";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
</center>
</div>

</asp:Content>
<asp:Content ID="Content1" runat="server" contentplaceholderid="head">
<style type="text/css">
.style1
{
width: 118px;
}
.style2
{
width: 137px;
}
</style>
</asp:Content>

MasterPage.master.cs
using
using
using
using
using
using
using
using
using
using
using
using
using

System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Xml.Linq;
System.Data.SqlClient;

public partial class MasterPage : System.Web.UI.MasterPage


{
protected void Page_Load(object sender, EventArgs e)
{
ImageButton1.Attributes.Add("onmouseover",
"src='images/home_button1.png'");
ImageButton1.Attributes.Add("onmouseout",
"src='images/home_button.png'");
ImageButton2.Attributes.Add("onmouseover",
"src='images/about_button1.png'");
ImageButton2.Attributes.Add("onmouseout",
"src='images/about_button.png'");
ImageButton3.Attributes.Add("onmouseover",
"src='images/contact_button1.png'");
ImageButton3.Attributes.Add("onmouseout",
"src='images/contact_button.png'");
ImageButton4.Attributes.Add("onmouseover",
"src='images/join_button1.png'");
ImageButton4.Attributes.Add("onmouseout",
"src='images/join_button.png'");
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
}

protected void Button1_Click(object sender, EventArgs e)

SqlConnection con = new SqlConnection();


con.ConnectionString = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|
datadirectory|\database.mdf;Integrated Security=True;User Instance=True";
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = "select * from suseri where username='" +
TextBox1.Text + "'";
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
if (dr.HasRows)
{
while (dr.Read())
{
if (TextBox2.Text == dr["password"].ToString())
{
Session["username"] = TextBox1.Text;
Panel1.Visible = false;
Response.Redirect("afterlogin.aspx");
}
else
{
Label4.Text = "Please enter the correct password";
}
}
}
else
{

Label4.Text = "Please enter the correct username";

protected void Button2_Click1(object sender, EventArgs e)


{
if (TextBox3.Text == "")
{
}
else
{

ContentPlaceHolder1.Visible = false;
GridView1.Visible = true;
GridView2.Visible = false;
TextBox4.Text = "";

}
protected void Button3_Click(object sender, EventArgs e)
{
if (TextBox4.Text == "")
{ }
else
{
ContentPlaceHolder1.Visible = false;
GridView1.Visible = false;
GridView2.Visible = true;
TextBox3.Text = "";

}
}
protected void ImageButton2_Click(object sender, ImageClickEventArgs
e)

if (Session["username"] == null)
{
Panel1.Visible = false;
}
else
{
}

MasterPage.master
<%@ Master Language="C#" AutoEventWireup="true"
CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>

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


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Music Portal</title>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
<link rel="Stylesheet" type="text/css" href="StyleSheet.css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="styles.css" />
<script type="text/javascript">
var message="Sorry, right-click has been disabled";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")
function ig1_onclick() {
}
</script>
<script language="JavaScript" type="text/javascript"
src="Search_Suggest_TextBox/SearchSuggest.js">function cmdSearch_onclick() {
}
</script>

</head>
<body background="images/bg.jpg" style="background-repeat:no-repeat">
<form id="form1" runat="server">
<div>
<div style="background-color:#ffffff;height:150px;">
<div style="float:left; height: 104px; width: 317px;">
<asp:Image ID="Image1" runat="server" Height="99px"
ImageUrl="~/images/flogo1.gif" Width="298px" />
</div>
<asp:Panel ID="Panel1" runat="server">
<div style="float:right;"><br>
<asp:Label ID="Label1" runat="server" ForeColor="#C9015C" Text="Username"
Font-Size="Large"></asp:Label>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
<asp:Label ID="Label2" runat="server" ForeColor="#C9015C" Text="Password"
Font-Size="Large"></asp:Label>
<br />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:TextBox ID="TextBox2" runat="server"
TextMode="Password"></asp:TextBox><br/>
<asp:Label ID="Label4" runat="server" Text=""></asp:Label>
<br />
<asp:Button ID="Button1" runat="server" Text="Login"
BackColor="#C42B68"
ForeColor="Yellow" onclick="Button1_Click" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br/>
<asp:Label ID="Label3" runat="server" ForeColor="#C9015C"
Text="OR You Can Create New Account :" FontSize="Medium"></asp:Label>
&nbsp;&nbsp;&nbsp;<a href="signup.aspx"><asp:Image ID="Image2"
runat="server" Height="27px" ImageUrl="~/images/signupfree.jpg" Width="167px"
/></a>
</div></asp:Panel>
</div>
<hr>
<div><center style="margin-left: 40px">
<asp:ImageButton ID="ImageButton1" runat="server"
ImageUrl="~/images/home_button.png" onclick="ImageButton1_Click"
PostBackUrl="~/Default.aspx" />
&nbsp;&nbsp;
&nbsp;&nbsp;
&nbsp;&nbsp;
<asp:ImageButton ID="ImageButton2" runat="server"
ImageUrl="~/images/about_button.png"
onclick="ImageButton2_Click" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:ImageButton ID="ImageButton3" runat="server"
ImageUrl="~/images/contact_button.png"
PostBackUrl="~/contact.aspx" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:ImageButton ID="ImageButton4" runat="server"
ImageUrl="~/images/join_button.png" PostBackUrl="~/signup.aspx" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<br/>
<table>
<tr>
<td style="font: 20px arial" >
Search Music

</td>
</tr>
</table>
</center>
</div>
<asp:Label ID="Label6" runat="server" Font-Bold="True" Font-Size="Medium"
Height="27px" Text=" By Song Name" Width="113px"
BackColor="#C9015C"
ForeColor="Yellow"></asp:Label>
<asp:TextBox ID="TextBox4" runat="server" Height="26px"
Width="262px"></asp:TextBox>
<asp:Button ID="Button3" runat="server" onclick="Button3_Click"
Text="Search"
Height="29px" Width="80px" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
<asp:Label ID="Label5" runat="server" Font-Bold="True" FontSize="Medium"
Height="26px" Text="By Album Name" Width="132px"
BackColor="#C9015C"
ForeColor="Yellow"></asp:Label>
<asp:TextBox ID="TextBox3" runat="server" Height="27px"
Width="260px"></asp:TextBox>
<asp:Button ID="Button2" runat="server" Text="Search"
onclick="Button2_Click1" Height="29px" Width="82px" />
<hr/>
<center><asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False"
BackColor="#DEBA84" BorderColor="#DEBA84" BorderWidth="1px"
CellPadding="3" DataSourceID="SqlDataSource1" Visible="False"
Height="89px" Width="805px" BorderStyle="None"
CellSpacing="2">
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<Columns>
<asp:BoundField DataField="songname" HeaderText="songname"
SortExpression="songname" />
<asp:BoundField DataField="songaddress"
HeaderText="songaddress"
SortExpression="songaddress" Visible="False" />
<asp:BoundField DataField="album" HeaderText="album"
SortExpression="album" />
<asp:BoundField DataField="singer" HeaderText="singer"
SortExpression="singer" />
<asp:HyperLinkField DataNavigateUrlFields="songaddress"
Text="Play" />
</Columns>
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<PagerStyle ForeColor="#8C4510"
HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#738A9C" ForeColor="White" FontBold="True" />
<HeaderStyle BackColor="#A55129" Font-Bold="True"
ForeColor="White" />
</asp:GridView></center>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"

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


SelectCommand="SELECT [songname], [songaddress], [album],
[singer] FROM [albumupload] WHERE ([album] like '%'+@album+'%') ">
<SelectParameters>
<asp:ControlParameter ControlID="TextBox3" Name="album"
PropertyName="Text"
Type="String" DefaultValue = "%" />
</SelectParameters>
</asp:SqlDataSource>
<center><asp:GridView ID="GridView2" runat="server"
AutoGenerateColumns="False"
DataSourceID="SqlDataSource2" BackColor="#DEBA84"
BorderColor="#DEBA84" BorderWidth="1px" CellPadding="3"
Visible="False"
Width="808px" BorderStyle="None" CellSpacing="2">
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<Columns>
<asp:BoundField DataField="songname" HeaderText="songname"
SortExpression="songname" />
<asp:BoundField DataField="songaddress"
HeaderText="songaddress"
SortExpression="songaddress" Visible="False" />
<asp:HyperLinkField DataNavigateUrlFields="songaddress"
Text="Play" />
</Columns>
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<PagerStyle ForeColor="#8C4510"
HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#738A9C" ForeColor="White" FontBold="True" />
<HeaderStyle BackColor="#A55129" Font-Bold="True"
ForeColor="White" />
</asp:GridView>
</center>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [songname], [songaddress] FROM
[songupload] WHERE ([songname] like '%'+@songname+'%')">
<SelectParameters>
<asp:ControlParameter ControlID="TextBox4" Name="songname"
PropertyName="Text"
Type="String" DefaultValue = "%" />
</SelectParameters>
</asp:SqlDataSource>
<br />
&nbsp;&nbsp;&nbsp;

</div>

<br />

<div>

<br />
<br />
&nbsp;<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
<br/>
<hr/>
<div>
<center><font color="#C9015C"><p>
<a href="Default.aspx">Home</a> <span>|</span>
<a href="aboutus.aspx">About Us</a> <span>|</span>
<a href="signup.aspx">Join Us</a> <span>|</span>
<a href="terms_and_condition.aspx">Terms and Condition</a>
<span>|</span>
<a href="contact.aspx">Contact Us </a>
</p>
<p> &copy; 2012 Music Portal, LLC. All Rights Reserved.</p>
</font></center>
</div>
</div>
</form>

</body>
</html>

MasterPage2_user.master.cs
using
using
using
using
using
using
using
using
using
using
using
using

System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Xml.Linq;

public partial class MasterPage2_user : System.Web.UI.MasterPage


{
protected void Page_Load(object sender, EventArgs e)
{
ImageButton1.Attributes.Add("onmouseover",
"src='images/home_button1.png'");
ImageButton1.Attributes.Add("onmouseout",
"src='images/home_button.png'");

ImageButton2.Attributes.Add("onmouseover",
"src='images/about_button1.png'");
ImageButton2.Attributes.Add("onmouseout",
"src='images/about_button.png'");
ImageButton3.Attributes.Add("onmouseover",
"src='images/contact_button1.png'");
ImageButton3.Attributes.Add("onmouseout",
"src='images/contact_button.png'");
try
{
if (!IsPostBack)
{
if (Session["username"] != null)
{
Label1.Text = Session["username"].ToString();
LinkButton1.Text = "logout";
}
else
{
}

Response.Redirect("Default.aspx");

}
Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
}
catch
{
}
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
}
protected void Button2_Click1(object sender, EventArgs e)
{
if (TextBox3.Text == "")
{
}
else
{

ContentPlaceHolder1.Visible = false;
GridView1.Visible = true;
GridView2.Visible = false;
TextBox4.Text = "";

}
protected void Button3_Click(object sender, EventArgs e)
{

if (TextBox4.Text == "")
{ }
else
{
ContentPlaceHolder1.Visible = false;
GridView1.Visible = false;
GridView2.Visible = true;
TextBox3.Text = "";

}
}
protected void LinkButton1_Click1(object sender, EventArgs e)
{
Session.Abandon();
Session.RemoveAll();
Response.Redirect("Default.aspx");
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("userupload.aspx");
}
protected void LinkButton2_Click(object sender, EventArgs e)
{
Response.Redirect("user_Download.aspx");
}
protected void GridView1_RowCommand(object sender,
GridViewCommandEventArgs e)
{
Response.AddHeader("content-disposition", "attachment;filename=" +
e.CommandArgument);
Response.WriteFile(e.CommandArgument.ToString());
Response.End();
}
protected void GridView2_RowCommand(object sender,
GridViewCommandEventArgs e)
{
Response.AddHeader("content-disposition", "attachment;filename=" +
e.CommandArgument);
Response.WriteFile(e.CommandArgument.ToString());
Response.End();
}}

MasterPage2_user.master
<%@ Master Language="C#" AutoEventWireup="true"
CodeFile="MasterPage2_user.master.cs" Inherits="MasterPage2_user" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Music Portal</title>
<asp:ContentPlaceHolder id="head" runat="server">

</asp:ContentPlaceHolder>
<link rel="Stylesheet" type="text/css" href="StyleSheet.css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="styles.css" />
<script type="text/javascript">
var message="Sorry, right-click has been disabled";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")
function ig1_onclick() {
}
</script>
<script language="JavaScript" type="text/javascript"
src="Search_Suggest_TextBox/SearchSuggest.js">function cmdSearch_onclick() {
}
</script>

</head>
<body background="images/bg.jpg">
<form id="form1" runat="server">
<div>
<div style="background-color:#ffffff;height:150px;">
<div style="float:left; height: 104px; width: 317px;">
<asp:Image ID="Image1" runat="server" Height="99px"
ImageUrl="~/images/flogo1.gif" Width="298px" />
</div>
<br /> <br /> <br /> <br /> <br />
<br />
<asp:Label ID="Label2" runat="server" Text="Welcome " BackColor="#FFFFCC"
Font-Bold="True" Font-Size="Large" Height="34px"
Width="96px"></asp:Label>
<asp:Label ID="Label1" runat="server" BackColor="#FFFFCC" Font-Bold="True"
Font-Size="Large" Height="33px" Width="100px"></asp:Label>
<div style="float:right;">
<asp:LinkButton ID="LinkButton1"
runat="server" Font-Bold="True" Font-Size="Large" Height="31px"
Width="151px" onclick="LinkButton1_Click1">logout</asp:LinkButton>
</div>
</div>
<hr/>

<div><center style="margin-left: 40px">


<asp:ImageButton ID="ImageButton1" runat="server"
ImageUrl="~/images/home_button.png" onclick="ImageButton1_Click"
PostBackUrl="~/Default_user.aspx" />
&nbsp;&nbsp;
&nbsp;&nbsp;
&nbsp;&nbsp;
<asp:ImageButton ID="ImageButton2" runat="server"
ImageUrl="~/images/about_button.png"
PostBackUrl="~/about_user.aspx" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:ImageButton ID="ImageButton3" runat="server"
ImageUrl="~/images/contact_button.png"
PostBackUrl="~/contact_user.aspx" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<asp:LinkButton ID="LinkButton3" runat="server" onclick="LinkButton1_Click"


BackColor="Yellow" Font-Bold="True" Font-Size="Larger"
ForeColor="Red"
BorderStyle="Double" Width="183px" ToolTip="We Provide you a
platform by which you can upload your own Song.">Upload
Song</asp:LinkButton>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<asp:LinkButton ID="LinkButton2" runat="server" onclick="LinkButton2_Click"


BackColor="Yellow" Font-Bold="True" Font-Size="Larger"
ForeColor="Red"
BorderStyle="Double" Width="183px" ToolTip="We Provide you a
platform by which you can download your own Song.">Download
Song</asp:LinkButton>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<br/>
<table>
<tr>
<td style="font: 20px arial" >
Search Music
</td>
</tr>
</table>
</center>
</div>
<asp:Label ID="Label6" runat="server" Font-Bold="True" Font-Size="Medium"
Height="27px" Text=" By Song Name" Width="113px"
BackColor="#C9015C"
ForeColor="Yellow"></asp:Label>

<asp:TextBox ID="TextBox4" runat="server" Height="26px"


Width="262px"></asp:TextBox>
<asp:Button ID="Button3" runat="server" onclick="Button3_Click"
Text="Search"
Height="29px" Width="80px" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
<asp:Label ID="Label5" runat="server" Font-Bold="True" FontSize="Medium"
Height="26px" Text="By Album Name" Width="132px"
BackColor="#C9015C"
ForeColor="Yellow"></asp:Label>
<asp:TextBox ID="TextBox3" runat="server" Height="27px"
Width="260px"></asp:TextBox>
<asp:Button ID="Button2" runat="server" Text="Search"
onclick="Button2_Click1" Height="29px" Width="82px" />
<hr/>
<center><asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False"
BackColor="#DEBA84" BorderColor="#DEBA84" BorderWidth="1px"
CellPadding="3" DataSourceID="SqlDataSource1" Visible="False"
Height="89px" Width="805px" BorderStyle="None" CellSpacing="2"
onrowcommand="GridView1_RowCommand">
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<Columns>
<asp:BoundField DataField="songaddress"
HeaderText="songaddress"
SortExpression="songaddress" Visible="False" />
<asp:BoundField DataField="album" HeaderText="album"
SortExpression="album" />
<asp:BoundField DataField="singer" HeaderText="singer"
SortExpression="singer" />
<asp:HyperLinkField DataNavigateUrlFields="songaddress"
Text="Play" />
<asp:HyperLinkField DataNavigateUrlFields="songaddress"
Text="Download" />
</Columns>
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<PagerStyle ForeColor="#8C4510"
HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#738A9C" ForeColor="White" FontBold="True" />
<HeaderStyle BackColor="#A55129" Font-Bold="True"
ForeColor="White" />
</asp:GridView></center>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [songname], [songaddress], [album],
[singer] FROM [albumupload] WHERE ([album] like '%'+@album+'%') ">
<SelectParameters>
<asp:ControlParameter ControlID="TextBox3" Name="album"
PropertyName="Text"
Type="String" DefaultValue = "%" />
</SelectParameters>
</asp:SqlDataSource>

<center><asp:GridView ID="GridView2" runat="server"


AutoGenerateColumns="False"
DataSourceID="SqlDataSource2" BackColor="#DEBA84"
BorderColor="#DEBA84" BorderWidth="1px" CellPadding="3"
Visible="False"
Width="808px" BorderStyle="None" CellSpacing="2"
onrowcommand="GridView2_RowCommand">
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<Columns>
<asp:BoundField DataField="songname" HeaderText="songname"
SortExpression="songname" />
<asp:BoundField DataField="songaddress"
HeaderText="songaddress"
SortExpression="songaddress" Visible="False" />
<asp:HyperLinkField DataNavigateUrlFields="songaddress"
Text="Play" />
<asp:HyperLinkField DataNavigateUrlFields="songaddress"
Text="Download" />
</Columns>
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<PagerStyle ForeColor="#8C4510"
HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#738A9C" ForeColor="White" FontBold="True" />
<HeaderStyle BackColor="#A55129" Font-Bold="True"
ForeColor="White" />
</asp:GridView>
</center>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [songname], [songaddress] FROM
[songupload] WHERE ([songname] like '%'+@songname+'%')">
<SelectParameters>
<asp:ControlParameter ControlID="TextBox4" Name="songname"
PropertyName="Text"
Type="String" DefaultValue = "%" />
</SelectParameters>
</asp:SqlDataSource>
<br />
&nbsp;&nbsp;&nbsp;

</div>

<br />

<div>
<br />
<br />
&nbsp;<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>

<br/>
<hr/>
<div style="height:450px;width:1300px">
<center>
<div style="float:left;height:411px; width:300px;backgroundcolor:#ffffff;">
<h2>Most Popular</h2>
<h3>Albums:</h3>
<br/>
<table border="1">
<tr><td>
<asp:Image ID="Image2" runat="server" Height="129px"
ImageUrl="~/images/cocktail.jpg" Width="142px" /></td><td
class="style1"><h4>
Cocktail</h4>
<a href="cocktail_album.aspx"><asp:Image ID="Image7"
runat="server" Height="25px" ImageUrl="~/images/play_logo.png" Width="87px"
/></a>
</td></tr>
<tr><td>
<asp:Image ID="Image3" runat="server" Height="129px"
ImageUrl="~/images/ek-tha-tiger.jpg" Width="142px" /></td>
<td class="style1"><h4>Ek Tha Tiger</h4>
<a href="ekthatigersong.aspx"><asp:Image ID="Image8" runat="server"
Height="25px" ImageUrl="~/images/play_logo.png" Width="87px" /></td></tr></a>
</table>
</div>
<div style="float:left;height:411px; width:300px;backgroundcolor:#ffffff;">
<h2>Most Popular Punjabi</h2>
<h3>Albums:</h3>
<br/>
<table border="1">
<tr><td>
<asp:Image ID="Image4" runat="server" Height="129px"
ImageUrl="~/images/PropheC - Forever - Front.jpg" Width="142px"
/></td>
<td class="style2"><h4>Prophec - Forver</h4>
<a href="prophecsong.aspx"><asp:Image ID="Image9" runat="server"
Height="25px" ImageUrl="~/images/play_logo.png" Width="87px" /></td></tr></a>
<tr><td>
<asp:Image ID="Image5" runat="server" Height="129px"
ImageUrl="~/images/international villager.jpg" Width="142px"
/></td>
<td class="style2"><h4>International Villager</h4>
<a href="villagersong.aspx"><asp:Image ID="Image10" runat="server"
Height="25px" ImageUrl="~/images/play_logo.png" Width="87px" /></td></tr></a>
</table>
</div>
<div style="float:left;height:411px; width:330px;backgroundcolor:#ffffff;">
<h2>Most Popular English</h2>
<h3>Albums:</h3>
<br/>
<table border="1">

<tr><td>
<asp:Image ID="Image6" runat="server" Height="129px"
ImageUrl="~/images/justin-bieber-believe-album-cover-deluxe.jpg"
Width="142px" /></td><td><h4>Justin Bieber - Believe</h4>
<a href="believesong.aspx"><asp:Image ID="Image11" runat="server"
Height="25px" ImageUrl="~/images/play_logo.png" Width="87px" /></td></tr></a>
<tr><td>
<asp:Image ID="Image71" runat="server" Height="129px"
ImageUrl="~/images/Akon 2012 - Konkrete Jungle.jpg" Width="142px"
/></td><td>
<h4>Akon - Konkrete Jungle</h4>
<a href="konksong.aspx"><asp:Image ID="Image12" runat="server"
Height="25px" ImageUrl="~/images/play_logo.png" Width="87px" /></td></tr></a>
</table>
</div>
<div style="float:right;height:350px;width:350px;backgroundcolor:#ffffff;">
<h2>Advertisement</h2>
<script type="text/javascript"><!-google_ad_client="pub-7804285882870799";
google_ad_host="pub-1556223355139109";
google_ad_width=336;
google_ad_height=280;
google_ad_format="336x280_as";
google_ad_type="text_image";
google_ad_host_channel="0001+S0011+L0001";
google_color_border="FFFFFF";
google_color_bg="FFFFFF";
google_color_link="000000";
google_color_url="249FA3";
google_color_text="222222";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
</center>
</div>
<br/>
<hr/>
<div>
<center><font color="#C9015C"><p>
<a href="Default.aspx">Home</a> <span>|</span>
<a href="aboutus.aspx">About Us</a> <span>|</span>
<a href="signup.aspx">Join Us</a> <span>|</span>
<a href="terms_and_condition.aspx">Terms and Condition</a>
<span>|</span>
<a href="contact.aspx">Contact Us </a>
</p>
<p> &copy; 2012 Music Portal, LLC. All Rights Reserved.</p>
</font></center>
</div>
</div>
</form>

</body>
</html>

searchbar.aspx
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master"
AutoEventWireup="true" CodeFile="searchbar.aspx.cs" Inherits="searchbar"
Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataSourceID="SqlDataSource2"
onselectedindexchanged="GridView1_SelectedIndexChanged">
<Columns>
<asp:BoundField DataField="songname" HeaderText="songname"
SortExpression="songname" />
<asp:BoundField DataField="songaddress" HeaderText="songaddress"
SortExpression="songaddress" />
<asp:BoundField DataField="album" HeaderText="album"
SortExpression="album" />
<asp:BoundField DataField="singer" HeaderText="singer"
SortExpression="singer" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [songname], [songaddress], [album], [singer] FROM
[albumupload] WHERE ([songname] = @songname)">
<SelectParameters>
<asp:SessionParameter Name="songname" SessionField="search"
Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</asp:Content>

signup.aspx.cs
using
using
using
using
using
using
using
using
using

System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;

using
using
using
using

System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;
System.Data.SqlClient;

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


{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void CustomValidator1_ServerValidate1(object source,
ServerValidateEventArgs args)
{
SqlConnection con = new SqlConnection();
con.ConnectionString = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|
datadirectory|\database.mdf;Integrated Security=True;User Instance=True";
SqlCommand objcmd = new SqlCommand("Select * from suseri where
username='" + args.Value + "'", con);
SqlDataReader objReader;
con.Open();
objReader = objcmd.ExecuteReader();

if (objReader.HasRows)
{
args.IsValid = false;
}
else
{
args.IsValid = true;
}
con.Close();

protected void CustomValidator1_ServerValidate(object source,


ServerValidateEventArgs args)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
if (!Page.IsValid)
{
return;
}
if (TextBox7.Text == Session["randomstr"].ToString())
{
Label8.ForeColor = System.Drawing.Color.Green;
Label8.Text = "Ok";
SqlConnection con = new SqlConnection();

con.ConnectionString = @"Data
Source=.\SQLEXPRESS;AttachDbFilename=|datadirectory|\database.mdf;Integrated
Security=True;User Instance=True";
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "dbo.StoredProcedure1";
cmd.Parameters.AddWithValue("username", TextBox6.Text);
cmd.Parameters.AddWithValue("password", TextBox1.Text);
cmd.Parameters.AddWithValue("confirm", TextBox2.Text);
cmd.Parameters.AddWithValue("email", TextBox3.Text);
cmd.Parameters.AddWithValue("question", TextBox4.Text);
cmd.Parameters.AddWithValue("answer", TextBox5.Text);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
Response.Redirect("aftersignup.aspx");

}
else
{

Label8.ForeColor = System.Drawing.Color.Red;
Label8.Text = "try again";
}

}
}

signup.aspx
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master"
AutoEventWireup="true" CodeFile="signup.aspx.cs" Inherits="Default2" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<center>
<asp:Panel ID="Panel1" runat="server">
<table id="t1" runat="server" bgcolor="#FFCC00" border="0"
style="vertical-align: 0%; height: 489px;width:900px;">
<tr ><th colspan=2 bgcolor="#CC0000">
<asp:Label ID="Label7" runat="server"
Text="Sign Up For New Account"
BackColor="#FFCC00"></asp:Label></th></tr>
<tr><td> <asp:Label ID="Label1" runat="server" Text="Username"></asp:Label>
</td><td>&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox6" runat="server"
></asp:TextBox>

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


ControlToValidate="TextBox6" ErrorMessage="UserName Already In
Use"

onservervalidate="CustomValidator1_ServerValidate1"
ValidationGroup="v">**</asp:CustomValidator>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server"
ControlToValidate="TextBox6" ErrorMessage="Enter the user name"
ValidationGroup="v">**</asp:RequiredFieldValidator>
</td></tr>
<tr><td><asp:Label ID="Label2" runat="server"
Text="Password"></asp:Label></td><td>
<asp:TextBox ID="TextBox1" runat="server" style="margin-bottom: 0px"
TextMode="Password" MaxLength="20"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2"
runat="server"
ControlToValidate="TextBox1" ErrorMessage="Enter the password"
ValidationGroup="v">**</asp:RequiredFieldValidator>
</td></tr>
<tr><td><asp:Label ID="Label3" runat="server" Text="Confirm
Password"></asp:Label></td><td>
<asp:TextBox ID="TextBox2"
runat="server" TextMode="Password"></asp:TextBox>
<asp:CompareValidator ID="CompareValidator1" runat="server"
ControlToCompare="TextBox1" ControlToValidate="TextBox2"
ErrorMessage="Password does not match"
ValidationGroup="v">**</asp:CompareValidator>
</td></tr>
<tr><td><asp:Label ID="Label4" runat="server"
Text="Email"></asp:Label></td><td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:TextBox
ID="TextBox3"
runat="server"></asp:TextBox>
<asp:CustomValidator ID="CustomValidator2" runat="server"
ControlToValidate="TextBox3" ErrorMessage="CustomValidator"
ValidationGroup="v">**</asp:CustomValidator>
<asp:RequiredFieldValidator ID="RequiredFieldValidator5"
runat="server"
ControlToValidate="TextBox3" ErrorMessage="Enter the email"
ValidationGroup="v">**</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1"
runat="server"
ControlToValidate="TextBox3" ErrorMessage="Enter valid email
id"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+
([-.]\w+)*"
ValidationGroup="v">**</asp:RegularExpressionValidator>
</td></tr>
<tr><td><asp:Label ID="Label5" runat="server" Text="Security
Question"></asp:Label></td><td><asp:TextBox ID="TextBox4"
runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3"
runat="server"
ControlToValidate="TextBox4" ErrorMessage=" Enter the Security
question"
ValidationGroup="v">**</asp:RequiredFieldValidator>
</td></tr>

<tr><td><asp:Label ID="Label6" runat="server" Text="Security


Answer"></asp:Label></td><td><asp:TextBox ID="TextBox5"
runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4"
runat="server"
ControlToValidate="TextBox5" ErrorMessage="Enter the Security
answer"
ValidationGroup="v">**</asp:RequiredFieldValidator>
</td></tr>
<tr><td><asp:Image ID="img" runat="server"
ImageUrl="~/capture.aspx" /></td><td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:TextBox ID="TextBox7" runat="server"
ValidationGroup="v"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator6"
runat="server"
ControlToValidate="TextBox7" ErrorMessage="Enter the
correct info"
ValidationGroup="v">**</asp:RequiredFieldValidator>
<asp:Label ID="Label8" runat="server"></asp:Label>
</td></tr>
<tr><td colspan=2>
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
ValidationGroup="v" />
</td></tr>

<tr><td colspan=2 bgcolor="Black" align="center">


<asp:Button ID="Button1" runat="server" Text="Create User"
onclick="Button1_Click" ValidationGroup="v" />
</td></tr>
</table>
</asp:Panel>
<br />
</center>
</asp:Content>
<asp:Content ID="Content1" runat="server" contentplaceholderid="head">
<style type="text/css">
#t1
{
height: 372px;
width: 671px;
}
</style>
</asp:Content>

uploadsong.aspx.cs
using System;
using System.Collections;

using
using
using
using
using
using
using
using
using
using
using
using

System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;
System.IO;
System.Data.SqlClient;

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


{
SqlConnection con = new SqlConnection();
protected void Page_Load(object sender, EventArgs e)
{
con.ConnectionString = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|
datadirectory|\database.mdf;Integrated Security=True;User Instance=True";
}
protected void Repeater1_ItemCommand(object source,
RepeaterCommandEventArgs e)
{
Response.AddHeader("content-disposition", "attachment;filename=" +
e.CommandArgument);
Response.WriteFile(e.CommandArgument.ToString());
Response.End();
}
static int i = 0;
public void getval()
{
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = "select count(id_no) from songupload";
con.Open();
i = Convert.ToInt32(cmd.ExecuteScalar());
con.Close();
//return i;

}
public void show()
{

SqlDataAdapter ad = new SqlDataAdapter("select * from songupload where


id_no=" + i, con);
DataTable dt = new DataTable();
ad.Fill(dt);
rp.DataSource = dt;
rp.DataBind();

}
protected void Button1_Click1(object sender, EventArgs e)

{
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
if (FileUpload1.HasFile)
{
string ext = Path.GetExtension(FileUpload1.FileName);
if ((ext == ".mp3") || (ext == ".wma"))
{
FileUpload1.SaveAs(Server.MapPath("~\\upload\\") +
FileUpload1.FileName);
cmd.CommandText = "insert into
songupload(songname,songaddress,uploadby)
values(@songname,@songaddress,@uploadby)";
cmd.Parameters.AddWithValue("@songname",
FileUpload1.FileName);
cmd.Parameters.AddWithValue("@songaddress", "~\\upload\\" +
FileUpload1.FileName);
cmd.Parameters.AddWithValue("@uploadby", Session["username"]);
con.Open();
try
{
int i = 0;
i = cmd.ExecuteNonQuery();
if (i > 0)
{
show();
}
Label1.Text = "mp3 Upload";
}
catch (Exception ex)
{
Label1.Text = "U Must Login first";
}
//}
con.Close();
show();

}
else
{
}

Label1.Text = "Please select any file";

}
}

protected void LinkButton1_Click(object sender, EventArgs e)


{
Response.Redirect("uploadsong.aspx");
}
protected void LinkButton2_Click(object sender, EventArgs e)
{

Response.Redirect("admin_users_view.aspx");
}
protected void LinkButton3_Click(object sender, EventArgs e)
{
Response.Redirect("albumupload.aspx");
}
protected void LinkButton4_Click(object sender, EventArgs e)
{
Response.Redirect("show_all_albums.aspx");
}
protected void LinkButton5_Click(object sender, EventArgs e)
{
Session.Abandon();
Session.RemoveAll();
Response.Redirect("adminlogin.aspx");
}

uploadsong.aspx
<%@ Page Language="C#" MasterPageFile="~/MasterPage3_admin.master"
AutoEventWireup="true" CodeFile="uploadsong.aspx.cs" Inherits="Default3" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:Panel ID="Panel1" runat="server" Visible="True">
<asp:Label ID="Label5" runat="server" Text="Welcome " BackColor="#FFFFCC"
Font-Bold="True" Font-Size="Large" Height="34px"
Width="96px"></asp:Label>
<asp:Label ID="Label6" runat="server" BackColor="#FFFFCC" Font-Bold="True"
Font-Size="Large" Height="33px" Width="100px">Admin</asp:Label>
<div style="float:right;">
<asp:LinkButton ID="LinkButton5"
runat="server" Font-Bold="True" Font-Size="Large" Height="31px"
Width="151px" onclick="LinkButton5_Click" >logout</asp:LinkButton>
</div>
</asp:Panel>
<div>
<asp:LinkButton ID="LinkButton1" runat="server"
onclick="LinkButton1_Click"
BackColor="Yellow" Font-Bold="True" Font-Size="Larger"
ForeColor="Red"
BorderStyle="Double" Width="183px">Upload
Song</asp:LinkButton>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:LinkButton ID="LinkButton2" runat="server"
onclick="LinkButton2_Click"
BackColor="Yellow" Font-Bold="True" Font-Size="Larger"
ForeColor="Red"
BorderStyle="Double" Width="181px">View
Users</asp:LinkButton>

&nbsp;&nbsp;&nbsp;&nbsp;

<asp:LinkButton ID="LinkButton3" runat="server"


BackColor="Yellow" Font-Bold="True"
Font-Size="Larger" ForeColor="Red" BorderStyle="Double"
Width="182px"
onclick="LinkButton3_Click">Upload Album</asp:LinkButton>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:LinkButton ID="LinkButton4" runat="server" BackColor="Yellow"
Font-Bold="True" Font-Size="Larger" ForeColor="Red"
BorderStyle="Double" Width="181px"
onclick="LinkButton4_Click">Show All Albums</asp:LinkButton>
<br />
</div>
<div>
<asp:FileUpload ID="FileUpload1" runat="server" />

<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server"
ControlToValidate="FileUpload1" ErrorMessage="Please select some
file"
ValidationGroup="v"></asp:RequiredFieldValidator>

<br />
<asp:Label ID="Label1" runat="server"></asp:Label>
<br />
<asp:Button ID="Button1" runat="server" Text="Upload" Width="121px"
onclick="Button1_Click1" ValidationGroup="v" />

<asp:Repeater runat="server" ID="rp">


<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<table>
<tr><td><asp:LinkButton ID="LinkButton1" runat="server" Text='<
%#Eval("songaddress") %>'></asp:LinkButton></td></tr>
<tr><td><asp:Label ID="Label1" runat="server" Text='<%#Eval("songname")
%>'></asp:Label></td></tr>
<tr><td><video src= '<%#Eval("songname") %>' width="320" height="240" controls
="autobuffer"></video> </td></tr>
<tr><td><asp:Label ID="Label5" runat="server" Text='<%#Eval("likes")
%>'></asp:Label>
&nbsp; &nbsp;<asp:Label ID="Label4" runat="server"
Text="likes"></asp:Label></td></tr>

</table>
</ItemTemplate>
</asp:Repeater>
<br />
<center>
<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False"
DataSourceID="SqlDataSource1" BackColor="#DEBA84"
BorderColor="#DEBA84" BorderWidth="1px" CellPadding="3"
BorderStyle="None" CellSpacing="2" Width="1085px">
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<Columns>
<asp:BoundField DataField="id_no" HeaderText="id_no"
InsertVisible="False"
ReadOnly="True" SortExpression="id_no" />
<asp:BoundField DataField="songname" HeaderText="songname"
SortExpression="songname" />
<asp:BoundField DataField="songaddress"
HeaderText="songaddress"
SortExpression="songaddress" />
<asp:BoundField DataField="uploadby" HeaderText="uploadby"
SortExpression="uploadby" />
<asp:HyperLinkField DataNavigateUrlFields="songaddress"
Text="Play" />
</Columns>
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<PagerStyle ForeColor="#8C4510"
HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#738A9C" ForeColor="White" FontBold="True" />
<HeaderStyle BackColor="#A55129" Font-Bold="True"
ForeColor="White" />
</asp:GridView>
</center>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT * FROM [songupload]"></asp:SqlDataSource>
</div>
</asp:Content>

user_Download.aspx.cs
using
using
using
using
using
using
using

System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;

using
using
using
using
using

System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;

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


{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void GridView1_RowCommand(object sender,
GridViewCommandEventArgs e)
{
}
protected void GridView2_RowCommand(object sender,
GridViewCommandEventArgs e)
{
Response.AddHeader("content-disposition", "attachment;filename=" +
e.CommandArgument);
Response.WriteFile(e.CommandArgument.ToString());
Response.End();
}

user_Download.aspx3
<%@ Page Language="C#" MasterPageFile="~/MasterPage2_user.master"
AutoEventWireup="true" CodeFile="user_Download.aspx.cs"
Inherits="user_Download" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<div style="background-color:White;height:1000px;">
<div>

<br />
<br />
<div><center><div style="float:left;">
<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False"
DataSourceID="SqlDataSource2" EnableViewState="False"
style="margin-top: 0px" BackColor="#DEBA84" BorderColor="#DEBA84"
BorderWidth="1px" CellPadding="3" BorderStyle="None"
CellSpacing="2"
Width="903px">

<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />


<Columns>
<asp:BoundField DataField="songname" HeaderText="songname"
SortExpression="songname" />
<asp:BoundField DataField="songaddress"
HeaderText="songaddress"
SortExpression="songaddress" Visible="False" />
<asp:HyperLinkField DataNavigateUrlFields="songaddress"
Text="Play" />
</Columns>
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<PagerStyle ForeColor="#8C4510"
HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#738A9C" ForeColor="White" FontBold="True" />
<HeaderStyle BackColor="#A55129" Font-Bold="True"
ForeColor="White" />
</asp:GridView>
</div>
<div style="float:left;">
<asp:GridView ID="GridView2" runat="server"
AutoGenerateColumns="False"
BackColor="#DEBA84" BorderColor="#DEBA84" BorderWidth="1px"
CellPadding="3" DataSourceID="SqlDataSource3"
onrowcommand="GridView2_RowCommand" BorderStyle="None"
CellSpacing="2"
Width="276px">
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<Columns>
<asp:BoundField DataField="songaddress"
HeaderText="songaddress"
SortExpression="songaddress" Visible="False" />
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="lb" runat="server" Text="Download"
CommandArgument='<%# Eval("songaddress") %>'></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<PagerStyle ForeColor="#8C4510"
HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#738A9C" ForeColor="White" FontBold="True" />
<HeaderStyle BackColor="#A55129" Font-Bold="True"
ForeColor="White" />
</asp:GridView>
</div></center></div>
<br/><br /><br />
<asp:SqlDataSource ID="SqlDataSource3" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [songaddress] FROM [songupload]">
</asp:SqlDataSource>
<br />

<br />
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [songname], [songaddress] FROM
[songupload]">
</asp:SqlDataSource>
</div></div>
</asp:Content>

viewusers.aspx.cs
using
using
using
using
using
using
using
using
using
using
using
using

System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;

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


{
protected void Page_Load(object sender, EventArgs e)
{
try
{
if (!IsPostBack)
{
if (Session["username"] != null)
{
Label1.Text = Session["username"].ToString();
LinkButton1.Text = "logout";
}
else
{
}

Response.Redirect("Default.aspx");

}
Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
}
catch
{
}
}

viewusers.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="viewusers.aspx.cs"
Inherits="viewusers" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label2" runat="server" Text="Username"></asp:Label>
<asp:Label ID="Label1" runat="server"></asp:Label>
<asp:LinkButton ID="LinkButton1"
runat="server">LinkButton</asp:LinkButton>
<br />
<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False"
DataSourceID="SqlDataSource1">
<Columns>
<asp:BoundField DataField="username" HeaderText="username"
SortExpression="username" />
<asp:BoundField DataField="password" HeaderText="password"
SortExpression="password" />
<asp:BoundField DataField="confirm" HeaderText="confirm"
SortExpression="confirm" />
<asp:BoundField DataField="email" HeaderText="email"
SortExpression="email" />
<asp:BoundField DataField="question" HeaderText="question"
SortExpression="question" />
<asp:BoundField DataField="answer" HeaderText="answer"
SortExpression="answer" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT * FROM [suseri]"></asp:SqlDataSource>
<br />
</div>
</form>
</body>
</html>

8. Future scope
This project was developed to fulfill user requirement; however there
are lots of scope to improve in the area of user interface, database
performance, and query processing time. Etc.
So there are many things for future enhancement of this project. The
future enhancements that are possible in the project are as follows.
Project can become more powerful with the inclusion of services
like comments.
In the area of data security and system security.
Provide more online tips and help.
To optimize the query which is embedded in the system

9. SCREEN SHOTS
1. Homepage :

2. About Us :

3. Signup :

4. Login :

5. User Home :

6. Upload :

7. Download Song :

8. Search Song:

9. Play Song:

10.

Search Album by Name :

11.

Search and Download Song :

12.

Advertisement :

13.

Popular Albums :

14.

Admin Login :

15.

Admin Home :

16.

Upload Album :

17.

Show all albums :

18.

Terms And Conditions :

19.

Admin view to users:

20.

Contact Information :

10. BIBLIOGRAPHY

Websites
Following websites are referring to create this project reports.
http://www.codeproject.com
http://www.msdn.microsoft.com/en-us/library/.aspx
http://www .forums.asp.net/
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite
Books
Following books and ebook are used to complete this project reports.
Mastering C# (Paperback)
SQL Server Bible (Paperback)
.NET Black Book (Paperback)
Professional C#, 2nd Edition (Paperback)
Professional ASP.NET (Paperback)
MCAD/MCSD Self-Paced Training Kit: Developing Web
Applications with Microsoft Visual Basic .NET and
Microsoft Visual C# .NET, Second Edition

MCAD/MCSE/MCDBA Self-Paced Training Kit: Microsoft SQL


Server 2000 Database Design and Implementation, Exam 70-229,
Second Edition

Вам также может понравиться