Login - Aspx: Doctype HTML Head Title Title Meta Meta Meta

You might also like

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

Login.

aspx

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="login.aspx.vb"


Inherits="WebApplication1.WebForm1" %>

<!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>
<title>Modern an Admin Panel Category Flat Bootstarp Resposive Website Template | Login ::
w3layouts</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Modern Responsive web template, Bootstrap Web Templates,
Flat Web Templates, Andriod Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson,
Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function()
{ setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css' />
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<link href="css/font-awesome.css" rel="stylesheet">
<!-- jQuery -->
<script src="js/jquery.min.js"></script>
<!----webfonts--->
<link href='http://fonts.googleapis.com/css?family=Roboto:400,100,300,500,700,900'
rel='stylesheet' type='text/css'>
<!---//webfonts--->
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</head>
<body id="login">
<h2 class="form-heading" style="font-style: italic; font-size: xx-large; font-family:
Haettenschweiler">ADMIN</h2>
<h2 class="form-heading">login</h2>
<div class="app-cam">
<form runat="server">
<asp:TextBox ID="user" runat="server"></asp:TextBox>
<asp:TextBox ID="password" runat="server" ClientIDMode="AutoID"
TextMode="Password"></asp:TextBox>
<div class="submit">
<asp:Button ID="btnsub" runat="server" Text="SUBMIT" /></div>
</form>
</div>
</body>
</html>

Login.aspx.vb
Imports System.Data
Imports System.Data.SqlClient
Public Class WebForm1
Inherits System.Web.UI.Page
Dim cn As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\MY
PC\Desktop\Solution2\WebApplication1\App_Data\Database1.mdf;Integrated Security=True;User
Instance=True")
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
cn.Open()
End Sub

Protected Sub btnsub_Click(ByVal sender As Object, ByVal e As EventArgs) Handles


btnsub.Click
Dim str As String
str = "select * from tbladmin where username = '" + user.Text + "'and password ='" +
password.Text + "'"
Session("uname") = user.Text
Dim da As New SqlDataAdapter(str, cn)
Dim ds As New DataSet
da.Fill(ds)
If (ds.Tables(0).Rows.Count <> 0) Then
Response.Redirect("home.aspx")
Else
MsgBox("USERNAME OR PASSWORD INCORRECT")
End If
End Sub
End Class

Site2.master
<%@ Master Language="VB" AutoEventWireup="false" CodeBehind="Site2.master.vb"
Inherits="WebApplication1.Site2" %>

<!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>
<title>Modern an Admin Panel Category Flat Bootstarp Resposive Website Template | Home ::
w3layouts</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Modern Responsive web template, Bootstrap Web Templates,
Flat Web Templates, Andriod Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson,
Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function()
{ setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css' />
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<!-- Graph CSS -->
<link href="css/lines.css" rel='stylesheet' type='text/css' />
<link href="css/font-awesome.css" rel="stylesheet">
<!-- jQuery -->
<script src="js/jquery.min.js"></script>
<!----webfonts--->
<link href='http://fonts.googleapis.com/css?family=Roboto:400,100,300,500,700,900'
rel='stylesheet' type='text/css'>
<!---//webfonts--->
<!-- Nav CSS -->
<link href="css/custom.css" rel="stylesheet">
<!-- Metis Menu Plugin JavaScript -->
<script src="js/metisMenu.min.js"></script>
<script src="js/custom.js"></script>
<!-- Graph JavaScript -->
<script src="js/d3.v3.js"></script>
<script src="js/rickshaw.js"></script>
</head>
<body>
<div id="wrapper">
<!-- Navigation -->
<nav class="top1 navbar navbar-default navbar-static-top" role="navigation"
style="margin-bottom: 0">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-
target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="home.aspx">UNIVERSAL DIRECTORY</a>
</div>
<!-- /.navbar-header -->
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle avatar" data-
toggle="dropdown"><img src="images/pic1.png"></a>
<ul class="dropdown-menu">
<li class="dropdown-menu-header text-center">
<strong>Settings</strong>
</li>

<li class="m_2"><a href="changepass.aspx"><i


class="fa fa-wrench"></i> Change Password</a></li>
<li class="divider"></li>
<li class="m_2"><a href="logout.aspx"><i
class="fa fa-lock"></i> Logout</a></li>
</ul>
</li>
</ul>
<div class="navbar-default sidebar" role="navigation">
<div class="sidebar-nav navbar-collapse">
<ul class="nav" id="side-menu">
<li>
<a href="home.aspx"><i class="fa fa-dashboard fa-fw
nav_icon"></i>DASHBOARD</a>
</li>
<li>
<a href="allshopsdetails.aspx"><i class="fa fa-indent nav_icon"></i>ALL
SHOPS DETAILS</a>
</li>
<li>
<a href="companyedit.aspx"><i class="fa fa-indent nav_icon"></i>EDIT USER
DETAILS</a>
</li>
<li>
<a href="adminadd.aspx"><i class="fa fa-indent nav_icon"></i>ADD NEW
ADMIN</a>
</li>
</ul>
</div>
<!-- /.sidebar-collapse -->
</div>
<!-- /.navbar-static-side -->
</nav>
<div id="page-wrapper">
<div class="graphs">
<div class="col_3">
<div class="clearfix">

<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">


</asp:ContentPlaceHolder>
</div>
</div>
</div>
</div>
<!-- /#page-wrapper -->
</div>
<!-- /#wrapper -->
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
Logout.aspx.vb

Public Class logout


Inherits System.Web.UI.Page

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


Me.Load
Session("uname") = ""
Response.Redirect("login.aspx")
End Sub

End Class

Addadmin.aspx

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site2.Master"


CodeBehind="adminadd.aspx.vb" Inherits="WebApplication1.adminadd" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div>
<form runat="server">
<table>
<tr>
<td>username</td>
<td><asp:TextBox ID="txtusername" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>password</td>
<td><asp:TextBox ID="txtpassword" runat="server"
TextMode="Password"></asp:TextBox></td>
</tr>
<tr>
<td></td>
<td>
<asp:Button ID="btnsubmit" runat="server" Text="SUBMIT" />
</td>
</tr>
</table>
</form>
</div>
</asp:Content>

Addadmin.aspx.vb

Imports System.Data.SqlClient

Public Class adminadd


Inherits System.Web.UI.Page
Dim cn As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\MY
PC\Desktop\Solution2\WebApplication1\App_Data\Database1.mdf;Integrated Security=True;User
Instance=True")
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
If Session("uname") = "" Then
Response.Redirect("login.aspx")
End If
cn.Open()
txtpassword.Attributes("value") = txtpassword.Text
End Sub

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


btnsubmit.Click
Dim str As String
str = "insert into tbladmin(username,password) values('" & txtusername.Text & "','" &
txtpassword.Text & "')"
Dim cmd As New SqlCommand(str, cn)
cmd.ExecuteNonQuery()
End Sub
End Class

Allshopdetails.aspx

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site2.Master"


CodeBehind="allshopsdetails.aspx.vb" Inherits="WebApplication1.WebForm2" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:DataList ID="productlist" runat="server" RepeatDirection="Horizontal"
RepeatColumns="3" Width="100%" SelectedItemStyle-BackColor="#66FFFF"
SelectedItemStyle-BorderStyle="Double" SeparatorStyle-BorderStyle="Double"
SeparatorStyle-BorderColor="#CC9900" SeparatorStyle-BorderWidth="3"
GridLines="Both" HorizontalAlign="Justify">
<HeaderTemplate>
<div style="font-family: 'AR ESSENCE'; font-size: large; font-weight: bolder; color: #9900FF;
text-decoration: blink">
ALL SHOPS
</div>
</HeaderTemplate>
<ItemTemplate>
<table>
<tr>
<td>
<asp:Label ID="lshopname" runat="server" Text='<%#Eval("shopname") %>'
Font-Bold="True" Font-Underline="True"></asp:Label>
</td>
</tr>
<tr align="justify">
<td align="center">

<asp:HyperLink ID="p1" runat="server" NavigateUrl='<%#


Eval("shopid","details.aspx?Id={0}") %>'>
<asp:Image ID="imgphoto" runat="server" Height="100px" Width="100px"
ImageUrl='<%# "img\" + Eval("picture") %>' AlternateText='<%#Eval("shopname") %>' />
</asp:HyperLink>

</td>
</tr>
<tr>
<td>
Catagory = <asp:Label ID="lcatagory" runat="server" Text='<%#Eval("catagory")
%>'></asp:Label>
</td>
</tr>
<tr>
<td>
Address = <asp:Label ID="laddress" runat="server" Text='<%#Eval("address")
%>'></asp:Label>
</td>
</tr>
<tr>
<td align="center">
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%#
Eval("shopid","details.aspx?Id={0}") %>'>
know more.....
</asp:HyperLink>
<hr />
</td>
</tr>

</table>
</ItemTemplate>

<SelectedItemStyle BackColor="#66FFFF" BorderStyle="Double"></SelectedItemStyle>

<SeparatorStyle BorderColor="#CC9900" BorderWidth="3px" BorderStyle="Double"


BackColor="#66FF33" Font-Bold="True" Font-Italic="True"
HorizontalAlign="Justify"></SeparatorStyle>
</asp:DataList>
</asp:Content>

Allshopdetails.aspx.vb

Imports System.Data.SqlClient

Public Class WebForm2


Inherits System.Web.UI.Page
Dim cnn As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\MY
PC\Desktop\Solution2\WebApplication1\App_Data\Database1.mdf;Integrated Security=True;User
Instance=True")
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
If Session("uname") = "" Then
Response.Redirect("login.aspx")
End If
cnn.Open()
If Page.IsPostBack = False Then
ProdFill()
End If
End Sub

Sub ProdFill()
Dim str As String
str = "select * from tblshop"
Dim cmd As New SqlCommand(str, cnn)
Dim ds As New DataSet
Dim da As New SqlDataAdapter(cmd)
da.Fill(ds)
productlist.DataSource = ds
productlist.DataBind()
End Sub
End Class

Changepass.aspx

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site2.Master"


CodeBehind="changepass.aspx.vb" Inherits="WebApplication1.changepass" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<form id="form1" runat="server">
ENTER PASSWORD :<asp:TextBox ID="p1" runat="server"></asp:TextBox><br />
RE-ENTER PASSWORD :<asp:TextBox ID="p2" runat="server"></asp:TextBox><br />
ENTER USERNAME :<asp:TextBox ID="u1" runat="server"></asp:TextBox><br />
<br /><br />
<asp:Button ID="btnsub" runat="server" Text="CHANGE PASSWORD" />
</form>
</asp:Content>

Changepass.aspx.vb

Imports System.Data.SqlClient

Public Class changepass


Inherits System.Web.UI.Page
Dim cn As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\MY
PC\Desktop\Solution2\WebApplication1\App_Data\Database1.mdf;Integrated Security=True;User
Instance=True")
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
If Session("uname") = "" Then
Response.Redirect("login.aspx")
End If
cn.Open()
End Sub

Protected Sub btnsub_Click(ByVal sender As Object, ByVal e As EventArgs) Handles


btnsub.Click
If p1.Text = p2.Text Then
Dim str As String
str = "update tbladmin set password = '" & p1.Text & "' where username = '" & u1.Text &
"'"
Dim cmd As New SqlCommand(str, cn)
cmd.ExecuteNonQuery()
End If
End Sub
End Class

Companyedit.aspx

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site2.Master"


CodeBehind="companyedit.aspx.vb" Inherits="WebApplication1.companyedit" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<form runat="server">
<asp:GridView ID="citygrid" runat="server" AllowPaging="true" DataKeyNames="clientid"
AutoGenerateColumns="false" Width="100%">
<Columns>
<asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="lbl1" runat="server" Text="OPTION"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:LinkButton ID="btndel" runat="server"
CommandName="delete">delete</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="lbl2" runat="server" Text="CLIENT ID"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblclientid" runat="server" Text='<%#Eval("clientid")
%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="lbl3" runat="server" Text="CLIENT NAME"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblclientusername" runat="server" Text='<%#Eval("clientusername")
%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="lbl4" runat="server" Text="EMAIL"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblemailid" runat="server" Text='<%#Eval("emailid")
%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="lbl5" runat="server" Text="MOBILE"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblmobile" runat="server" Text='<%#Eval("mobile")
%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="lbl6" runat="server" Text="FNAME"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblfname" runat="server" Text='<%#Eval("fname")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="lbl7" runat="server" Text="LNAME"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lbllname" runat="server" Text='<%#Eval("lname")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</form>
</asp:Content>

Companyedit.aspx.vb

Imports System.Data.SqlClient

Public Class companyedit


Inherits System.Web.UI.Page
Dim cnn As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\MY
PC\Desktop\Solution2\WebApplication1\App_Data\Database1.mdf;Integrated Security=True;User
Instance=True")
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
If Session("uname") = "" Then
Response.Redirect("login.aspx")
End If
cnn.Open()
If Page.IsPostBack = False Then
gridfill()
End If
End Sub
Protected Sub citygrid_PageIndexChanging(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewPageEventArgs) Handles citygrid.PageIndexChanging
Try
If (cnn.State = ConnectionState.Closed) Then
cnn.Open()
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
citygrid.PageIndex = e.NewPageIndex
gridfill()
End Sub

Sub gridfill()
Dim str As String
str = "select * from tblclient"
Dim cmd As New SqlCommand(str, cnn)
Dim ds As New DataSet
Dim da As New SqlDataAdapter(cmd)
da.Fill(ds)
citygrid.DataSource = ds
citygrid.DataBind()
End Sub

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


System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles citygrid.RowDeleting
Try
If (cnn.State = ConnectionState.Closed) Then
cnn.Open()
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
Dim lbl As Integer
lbl = e.Keys(0)
Dim str As String
str = "DELETE FROM tblclient where clientid=" & lbl
Dim str1 As String
str1 = "DELETE FROM tblshop where clientid=" & lbl
Dim cmd As New SqlCommand(str, cnn)
cmd.ExecuteNonQuery()
Dim cmd1 As New SqlCommand(str1, cnn)
cmd1.ExecuteNonQuery()
gridfill()
End Sub

End Class
Details.aspx

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site2.Master"


CodeBehind="details.aspx.vb" Inherits="WebApplication1.details" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<table>
<tr>
<td>
<div style="line-height: normal; vertical-align: middle; text-align: justify; height:30px; font-
family: 'AR CENA'; font-size: x-large; font-weight: 900; font-style: normal; font-variant: normal;
text-transform: none; color: #0000FF;">
<asp:Label ID="shopname" runat="server"></asp:Label>
</div>
</td>
</tr>
<tr>
<td>
<asp:Image ID="picture" runat="server" Height="300" Width="300" />
</td>
<td style="width: 1137px">
<div>
<div style="line-height: normal; vertical-align: middle; text-align: justify;
height:30px">
<asp:Label ID="catagory" runat="server"></asp:Label><br />
</div>
<div style="line-height: normal; vertical-align: middle; text-align: justify;
height:30px">
ADDRESS :- <asp:Label ID="address" runat="server"></asp:Label><br />
</div>
<div style="line-height: normal; vertical-align: middle; text-align: justify;
height:30px">
STATE :- <asp:Label ID="state" runat="server"></asp:Label><br />
</div>
<div style="line-height: normal; vertical-align: middle; text-align: justify;
height:30px">
CITY :- <asp:Label ID="city" runat="server"></asp:Label><br />
</div>
<div style="line-height: normal; vertical-align: middle; text-align: justify;
height:30px">
CONTACT :- <asp:Label ID="contact" runat="server"></asp:Label><br />
</div>

</div>
</td>
</tr>
<tr>
<td colspan="2">
<div style="line-height: normal; vertical-align: middle; text-align: justify; height:30px">
DETAILS :- <asp:Label ID="detail" runat="server"></asp:Label><br />
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div style="line-height: normal; vertical-align: middle; text-align: justify; height:30px">
HRS OF OPERATION :- <asp:Label ID="hrsofoperation"
runat="server"></asp:Label><br />
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div style="line-height: normal; vertical-align: middle; text-align: justify; height:30px">
YEAR ESTABLISHED :- <asp:Label ID="yrest" runat="server"></asp:Label><br />
</div>
</td>
</tr>
</table>
</asp:Content>
Details.aspx.vb

Imports System.Data.SqlClient

Public Class details


Inherits System.Web.UI.Page
Dim cnn As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\MY
PC\Desktop\Solution2\WebApplication1\App_Data\Database1.mdf;Integrated Security=True;User
Instance=True")

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


Me.Load
If Session("uname") = "" Then
Response.Redirect("login.aspx")
End If
cnn.Open()
If Page.IsPostBack = False Then
ProdFill()
End If
End Sub
Sub ProdFill()
Dim str As String
str = "select * from tblshop where shopid = " & Request.QueryString("Id")
Dim cmd As New SqlCommand(str, cnn)
Dim ds As New DataSet
Dim da As New SqlDataAdapter(cmd)
da.Fill(ds)
picture.ImageUrl = "img\" + ds.Tables(0).Rows(0)("picture").ToString()
shopname.Text = ds.Tables(0).Rows(0)("shopname").ToString()
address.Text = ds.Tables(0).Rows(0)("address").ToString()
city.Text = ds.Tables(0).Rows(0)("city").ToString()
state.Text = ds.Tables(0).Rows(0)("state").ToString()
contact.Text = ds.Tables(0).Rows(0)("contact").ToString()
detail.Text = ds.Tables(0).Rows(0)("details").ToString()
hrsofoperation.Text = ds.Tables(0).Rows(0)("hrsofoperation").ToString()
yrest.Text = ds.Tables(0).Rows(0)("yrest").ToString()
End Sub

End Class

Home.aspx

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site2.Master"


CodeBehind="home.aspx.vb" Inherits="WebApplication1.home" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<center>
<asp:Label ID="Label1" runat="server" Text="WELCOME ADMIN" Font-Bold="True"
Font-Italic="True" Font-Names="AR CHRISTY" Font-Size="70pt"
Font-Strikeout="False" Font-Underline="True"></asp:Label>
</center>

<div class="col_1">
<div class="col-md-4 span_7">
<div class="cal1 cal_2"><div class="clndr"><div class="clndr-
controls"><div class="clndr-control-button"><p class="clndr-previous-
button">previous</p></div><div class="month">July 2015</div><div class="clndr-control-
button rightalign"><p class="clndr-next-button">next</p></div></div><table class="clndr-
table" border="0" cellspacing="0" cellpadding="0"><thead><tr class="header-days"><td
class="header-day">S</td><td class="header-day">M</td><td class="header-
day">T</td><td class="header-day">W</td><td class="header-day">T</td><td
class="header-day">F</td><td class="header-day">S</td></tr></thead><tbody><tr><td
class="day adjacent-month last-month calendar-day-2015-06-28"><div class="day-
contents">28</div></td><td class="day adjacent-month last-month calendar-day-2015-06-
29"><div class="day-contents">29</div></td><td class="day adjacent-month last-month
calendar-day-2015-06-30"><div class="day-contents">30</div></td><td class="day calendar-
day-2015-07-01"><div class="day-contents">1</div></td><td class="day calendar-day-2015-
07-02"><div class="day-contents">2</div></td><td class="day calendar-day-2015-07-
03"><div class="day-contents">3</div></td><td class="day calendar-day-2015-07-04"><div
class="day-contents">4</div></td></tr><tr><td class="day calendar-day-2015-07-05"><div
class="day-contents">5</div></td><td class="day calendar-day-2015-07-06"><div
class="day-contents">6</div></td><td class="day calendar-day-2015-07-07"><div
class="day-contents">7</div></td><td class="day calendar-day-2015-07-08"><div
class="day-contents">8</div></td><td class="day calendar-day-2015-07-09"><div
class="day-contents">9</div></td><td class="day calendar-day-2015-07-10"><div
class="day-contents">10</div></td><td class="day calendar-day-2015-07-11"><div
class="day-contents">11</div></td></tr><tr><td class="day calendar-day-2015-07-12"><div
class="day-contents">12</div></td><td class="day calendar-day-2015-07-13"><div
class="day-contents">13</div></td><td class="day calendar-day-2015-07-14"><div
class="day-contents">14</div></td><td class="day calendar-day-2015-07-15"><div
class="day-contents">15</div></td><td class="day calendar-day-2015-07-16"><div
class="day-contents">16</div></td><td class="day calendar-day-2015-07-17"><div
class="day-contents">17</div></td><td class="day calendar-day-2015-07-18"><div
class="day-contents">18</div></td></tr><tr><td class="day calendar-day-2015-07-19"><div
class="day-contents">19</div></td><td class="day calendar-day-2015-07-20"><div
class="day-contents">20</div></td><td class="day calendar-day-2015-07-21"><div
class="day-contents">21</div></td><td class="day calendar-day-2015-07-22"><div
class="day-contents">22</div></td><td class="day calendar-day-2015-07-23"><div
class="day-contents">23</div></td><td class="day calendar-day-2015-07-24"><div
class="day-contents">24</div></td><td class="day calendar-day-2015-07-25"><div
class="day-contents">25</div></td></tr><tr><td class="day calendar-day-2015-07-26"><div
class="day-contents">26</div></td><td class="day calendar-day-2015-07-27"><div
class="day-contents">27</div></td><td class="day calendar-day-2015-07-28"><div
class="day-contents">28</div></td><td class="day calendar-day-2015-07-29"><div
class="day-contents">29</div></td><td class="day calendar-day-2015-07-30"><div
class="day-contents">30</div></td><td class="day calendar-day-2015-07-31"><div
class="day-contents">31</div></td><td class="day adjacent-month next-month calendar-day-
2015-08-01"><div class="day-contents">1</div></td></tr></tbody></table></div></div>
</div>
</div>
<!----Calender -------->
<link rel="stylesheet" href="css/clndr.css" type="text/css" />
<script src="js/underscore-min.js" type="text/javascript"></script>
<script src= "js/moment-2.2.1.js" type="text/javascript"></script>
<script src="js/clndr.js" type="text/javascript"></script>
<script src="js/site.js" type="text/javascript"></script>
<!----End Calender -------->
</div>
</asp:Content>
Home.aspx.vb

Public Class home


Inherits System.Web.UI.Page

Private Sub home_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles


Me.Load
If Session("uname") = "" Then
Response.Redirect("login.aspx")
End If
End Sub
End Class

You might also like