NEAR EAST UNIVERSITY. Faculty of Engineering
|
|
|
- Stewart Atkins
- 10 years ago
- Views:
Transcription
1 NEAR EAST UNIVERSITY Faculty of Engineering Department of Computer Engineering ONLINE BOOKING SYSTEM Graduation Project COM 400 Students: İSKliR CİHAN ( ) Supervisor: ÜMİT SOYER Nicosia
2 ACKNOWLEDGMENT "First i would like to thank my supervisor Umit Sayer for his invaluable advice and belief in my work and myself over the course fo this Graduation Project.. Second, I would like to express my gratitude to Near East University for the scolarship that made the work possible. Third, I thank my family for their constant encouragement and support during the preparetion of this project. Finally I would also like to thank all my friends Nadeem and Serkan for their advice and support."
3 LIST OF ABBREVIATIONS NEU Near East University WWW World Wide Web OMS Database Management Systems SQL Structured Query Language ASP Active Server Pages.NET.NET Framework C# C sharp ii
4 TABLE OF CONTENTS ACKNOWLEDGMENT i LIST OF ABBREVIATIONS ii TABLE OF CONTENTS iii INTRODUCTION 1 CHAPTER 1 : MASTER PAGES MASTER PAGE a) BaşSayfa.Master b) CODE ASP FOR MASTER PAGE başsayfa.master c) CODEC# FOR MASTER PAGE başsayfa.master 4 CHAPTER 2 : ALLUSERS PAGES FOR GUESTS Anasayfa.aspx a ) ASP CODE FOR GUEST Anasayfa.aspx FOR Admin Anasayfa.aspx a ) ASP CODE FOR Admin Anasayfa.aspx b ) C# Code FOR Anasayfa.aspx Search.aspx!" a ) ASP CODE FOR Search.aspx b) C# CODE FOR search.aspx Hesap.aspx a ) ASP CODE FOR hesap.aspx b ) C# CODE FOR hesap.aspx c) Continue to hesap.aspx and Complete to create user Login Page 17 iii
5 2.5 - a ) ASP CODE FOR Login.aspx b ) C# CODE FOR Login.aspx ÜrünSeçme.aspx Page a) ASP CODE FOR UrunSecme.aspx b ) C# CODE FOR UrunSecme.aspx Sepet PAGE a ) ASP CODE FOR Sepet.aspx b ) C# CODE FOR Sepet.aspx SatınAI PAGE a) ASP CODE FOR SatınAl.aspx b) CODEC# FOR SatınAl.aspx 31 CHAPTER3: ONLY ADMIN PAGES PAGE KategoriEkle.aspx a ) ASP CODE FOR KategoriEkle.aspx b ) C# CODE FOR KategoriEKle.aspx PAGE MarkaEkle.aspx a) ASP CODE FOR MarkaEkle.aspx b) C# CODE FOR MarkaEkle.aspx PAGE ModelEkle!'\ a ) ASP CODE FOR ModelEkle.aspx b) C# CODE FOR ModelEkle.aspx PAGE UrunEkle.aspx a) ASP CODE FOR UrunEkle.aspx b) C# CODE FOR UrunEkle.aspx 49 CHAPER4: CONFIGURATION PAGES...51 iv
6 4.1 - CONFIGURATION FOR ADMIN PAGES a ) PAGE Web.config CONFIGURATION FOR ALL USERS a ) PAGE web.config 52 CHAPTER 5: WORK ENVIRONMENT 53 CHAPTER 6: TABLES APLICATION TABLE MEMBERSHIP TABLE PATH TABLE PERSONALIZATION ALLUSER TABLE PERSONALIZATION PER USER TABLE PROFILE TABLE ROLES TABLE SCHEMA TABLE USERS TABLE USERSINROLE TABLE WEB EVENT TABLE KATEGORiTABLE!L MARKA TABLE MODEL TABLE MODELOZELLIK TABLE SEPET TABLE URUN TABLE CHAPER 7: QUERIES AND DESIGNS AND RESULTS FOR VIEWS 60 V
7 7.1 - DETAY VIEWS a) RESULT SEPET VIEW a) RESULT APPLICATIONS VIEW MEMBERSHIPUSERS VIEW PROFILES VIEW ROLES VIEW USERS VIEW USERSINROLES VIEW PATHS VIEW SHARED VIEW WEBPARTUSERS VIEWS 66 CHAPTER 8 : STORED PROCEDURES ANYDATAINTABLES CREATE APLICATION CHECHSCHEMAVERSION EDITMEMBERSHIP CREATEUSER FINDUSERBY !': FINDUSERSBYNAME GETALLUSERS GETNUMBEROFUSERSONLINE GETPASSWORD GETPASSWORDWITHFORMAT GETUSERSBY GETUSERBYNAME 84 vi
8 GETUSERBYUSERID RESETPASSWORD SETPASSWORD UNLOCKUSERS UPDATEUSERS UPDATEUSERINFO CREATEPATH GETAPPLICATIONID DELETEALLSTATE FINDSTATE GETCOUNTOFSTATE RESETSHAREDSTATE RESETUSERSTATE GETPAGESETIINGS RESETPAGESETIINGS SETPAGESETIINGS PERUSERGETPAGESETIINGS PERUSERRESETPAGESETIINGS PERUSERSETPAGESETIINGS DELETEINACTIVEUSERS!'\ DELETEPROFILES GETNUMBEROFINACTIVEUSERS GETPROFILES GETPROPERTIES SETPROPERTIES REGISTERSCHEMAVERSIOPS CRETAEROLES 116 vii
9 DELETEROLES GETALLROLES ROLEEXISTS REMOVEALLROLEMEMBERS RESTOREPERMISSIONS UNREGISTERSCHEMAVERSION CREATEUSER DELETEUSER ADDUSERSTOROLES FINDUSERSINROLES GETROLESFORUSERS GETUSERSINROLES ISUSERINROLES REMOVEUSERSFROMROLES LOG EVENT 136 CHAPTER 9 : TEN TERMS You Look Smart Web Application Developer Data-Driven...!' ASP.NET Visual Studio IDE Control Code Programmatic Database 142 viii
10 CHAPER 10: TEN ALTERNATIVESTO BEING HELPLESS Microsoft Developer Network (MSDN) HTML Home Page Cascading Style Sheets Home Page ASP.NET Forums SQL Server Developer Center Dotnetjunkies Microsoft Technical Communities 147 CONCLUSION 148 REFERENCES 149 ix
11 INTRODUCTION The Objective of this project is to build a Web Based Online System.The Project consists introduction nine chapter nad conclusion. Chapter one presents the architecture of MASTER PAGE Chapter two presents the architecture of ALLUSER PAGES Chapter three presents the architecture of ONLYADMIN PAGES Chapter four presents the architecture of CONFIGURATION PAGES Chapter five describes WORK ENVIRONMENT Chapter six describes the TABLES Chapter seven describes QUERIES AND DESIGNS AND RESULTS FOR VIEWS Chapter eight describes the PROCEDURES Chapter nine describe some definition TEN TERMS 1
12 CHAPTER 1: MASTER PAGES l.j 1. r.ı CODE ASP rou MASnmPAGE Master Language="C#" AutoEventWireup="true" CodeFile="BaşSayfa.master.cs" Inherits="BaşSayfa" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " <html xmlns=" > <head runat="server"> <titlec-untitled Page-c/title> <script languagee'javascript" typee.'fext/javascript"> <!-- function DIVl_onclick() { II--> </script> <zhead> <body> <form id="forml" runat="server"> <div> <br I> <br I> <brl> 2
13 <ldiv> <div id="divl" style="z-index: 100; left: Opx; width: 102%; position: absolute; top: Opx; height: 200px; background-color: gainsboro" language="javascript" onclickevreturn DIVl_onclick()"> <div styleez-index: 100; left: 544px; width: 120px; position: absolute; top: 8px; height: 112px11> <asp.login View ID=11Login View 111 runat=cserver"> <LoggedlnTemplate> Hoşgeldin &nhsp; <br I> için <asp:loginname ID=11LoginNamel II runat='tserver" Style="z-index: 100; left: 72px; position: absolute; top: 24px11 I> <asp:loginstatus ID=11LoginStatus211 runat="server" LogoutTexteçıkış" Style="z-index: 102; left: 8px; position: absolute; top: 40px" I> <!Lo ggedln Template> «Anonymous'Iemplate> hoşgeldin misafir <asp:loginstatus ID="LoginStatus 111 runat='tserver" Login'Text=t'giriş" Style="left: Opx; position: static; top: Opx" I> için <a href="hesap.aspx">üye <la>olmak için &ııbsp; <I AnonymousTemplate> </asp:login View> <zdiv> <img srceresimler/logosgif" runat=server style=z-index: 101; left: 216px; position: absolute; top: 16px" I> <a href="anasayfa.aspx">ana Sayfa-c/ac-c/div> II <asp:contentplaceholder id="contentplaceholderl nmat="server"> <I asp: contentplaceholder> <!form> <!body> <!html> 3
14 1.1 -c) CODEC# FOR MASTER PAGE using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.DI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class BaşSayfa: System.Web.UI.MasterPage { protected void Page_Load(object sender, EvcntArgs e) { 4
15 CHAPTER 2 : ALLUSERS PAGES 2 z.ı - a ) ASP CODE FOR GUEST,s,%@ Page LanguageeCs" MasterPageFile=11-/BaşSayfa.master11 Autofivcntwireupetrue" CodefiilceAnaôayfa.aspx.cs'' InhcritseAuaxayfa" Titlee.Untitled Page" %> II 11 <asp.content ID=11Contentl ContentPlaceHolderID=11ContentPlaceHolderl Runat="Server"> <div sıyle='z-index: 100; left: 464px; width: loopx; position: absolute; top: 288px; height: loopx"> <asp:login View ID=11Login View 1" runatevserver"> <RoleGroups> <asp:rolegroup RoleseAdmin"> <Content'I'emplate> <a href= 11 AdminPages/KategoriEkle.aspx 11> Kategori Ekle-c/a> 5
16 <a hrcf="adminpages/urunekle.aspx">ürün Ekle<la> <a href="adminpages/markaekle.aspx">marka Ekle-c/a> <a href="adminpages/modelekle.aspx">model Ekle-c/a> -c/content'i'emplate> <lasp:rolegroup> <IRoleGroups> <Anonymous Template> <I AnonymousTemplate> -c/asp.login View> «/div» <br I> <a hrcf="adminpages/kategoriekle.aspx"> <br I> <la> <a hrefe.search.aspx'c-arac/a> <br Z> <br I> <a href="urunsecme.aspx">ürün Seçme<la><br I> <br I> <lasp:content> 6
17 2 Doşye Dü~en Görünüm.~eçmiŞ Y~r İmi.er[ Ar.açlar )'.,ardım Kategori Ek.le Ürün Seçme Model.Ekle. <1 Page Language="C#11 MasterPageF'ile="-/BaşSayfa.master11 Autoliventwireupetrue" CodeFile="AnaSayfa.aspx.cs" InheritseAnaxayfa" Titlee.'Tlntitled Page" %> II 11 <asp.content ID="Contentl ContentP1aceHo1dcr1D="ContentPlaceHolderl Runat='Eerver''> <div style="z-index: 100; left: 464px; width: loopx; position: absolute; top: 288px; height: loopx11> -casp.login View ID="Login View l" runate+server"> <RoleGroups> <asp:rolegroup Roles="Admin"> <ContentTemplate> <a href= 11 AdminPages/Kate goriekle. aspx" >Kategori Ekle</ a> -cbr I> <a href=11adminpages/urunekle.aspx">ürün Ekle-c/a> 7
18 <br I> <a href="adminpages/markaekle.aspx">marka Ekle-c/a> <br I> <br I> <a href="adminpages/modelekle.aspx">model Ekle-c/a> <IContentTemplate> <lasp:rolegroup> </Rol egrou ps> <Anonymous'Template> <I AnonymousTemplate> <lasp:login View> <Zdiv> <br I> <a href=" AdminPages/KategoriEkle.aspx "> <br Z> <la> <a hrefesearch.aspx'c-ara-c/a> <br I> <a hrcfeururıxecme.aspx'c-ürün Seçme-c/ac-cbr I> <br I> <br I> <br I> <br I> </asp:content> " using System; using System.Data; using System.Configuration; using System. Collections; using System.Web; using System.Web.Security; using System.Web.DI; using System.Web.UI.WebControls; 8
19 using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class AnaSayfa: System.Web.Ul.Page { protected void Page_Load(object sender, EvcntArgs e) { Doşye Dü~e'n ~ö~ür:ıü.ın 2eçrniŞ Y~~ İml~r[ Araçlar t_ar'dır'n windowsoriiinel l)rün Avantajı Sis.teminiz risk altında olabilir. BuWindowskopvesr,orijinal Windows doğrulamasındcm geçmedi. Microsoft tarafından sağlananpekçokyükseltmeyi almak için doğrulama gereklidir. Bu sorunla!j!»jll!l!l!l!l/!l/!l/!l/!l/!1/!l!l!lll!l!lljilgili yardım almakiçin~tıklatın. 9
20 2.3 - a} ASP CODE FOR <%@ Page Language="C#" MasterPageFile="-/BaşSayfa.master" AutoEvent\Vireup="true" CodeFilc="Search.aspx.cs" InheritseSearch" Title='Tlntitled Page",%> <asp.content ID="Contentl" ContentPlaceHoldedD="ContentPlaceHolderl" Runat=" Server"> <asp:textbox ID="TextBoxl" runat=''server" Stylee-z-index: 100; left: 392px; position: absolute; top: 304px "><lasp:textbox> <asp:sqldatasource ld="sqldatasourcel II runat="server" Connections tring= ";<%$ ConnectionStrings:M yconnection %> 11 SelectCommand="SELECT [KategoriAdi], [UrunAdi], [MarkaAdi], [ModelAdi] FROM [DetayView] WHERE (([KategoriAdi] OR ([UrunAdi] OR ([MarkaAdi] OR ([ModelAdi] ORDER BY [MarkaAdi], [ModelAdi]"> <Selectf'arameters> <asp:controlparameter ControlID="TextBoxl" Name="KategoriAdi" Propcrtylvamev'Text" I> <asp:controlparameter ControlID="TextBox 1" Name="UrunAdi" PropertylvaıneeText" I> <asp:controlparameter ControlID="TextBoxl" Name="MarkaAdi" PropertyName="Text" I> <asp:controlparameter ControlID="TextBoxl" Name="ModelAdi" PropertyName="Text" I> <ISelectParameters> <lasp:sqldatasource> <asp:button ID="Buttonl" runat='tserver'' OnClick="Buttonl_Click" Stylc="z-index: 101; left: 280px; position: absolute; top: 304px" Text=Ara'' I> <br I> <asp.grid View ID="GridViewl" runate+server" Autofieneratef.olumns=t'False" DataS0urccJD=11SqlDataS0urcel" Stylee=z-index: 103; left: 376px; position: absolute; top: 360px"> <Columns> <asp:boundfield Datal-ieldeKategori Adi'' HeaderText=''KategoriAdi" SortlixpressioneKategori Adi'' I> <asp:boundfield DataField=11UrunAdi" HeaderText=11UrunAdi" SortExpression="UrunAdi" I> <asp:boundfield DataField= "Marka.Adi" HeaderText= "MarkaAdi" SortExpression= "MarkaAdi" I> 10
21 <asp:boundfield DataField= "ModelAdi" HeaderText= "ModelAdi" SortExpression="ModelAdi" I> </Columns> <lasp:gridview> <br I> <lasp:content> b ] C# CODE FOR using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.Ul; using System.Web.DI.WebControls; using System.Web.DI.WebControls.WebParts; using System.Web.Ul.HtmlControls; public partial class Search: Systern.Web.Ul.Page { protected void Page_Load(object sender, EventArgs e) { protected void Buttonl_Click(object sender, EventArgs e) { GridView1.DataBind(); 11
22 2.4 - a) ASP CODE FOR Page Language="C#" MasterPageFile="-/BaşSayfa.master" AutoEventWireup="true" Codef'ileeHesap.aspx.cs" Inherits="Hesap" Title="Untitled Page"%> <asp:content ID="Contentl" ContentPlaccHoldcrID="ContentPlaceHolderl" Runat="Scrver"> <asp:createuserwizard ID="CreateUserWizardl" runat="server" OnCreatcd User='' Create User Wizard l _Created User" Style='tz-index: 100; left: 16px; position: absolute; top: 272px"> <Wizards teps> <asp: Create UserW izards tep run at=" server"> <Content'I'emplate> <table bordcr="o"> <tr> <td align="center" colspan="2" style="height: 21 px"> 12
23 yeni hesab oluşturrna-c/td> <!tr> <tr> <td align="right"> <asp.label ld="usernamelabel" runat="server" AssociatedControlID="UserName">kullanıcı adı-c/asp.labeb-c/td> <tel> <asp:textbox ID="UserName" runat="server"><lasp:textbox> <asp:requiredfieldvalidator ID=''UserNameRequired" runat="server" ControlToValidate="UserName" ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="CreateUserWizardl ">*<lasp:requiredfieldvalidator> <ltd> <!tr> <tr> <td align="right"> -casp.label ID="PasswordLabel" runat="server" AssociatedControlID=''Password''>şifre<lasp:Label><ltd> <td> <asp:textbox ld="password" runat="server" TextMode="Password"></asp:TextBox> <asp:requiredfieldvalidator ID="PasswordRequired" run at=" server" ControlTo Validate= "Password" Errorlvlessage='Password is required." TooITip="Password is required." ValidationôroupeCreatel,' serwizardl ">*</asp:requiredfieldvalidator> <ltd> <ztr> <tr> <td align="right"> <asp.label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword">şifre tekrarı<lasp:label><ltd> <td> <asp:textbox ID="ConfirmPassword" runat="server" TextMode="Password"><lasp:TextBox> <asp:requiredfieldvalidator ID="ConfirmPasswordRequired" run at=" server" Control'I'o'Validate> "ConfirmPassword" ErrorMessage="Confirm Password is required." TooITip="Confirm Password is required." ValidationGroup= "Create User Wizard 1 ">*</asp:requiredfieldv alidator> <ltd> <!tr> <tr> <td ajign="right"> <asp.label ID=" Label" runat="server" AssociatedControlID=" "> <lasp:Label></td> <td> <asp:textbox ID=" " runat="server"></asp:textbox> <asp:requiredfieldvalidator ID=" Required" runat="server" ControITo Validatc=" '' 13
24 ErrorMessage=" is required." ToolTip=" is required." ValidationGroup="CreateU serwizard 1 ">*<lasp:requiredfieldvalidator> <ltd> <!tr> <tr> <td align="right"> <asp:label ID="QuestionLabel" nmat="server" AssociatcdControHD="Question">güvenlik sorusu-c/asp.labelc-x/td> <td> <asp:textbox ID="Question" nmat="server"><lasp:textbox> <asp:requiredfieldvalidator ID="QuestionRequired" run at=" server" ControlToValidate=" Question" ErrorMessage="Security question is required." ToolTip="Security question is required." VaLidation(}roup="CreateU serwizard l ">*<lasp:requiredfieldvalidator> <ltd> <!tr> <tr> <td align="right"> -casp.label ID="AnswerLabel" runat="server" AssociateclControlID="Answer">güvenlik cevabı<lasp:label><ltd> <td> <asp:textbox ID="Answer" runat="server"><lasp:textbox> <asp:requiredfieldvalidator ID="AnswerRequired" runat="server" Control'To Valiclate="Answer" ErrorMessage="Security answer is required." ToolTip="Security answer is required." ValidationGroup="CreateUserWizardl">*<lasp:RequiredFieldValidator> <ltd> <!tr> <tr> <td align="center" colspan="2"> <asp: Compare Validator ID= "PasswordCompare" run at=" server" Control'Tot.omparee'Password' ControlTo Validate="ConfirrnPassword" Display= "Dynamic" ErrorMessagc="şifre ve şifre tekrarı uyumsuz" ValidationGroup="CreateUserWizardl "e-c/asp.compare'validator> <ltd> <ztr> <tr> <td align="center" colspan=l'z" style="color: red"> <asp:literal ID="ErrorMessage" runat="server" Enable Views tate="false "><lasp:literal> <ltd> «/tr» -otable> <IContentTemplate> 14
25 <I asp: Create DserWizardStep> <asp:completewizardstep runat="server"> <ContentTemplate> <table horder="o"> <tr> <td align="center" colspan="?"> tamamlandı <ltd> <!tr> <tr> <td> hesabınız başarılı bir şekilde oluşturuldu.c/td> <!tr> <tr> <td align="right" colspan="2"> <asp.button ID="ContinueButton" runat="server" Causes Validation="False" CommandNamc="Continue" PostBackUrl="-/AnaSayfa.aspx" Text="devam" ValidationGroup="CreateUserWizardl" I> <ltd> <!tr> <!table> <IContentTemplate> <lasp:complete WizardStep> <IWizardS teps> <lasp:createdserwizard> <hr I> <lasp:content> using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.DI; using System.Web.DI.WebControls; using System.Web.DI.WebControls.WebParts; using System.Web. Ul.Html Controls; public partial class Hesap: System.Web.Ul.Page { ıs
26 protected void Page_Load( object sender, EventArgs e) { protected void CreateUserWizardl_CreatedUser(object sender, EventArgs e) { Roles.AddUserToRole(CreateUserWizardl.UserName, "SiteUye"); c ] Continue to to create user Doşye Düien Görünüm.eçmiş V~.r 'imleri Araçlar t_ardım tamamlandı hesabınız başarılı bır şekilde oluşturuldu. ~ 16
27 2 Giriş yapmak için lütfen kullanıcı adınızı ve şifrenizi doğru bir şekilde giriniz Kul!anıti.6.dı Şifre CJ.seni ı~atırla a) ASP CODE FOR ::5%@ PageLanguagc="C#" Ma~tcrPagcFilc="-/BaşSayfa.master" AutoEventWircup="true" CodcFilc="Login.aspx.cs" Inheritse'Login'' 'I'itle='Tfntitled Page"%? <asp:content ID="Contentl" ContentPlaceHolderID="ContentPlaceHolderl" Runat="Server"> ' <asp.login ld="loginl" runat="server" BackColor="#EFF3FB" BorderColor="#B5C7DE" BorderPadding="4" BorderStyle= "Solid" Border\Vidth=" 1 px" Font-Names= "Verdana" Font Sizce "0. 8em" ForeColor="#333333" Stylc="z-index: 100; left: 40px; position: absolute; top: 360px"> <TextBoxStyle Font-Size="0.8em" I> <LoginButtonStyle BackColor="White" BorderColor="#507CD1" Borderxtylee" Solid" Border Width='' 1 px" Font-Names=Verdana" Font-Size="0.8em" ForeColor="#284E98" I> <Layout'Template> 17
28 <table border="o" cellpaddingevl" cellspacing='d" style="border-collapse: collapse"> <tr> <td> <table border="o" cellpaddinge-'d"> <tr> <td align="center" colspan="2" styleefont-weight: bold; font-size: 0.9em; color: white; background-color: #507cdl "> Log In-c/td> <ztr> <tr> <td align="right"> <asp.label ID="UserNameLabel" runat="server" AssociatcdControIID= "UserN ame ">Kullanıcı Adı : <lasp:label><ltd> <td> <asp:textbox ID="UserName" runat="server" Font Size="0.8em"><lasp:TextBox> <asp:requiredfieldvalidator ID="U sern amerequired" runat="server" ControlToValidatc="UserName" ErrorMessagc="User Name is required." ToolTip="User Name is required." ValidationGroup="Loginl ">*<lasp:requiredfieldvalidator> <ltd> <!tr> <tr> <td align="right"> <asp.label ID="PasswordLabel" runat="server" AssociatcdControlID= "Password "c-şifre : -c/asp:labeb-c/td> <td> <asp:textbox ID="Password" runat="server" Font-Size="0.8em" TextMode="Password ''><lasp:textbox> <asp:requiredfieldvalidator ID="PasswordRequired" run at=" server" Control'To'Validatee "Password" ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="Login 1 ">*<lasp:requiredfieldvalidator> <ltd> ıı. <!tr> <tr> <td colspan="2"> <asp:check:box ID="RemembcrMe" runat="servcr" Text="Beni Hatırla" I> <ltd> <ztr> <tr> <td align="center" colspan="2" style="color: red"> <asp:literal ID="FailureText" runat="server" EnahleVic\vStatc="False"><lasp:Literal> <ltd> <ztr> <tr> 18
29 <td align="right" colspan="?"> -casp.button ID="LoginButton" runat="server" BackColor="White" BorderColor="#507CD1" BorderStyle="Solid" BordcrWidth=" lpx" CommandName="Login" Font-NameseVerdana'' Font-Sizc="0.8em" ForcColor="#284E98" Text="Giriş" ValidationGroup="Login 1" I> <ltd> </tr> <ztable> <ltd> <ztr> </table> <ILayoutTemplate> <lnstructiontextstyle Font- Italic= "True" ForcColor= "Black" I> <TitleTextStyle BackColor="#507CD1" Font-Bold="True" Font-Sizc="0.9em" ForeColor="White" I> <lasp:login> <br I> Giriş yapmak için lütfen kullanıcı adınızı ve şifrenizi doğru bir şekilde giriniz... <br I> <br I> <br I> <br I> <br I> <br I> -c/asp.content> A using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.DI; using System.Web. UI. W ebcontrols; using System.Web.UI.WebControls.WebParts; 19
30 using System.Web.UI.HtrnlControls; public partial class Login : Systern.Web.Ul.Page { protected void Page_Load(object sender, EventArgs e) { Kategori Urı:ın Marka Model Label [.Sepete Eki~ J [ Sepete Git) 20
31 2.6 - a) ASP CODE FOR <~.@ Page Language="C#" MasterPageFile="-/BaşSayfa.master" Autobventwireupetrue" CodeFile="UrunSecme.aspx.cs" Inherits="UrunSecme" Titlc="Untitled Page" ff > II <asp.content ID=11Contentl ContentPlaceHo1der1D="ContentPlaceHolderl" Runat="Server"> II <asp:dropdownlist ID="DropDownListl runate+server" AutoPostBack="True" DataSourceID="SqlDataSourcel" DataTextField="KategoriAdi" DataVaiueField="KategoriAdi'' Style="z-index: 100; left: 200px; position: absolute; top: 328px" Width="104px"> </asp:dropdownlist> <asp:dropdownlist ID="DropDownList2" runat=''server" AutoPostBack="True" DataSourceID="SqlDataSource2" DataTcxtField= "Urun Adi" Data Valuef'ield= "Urun Adi" Height= "22px" Style= "zindex: 101; left: 330px; position: absolute; top: 328px" Width=" 104px"> <lasp:dropdownlist> <asp:dropdownlist ID="DropDownList3" runat="server" AutoPostBack="True" DataSourceID= "SqlDataSource3" DataTextField="MarkaAdi" Data ValueField="MarkaAdi" Height=1122px11 Style="z-index: 102; left: 460px; position: absolute; top: 328px" Width=" 104px11> <lasp:dropdownlist> <asp:dropdownlist ID=11DropDownList411 runateserver" Autof'ostlracke'True" DataSourceID=" Sqll'ıataôource-t" DataTextField="ModelAdi" Data ValueField=11ModelAdi" Height="22px11 Style='tz-index: 103; left: 592px; position: absolute; top: 328px11 Widthe " 104px"> <lasp:dropdownlist> <asp.label 1D="Label2" runat="server" Style="z-index: 104; left: 330px; position: absolute; & top: 288px" Text="Ürün" Wiclth="104px"></asp:Label> -casp.label ID=11Label3" runat="server" Stylc="z-index: 105; left: 460px; position: absolute; top: 288px11 Text="Marka11 Width="104px"></asp:Label> <asp.label ID="Label511 runate 'xerver" Height=1119px" Style="z-index: 106; left: 712px; position: absolute; top: 288px11 Text=Label" Widthe" 104px11></asp:Label> «asp.label ID="Label4" runat='tserver" Styleez-index: 107; left: 200px; position: absolute; top: 288px" 'Iext=Kategori" Width="104px"><lasp:Label> <asp:sqldatasource ID=11SqlDataSource4" runat='tserver" ConnectionString=''<%$ ConnectionStrings:MyConnection %>" 21
32 SelectCommand=11SELECT [ModelAdi] FROM [DetayView] WHERE (([MarkaAdi] AND ([UrunAdi] ORDER BY [ModelAdi]11> <SelectParameters> <asp :ControlParameter ControHD= "Dropfrownl.istô 11 Name= "Marka.Adi 11 Propertylvarrıe=+Selected Value" Type="String" I> <asp:controlparameter Contro1ID="DropDownList2" Name="UrunAdi" Propertylv ame=" Selected Value" Type="String" I> </SelectParameters> <lasp:sqldatasource> <asp:label ID=11Labell II nmat="server" Style="z-index: 108; left: 592px; position: absolute; top: 288px11 TexteModel'' Width="104px11></asp:Label> <asp: SqlDataSource ID= 11 SqlDataSource3 11 run at= 11 server" ConnectionString= 11 <~$ ConnectionStrings:MyConnection %>" SelectCommand=11SELECT DISTINCT [MarkaAdi] FROM [DetayView] WHERE ([UrunAdi] ORDER BY [MarkaAdi]"> <Selectf'arameters> <asp:controlparameter ControLID="DropDownList211 Namce=UrurrAdi" PropertyName="SelectedValue" Type="String" I> </SelectParamctcrs> </asp:sqldatasource> <asp:sqldatasource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:MyConnection %>11 SelectCommand="SELECT DISTINCT [UrunAdi] FROM [DetayView] WHERE ([KategoriAdi] ORDER BY [UrunAdi]"> <Selectl-arameters> <asp:controlparameter GontrolID="DropDownListl" Name="KategoriAdi" PropertyName="SelectedValue" Type="String" I> </SelectParameters> <lasp:sqldatasource> <br I> <asp:sqldatasource ID="SqlDataSourcel" runat='tserver" ConnectionString=1\<%$ ConnectionStrings:MyConnection %>11 SelectCornmand=11SELECT DISTINCT [KategoriAdi] FROM [Detay View] ORDER BY [KategoriAdi]"> </asp:sqldatasource> <br I> 11 <asp:details View ID="Details View 1" runat="server" Autofieneratelcows=r'False DatakeyblameseModel Adi" 22
33 DataSourceID="SqlDataSource5" Height="50px" Style="z-index: 109; left: 200px; position: absolute; top: 392px" \Vidth="504px"> <Fields> <asp:boundfield DataField= "ModelAdi" HeadcrTcxt= "ModelAdi" ReadOnly="True" SortExpression="ModelAdi" I> <asp:boundfield DataField= "Model Ozellikleri" HcadcrTcxt="Model Ozellikleri" SortExprcssion= "Model Ozellikleri" I> <asp.bou ndfield Dataf'ield= "ModelFi yatı" HcaderTcxt= "ModelFi yatı" SortExpression="ModelFiyatı" I> <asp:boundfield DataFielcl=''Taksit_ay" HeaderText="Taksit_ay'' SortExprcssion="Taksit_ay" I> <!Fields> <lasp:details View> <asp.button ID="Button2" runat="server" Style='tz-index: 110; left: 208px; position: absolute; top: 512px" Text="Sepete Ekle" OnClick="Button2_Click" I> <asp:dropdownlist ID= "DropDownList5" run at=" server" AutoPostBack= "True" DataSourceID=" SqlDataSource7" DataTextFicld="Fiyat" Data ValueFicld="Fiyat" Styie="z-index: 111; left: 712px; position: absolute; top: 328px" Height="22px" \Vidth="l04px''> <lasp:dropdownlist> <asp: SqlDataSource ID=" SqlDataSource5" runat="server" ConnectionString=" <%$ ConnectionStrings:MyConnection %>" SelectCommand="SELECT * FROM [ModelOzellik] WHERE ([ModelAdi] ORDER BY [ModelAdi]" OldValuesParaınctcrFormatString="original_ {O}"> <Selectf'arameters> <asp:controlparameter ControlID="DropDownList4" Name="ModelAdi'' PropcrtyName="SelectedValue" Typc="String" I> <ISelectParameters> <lasp:sqldatasource> <asp.button ID="Button3" nmat="server" PostBackUrl="-/Sepet.aspx" Stylc="zindex: 114; ıo. left: 336px; position: absolute; top: 512px" Text="Sepete Git" I> <asp: SqlDataSource ID=" SqlDataSource6" run at=" server" ConnectionString= "<%$ ConnectionStrings:MyConnection 1t>" SeiectCornmand="SELECT * FROM Model" UpdateCommand="UPDATE Model SET StokMiktari = StokMiktari - l WHERE (ModelAdi <Updatef'arameters> <asp:controlparameter Controlid= "DropDownList4" Name= "ModelAdi" PropcrtyNamc="SelectedValue" Typc="String" I> <IV pdateparameters> <lasp:sqldatasourcc> <br I> <br I> 23
34 <asp:sqldatasource ID="SqlDataSource7" runat="server" ConnectionString="<%$ ConnectionStrings:MyConnection %~" SelectCommand="SELECT [Fiyat] FROM [Model] WHERE ([ModelAdi] <SelectParameters> <asp:controlparameter ControlID="DropDownList4" Name="ModelAdi" PropertyName="SelectedValue" Typc="String" I> -c/selectl'arameters» <lasp:sqldatasource> <br Z> <asp:sqldatasource ID="SqlDataSource8" runat="server" ConnectionString="<%$ ConnectionStrings:MyConnection %>" InseıtCommand="INSERT INTO Sepet(ModelAdi, Fiyat) VALUES Sc1ectCommand="SELECT* FROM Sepet"> <Insertl'arameters> <asp:controlparameter ControlID="DropDownList4" Name="ModelAdi" PropertyName="SelectedValue" Type="String" I> <asp:controlparameter ControlID="DropDownList5" Name="Fiyat" PropertyNamc="SelectedValue" Type="String" I> <IInsertParametcrs> <lasp:sqldatasource> <br I> "' <br I> <lasp:content> 24
35 2.6 - b ] C# CODE FOR using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.DI; using System.Web.DI.WebControls; using System.Web.DI.WebControls.WebParts; using System.Web.DI.HtmlControls; public partial class UrurrSecme: Systern.Web.Ul.Page { protected void Page_Load(object sender, EventArgs e) { protected void Buttonl_Click(object sender, EventArgs e) { SqlDataSource6.Dpdate(); protected void Button2_Click(object sender, EventArgs e) { SqlDataSource8.Insert(); 25
36 2 Do~ya Ürün seçmeye Devam a) ASP CODE FOR <~;@ Page Language="C#" MasterPageFile="-/BaşSayfa.master" AutoEventWireup="true" Codel-ile=Sepet.aspx.cs" lnherits="sepet" 'I'itle='Tlntitled Page"%> <asp.content ID="Contentl" ContentPlaccHolderID="ContentPlaccHolderl" Runat="Server"> <br I> Ürün seçmeye <a hrcf="urunsccme.aspx">devam <la><br I> 26
37 <asp:sqldatasource ID="SqlDataSourcel" runat="server" ConnectionString=I'~%$ ConnectionStrings:MyConnection.%>" OldVa]ucsParameterFormatString="original_{O}" SelectCommand="SELECT * FROM [Sepet] ORDER BY [ModelAdi]" ConflictDctcction="CompareAllValues" DeleteCommand="DELETE FROM [Sepet] WHERE [Sepetld] AND [ModelAdi] AND InscrtCommand="INSERT INTO [Sepet] ([ModelAdi], [Fiyat]) VALUES UpdateCommand="UPDATE [Sepet] SET [ModelAdi] WHERE [Sepetld] AND [ModelAdi] AND <Delete Parameters> <asp.parameter Name="original_Sepetid" Type="lntl6" I> <asp:parameter Name="original_ModelAdi" Typc="String" I> <asp:parameter Namc="original_Fiyat" Type="Int32" I> <IDeleteParameters> <UpdateParameters> -casp.parameter Namc="ModelAdi" Type="String" I> <asp:parameter Narne="Fiyat" Type="Int32" I> -casp.parameter Name="original_Sepetld" Typc="lnt16" I> -casp.parameter Name="original_ModelAdi" Type="String" I> <asp:parameter Name="original_Fiyat" Type="lnt32" I> -o'update Parameters> <Insertl'arameters> -casp.parameter Name="ModelAdi" Typc="String" I> «asp.parameter Name="Fiyat" Type="Int32" I> </InsertParameters> <lasp:sqldatasource> <br I> <hr/> <br I> <br I> <asp:gridview ID="GridViewl" runat="server" AllowPaging="True" AIIowSorting="True" AutoGenerateColumns= "Failse" DataKey Naınes=" Sepetld" DataSourceID="SqlDataSourcel" Style="z-index: 100; left: 352px; position: absolute; top: 352px"> <Columns> <asp:commandfield ShowDeleteButton="True" De!eteText="Sil" I> <asp:boundfield DataField=" Sepetld" HeaderText=" Sepetld" Insert'visible=t'False" ReadOnly="True" SortExprcssion="Sepetid" I> <asp:boundfield DataField="ModelAdi" HeaderText="ModelAdi" SortExpression="ModelAdi" I> <asp: BoundField Dataf'ield= "Fiyat" HcaderTcxt="Fi yat" SortExpression="Fiyat" I> </Columns> <lasp:gridview> <brl> 27
38 <asp:button ID="Buttonl" runat="server" Style="z-index: 101; left: 544px; position: absolute; top: 280px" Tcxt="Satın Al" PostBackUrI="-/SatinAl.aspx" I> <br I> <br I> <br,'> <br I> <br z> <br I> <asp:detailsview ID="DetailsViewl" runat="server" DataSourccID="SqlDataSource2" Height="50px" Style="z-index: 103; left: 352px; position: absolute; top: 640px" Width="125px"> <lasp:details View> <asp:sqldatasource ID=''SqlDataSource2" runat="server" ConnectionString='\?~$ ConnectionStrings:MyConnection %>" SclectCommand="SELECT SUM(Fiyat) AS Toplam FROM Sepet"><lasp:SqlDataSource> <lasp:content> 2.7 b ) C# CODE FOR using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.Ul; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class Sepet: System.Web.Ul.Page 28
39 protected void Page_Load(object sender, EventArgs e) { DOiYd Düıen Görünüm. Lütfen Gerekli Alanlan Doldurun İsim ve Soyisiın Adres Kart Tipi Kart Numarası CV Numarası 2.8 a) ASP CODE FOR <%@ Page Languagc="C#" MasterPagcFilc="-/BaşSayfa.master" AutofiventWireup=t'true'' CodeFile="SatinAl.aspx.cs" Inherits="SatınAl" Title="Untitled Page" %> 29
40 <asp:content ID="Contentl" ContentPlaceHolderID="ContentPlaceHolderl" Run at=" Server"> <asp:textbox ld="textboxl" runat="server" Styleez-index: 100; left: 224px; position: absolute; top: 384px "><lasp:textbox> <asp:textbox ld="textbox2" runat="server" Style="z-index: 101; left: 224px; position: absolute; top: 430px "><lasp:textbox> <asp:textbox ID="TextBox3" runat="server" Style="z-index: 102; left: 224px; position: absolute; top: 476px"><lasp:TextBox> <asp:textbox ID="TextBox4" nmat="server" Style=I'z-index: 103; left: 224px; position: absolute; top: 522px"><lasp:TextBox> <asp:textbox ID="TextBox5" runat="server" Stylc="z-index: 104; left: 224px; position: absolute; top: 568px"><iasp:TextBox> <asp.label ID="Label 1" runat="server" Height="22px" Style="z-index: 105; left: 40px; position: absolute; top: 384px" Tcxt="İsim ve Soyisim" Width=" 155px"><lasp:Label> <asp.label ID="Label2" runat="server" Hcight="22px" Style="z-index: 106; left: 40px; position: absolute; top: 424px" Text="Adres" \Vidth="155px"><lasp:Label> <asp:label ID="Label3" runat="server" Height="22px" Style="z-index: 107; left: 40px; position: absolute; top: 472px" Text=Kart Tipi" Width="155px"><lasp:Label> <asp:labcl 1D="Label4" runat="server" Height="22px" Stylc="z-index: 108; left: 40px; position: absolute; top: 520px" Text="Kart Numarası" Width=" 155px"><lasp:Label> <br I> <br I> <img src="rcsimler/kartlar.jpg" sryleez-index: 100; left: 504px; width: 208px; position: absolute; top: 392px; height: 128px" > Lütfen Gerekli Alanları Doldurun... <br I> <brl> <br I> <asp.label 1D="Label5" runat="server" Height="22px" Style="z-index: 109; left: x; position: absolute; top: 568px" Text="CV Numarası" -ıdth=" 155px"><lasp:Label> <br I> <brl> <br I> <brl> <brl> 30
41 <br I> <br z> <br I> <asp: Button ID= "Button 1" run at=" server" OnClick= "Button 1_Click" Style=" z-index: 111; left: 560px; position: absolute; top: 608px" Text="Satın Al" I> <asp:sqldatasource ID="SqlDataSourcel" runat="server" ConncctionString="<~$ ConnectionStrings:MyConnection DeleteCommand="DELETE FROM Sepet" SelectComrnand="SELECT Sepet." FROM Sepet" UpdateCommand="UPDATE Model SET StokMiktari = StokMiktari - 1 WHERE (Modelld IN (SELECT Model.Modelld FROM Sepet))"> <lasp:sqldatasource> -cbr I> <br I> <lasp:content> using System; using System.Data; using System.Configuration; using System. Collections; using System.Web; using System.Web.Security; using System.Web.DI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtrnlControls; public partial class SatmAl : System.Web.Ul.Page { protected void Page_Load( object sender, EventArgs e) { protected void Buttonl_Click(object sender, EventArgs e) { SqlDataSource 1. Update(); 31
42 SqlDataSource 1.Delete();
43 CHAPTER 3: ONLY ADMIN PAGES Doşya Dü{en Kategori Düzenle!Kategorıid i 1 ı:rz~t~~?!11\dı :C:clıt I)e)ete New ı;;_... (BezazJ~ıza 3.1- a) <%@ Page Language="C#" MasterPageFile="-/BaşSayfa.master" toevcntwireup="true'' CodeFile="KategoriEkle.aspx.cs" lnherits="urunekle" le="untitled Page" %> p:content ID="Contentl" ContentPlaceHoldedD="ContentPlaceHolderl" nat="server"> <asp:detailsview fd="detailsviewl" runat="server" AHowPaging="True" ogeneratcrows="false" 33
44 Datakeylvames=Kategorild" Dataôourcell.ıeSqll.ıataôource I II Height=1140px11 Stylee'z-index: 100; left: 160px; position: absolute; top: 344px11 Width="264px11> <Fields> <asp:boundfield Datal-ieldeKategorild" Header'TexreKategorild" Insert Visible= 11F alse 11 ReadOnly=11True11 SortlixpressioneKategorild" I> <asp:boundfield Datal-ield=Kategori.Adi" Header'I'exteKategori Adi" S0rtExpression="KategoriAdi11 I> <asp: CommandField Show DeleteB utton=true II Show EclitButton= "True 11 Showlnsertlsuttone'True" I> <!Fields> <lasp:details View> II <asp:sqldatasource ID=11SqlDataSourcel runat='tserver" Con flictdetection= 11 CompareAll Values 11 ConnectionString=11<%$ ConnectionStrings:MyConnection %?11 De1eteCommand="DELETE FROM [Kategori] WHERE [Kategorild] AND [KategoriAdi] fnsertcommand=11insert INTO [Kategori] ([KategoriAdi]) VALUES 11 Oldvaluesl'araıneterltormatx tring= 11 original_ {O} 11 SelectCommand= 11 SELECT * FROM [Kategori] ORDER BY [KategoriAdi]" UpdateCornmand=11UPDATE [Kategori] SET [KategoriAdi] WHERE [Kategorild] AND [KategoriAdi] 11> <DeleteParameters> <asp:parameter Namee'toriginafKategorild" Type='Tnt l ô" I> -casp.parameter Namee.'toriginal Kategori Adi" Type=11String11 I> <IDeleteParameters> <UpdateParameters> <asp:parameter NamceKategori.Adi" TypeeString" I> <asp:parameter Name=11original_Kategorild11 Typcevlnt lô" I> -casp.parameter Namee'toriginal Kategori.Adi" TypeeString" I> </U pdateparameters> <lnsertparameters> -casp.parameter NameeKategori.Adi" TypeeString" I> <IInsertParameters> <lasp:sqldatasource> <asp.label ID=11Labell II runat='tserver" Style="z-index: 101; left: 160px; position: absolute; top: 304px11 Text=Kategori Düzenle'c-x/asp.Label> <br I> <a href="../anasayfa.aspx11>geri<la> nbsp; cnbsp; 34
45 <br I> <br I> -cbr I> <br I> <br I> II <asp:gridview ID=11GridViewl runatevserver" Allowf'agingeTrue" Allowôortinge'True" Autofieneratef.olumns=t'False'' Datalçeylvames=Kategorild" DataSourceID=''SqlDataSource2'' Stylc="z-index: 103; left: 168px; position: absolute; top: 504px11> <Columns> <asp:commandfield Showl.ıeleteljuttone'True'' Showbditlsuuon=t'True" I> <asp:boundfield DataField=" Kategorild" HeaderText=" Kategorild" Insert Visibk= 11F alse 11 ReadOnlyeTrue" Sortfixpression='Kategorild" I> <asp :BoundField DataField= "Kategori Adi II HeaderText= "Kategori Adi 11 SortExpression="KategoriAdi" I> </Columns> <lasp:gridview> <asp:sqldatasouree ld="sqldatasource211 runat=11server" ConfiictDetection= "CompareAll Values" ConnectionString=11<%$ ConnectionStrings:MyConnection %>11 Delcterommande-'Dlil.E'Tf FROM [Kategori] WHERE [Kategorild] AND [KategoriAdi] InsertCommand=11INSERT INTO [Kategori] ([KategoriAdi]) VALUES (@KategoriAdi)" OldValuesParameterFormabString="original_ {O}" SelectCommand=" SELECT * FROM [Kategori] ORDER BY [KategoriAdi]" UpdateCommand="UPDATE [Kategori] SET [KategoriAdi] WHERE [Kategorild] AND [KategoriAdi] "> <Delete Parameters> -casp.parameter Namee'toriginafKategorild" Type="Int16" I> -casp.parameter NameetoriginafKategori.Adi" Type=t'String" I> </DeleteParameters> <UpdateParameters> -casp.parameter Name="KategoriAdi" Typc="String" I> <asp:parameter Namee.voriginalKategorild" Type=11Intl611 I> -casp.parameter Name="original_KategoriAdi" TypeeString" I> <IUpdatef'arameters> <Insertl'arameters> 35
46 -casp.parameter Name="KategoriAdi" Type="String" I> <llnsertparameters> <lasp:sqldatasource> <br I> -cbr I> </asp:content> 3.1- b) CODE FOR using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.Ul; using System.Web.DI.WebControls; using System.Web.DI.WebCont;ols.WebParts; using System.Web.DI.HtmlControls; public partial class Urunfikle : System.Web.Ul.Page { protected void Page_Load(object sender, EventArgs e) { 36
47 3 Marka Ekle Markaid 1001 Arçelik Buzdolabı.2 - a) CODEJ:OR " d@ Page Language="C#" MasterPageFilc="-/BaşSayfa.master" toeventwireup="true" CodeFile="MarkaEkle.aspx.cs" erits="adminpages_markaekle" Title="Untitled Page",%> sp.content ID="Contentl" ContentPlaccHolderID="ContentPlaceHolderl" at="server"> znbsp; <asp:label ID="Labell" rumıt="server" Sryleez-index: 100; left: 264px; position: lute; top: 312px" Tcxt="Marka Ekle'c-c/asp.Label> <asp:detailsview ID="DetailsView 1" runat="server" AllowPaging="True" GenerateRows="False" DataKeyNames="Markaid" DataSourccID="SqlDataSourcel" Height="50px" e='z-index: 101; left: 264px; position: absolute; top: 344px" Width="352px"> <Fields> 37
48 <asp:boundfield Dataf'ield= "Markald II Header'I'ex t= "Markald 11 InsertVisible=11False11 ReadOnly="True11 Sortfixpression=Markald" I> <asp:boundfield DataField= "Marka Adi II HeadcrText= "MarkaAdi 11 SortExpression= "MarkaAdi II I> <asp:boundfield DataltieldeLlrurtAdi" Header'Iexte'Tlrun.Adi" Sortfixpression='Tlrun.Adi'' I> <asp: CommandField ShowDeleteB utton= "True" ShowEditB utton= "True 11 Showlnsertlsutton='True" I> </Fields> <lasp:details View> <br I> <a href="../anasayfa.aspx11>geri</a><br I> <br I> <br I> <brl> <br Z> II <asp:sqldatasource ID="SqlDataSourcel runat=vserver" ConfüctDetection= 11 CompareAll Values 11 ConrıectiortString= 11<%$ ConnectionStrings: MyConnection ffo>11 DelcteCommand=11DELETE FROM [Marka] WHERE [Markaid] AND [MarkaAdi] AND [UrunAdi] TnsertCommand=11INSERT INTO [Marka] ([MarkaAdi], [UrunAdi]) OldValuesParameterFormatString=11original_ {O} 11 Selectf.ommand>" SELECT * FROM [Marka] ORDER BY [MarkaAdi]" UpdateCommand=11UPDATE [Marka] SET [MarkaAdi] [UrunAdi] WHERE [Markald] AND [MarkaAdi] AND [UrunAdi] -cdeletel'arameters> «asp.parameter Nameevoriginal Markald" Type='Tntl ô" I> -casp.parameter Nameevoriginal Marka.Adi" Typee-String" I> «asp.parameter Name=11cııriginal_UrunAdi11 Type=11String" I> <IDeleteParameters> <Updatef'arameters> <asp:parameter Name="MarkaAdi" Typc=".String" I> <asp:parameter Namee'Tlrun.Adi" Type=11String" I> <asp:parameter Name="original_Markald" Type="Intl611 I> -casp.parameter Nameevoriginal jmarka.adi" Typc="String" I> -casp.parameter Name="original_UrunAdi" Type="String" I> <IUpdatel'arameters> -cinsertl'arameters> <asp.parameter Narnc="MarkaAdi" Typc="String" I> «asp.parameter Namee'Tlrun.Adi" Type=11String" I> <IInsertParameters> -o'asp: SqlDataSourcc> 38
49 <br I> <asp:gridview ID=11GridViewl II runaı='tserver" AllowPaging=11True11 AllowS0rting="True11 AutoGenerateColumns=11False" DataKey Names= "Markald" DataSourceID= 11 SqlDataSource2" Stylee'z-index: 103; left: 264px; position: absolute; top: 480px11 Width=11352px11> <Columns> <asp:commandfield Showpelerelıuttoue'True" ShowEditButton=11True11 I> <asp:boundfield DataField=11Markald" HeaderText=11Markald11 InsertVisihle="False11 ReadOnly=11True11 Sortlixpression= "Markald II I> <asp:boundfield DataField="MarkaAdi" Header'I'exte'tlvlarka.Adi'' Sortfixpression= ''MarkaAdi" I> II <asp:boundfield DataField="UrunAdi Header'TexteUrun.Adi" SortfixpressioneTlrurtAdi" I> -c/columns> <lasp:gridview> <asp:sqldatasource ID="SqlDataSource2" runat='tserver" ConflictDetection=11CompareAllValues" Connections tring= ".<o/d$ Connections trings: MyConnection %>" DeleteCommand="DELETE FROM [Marka] WHERE [Markald] AND [MarkaAdi] AND [UrunAdi] InsertCommand="INSERT INTO [Marka] ([MarkaAdi], [UrunAdi]) VALUES OldValucsParametcrFormatString="original_{O}" SelectComrnand="SELECT * FROM [Marka] ORDER BY [MarkaAdi]" UpdateCommand=11UPDATE [Marka] SET [MarkaAdi] [UrunAdi] WHERE [Markald] AND [MarkaAdi] AND [UrunAdi] <Delete Parameters> -casp.parameter Name="original_Markald" Typee.'Tnt l ô" I> -casp.parameter Name=11original_MarkaAdi" Type="String11 I> <asp:parameter Name="original_UrunAdi" Typc="String11 I> <IDeleteParameters> " <UpdateParameters> <asp:parameter Name="MarkaAdi11 TypeeString" I> <asp:parameter Namc="UrunAdi" Typc="S.tring" I> -casp.parameter Name="original_Markald11 Type=11lntl611 I> -casp.parameter Name="original_MarkaAdi" Type="String" I> <asp:parameter Namee'toriginal LlrurtAdi" Type="String11 I> <IUpdateParameters> «Insertl'arameters> <asp:pararneter Narne="MarkaAdi" Type="String" I> <asp:parameter Name="UrunAdi" Typc="String" I> <llnsertparameters> <lasp:sqldatasource> <br I> 39
50 <br I> <br I> <br I> -cbr I> <lasp:content> b ) C# CODE FOR using System; using System.Data; using System. Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.Ul; using System.Web.DI.WebControls; using System.Web.DI.WebControls.WebParts; using System.Web. Ul.Html Controls; ublic partial class Adminl'agesJvlarkalikle : System.Web.Ul.Page { protected void Page_Load(object sender, Event/vrgs e) { I 40
51 Model Ekle imode!id 1117 [ModelAdi 3000 Devir [MarkaAdi IArçelık ju~di!çamaşırmakinesi!ıyat 450 (StokMiktari _ :Jodit Delete New fffi~ ;ii;i[ IvI~cleL'\di!Edit Delete Devir Arçelık!Edit Deletel121 4 ocaklıçift kapaklı :5000 Devır,vestel a) CODE FOR <%@ Page Language="C#" ~ MasterPagcFilc="-/BaşSayfa.master" Autolivent Wireup= "true" Code File= "ModelEkle. aspx.cs" Inherits="AdminPages_ModelEkle" Title="Untitled Page" ~> <asp:content ID="Contentl" ContentPlaccHolderID="ContentPlaceHolderl" unat=''server"> <asp.label ID="Labell" runat="server" Styleez-index: 100; left: 184px; position: olute; top: 320px" Text="Model Ekle'c-c/asp.Label> <br I> <a hrefe"../anaxayfa.aspx'c-geri-c/a>«br I> <br I> <br I> <br I> 41
52 <asp:gridview ID="GridViewl" runat="server" AilowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKey N ames="modelld" DataSourceID=" SqlDataSource2" Stylee.'z-index: 103; left: 528px; position: absolute; top: 368px" Width="496px"> <Columns> <asp:conunandfield ShowDeleteButton="True" ShowEditBtıtton="True" I> <asp:boundfield DataField="Modelld" HcaderText="Modelld" InscrtVisihle="False" RcadOnly="True" SortExpression="Modelld" I> <asp:boundfield DataField="ModelAdi" HeaderText="ModelAdi" SortExprcssion="ModelAdi" I> <asp:boundfield DataFicld="MarkaAdi" HcadcrTcxt="MarkaAdi" Sortlixpression= "MarkaAdi" I> <asp:boundfield DataField= "UrunAdi" HeaclerText= "UrunAdi" SortExpression="UrunAdi" I> <asp:boundfield DataField="Fiyat" HcadcrText="Fiyat" SortExpression="Fiyat" I> <asp:boundfield DataField=" StokMiktari" HeaderText=" StokMiktari" SortExprcssion="StokMiktari" I> -c/columns> <lasp:gridview> <asp: Details View ID=" Details View 1" run at=" server" Allow Paging= "True" AutoG-enerateRows="False" DataKeyNarnes="Modelld" DataSourceID="SqlDataSourcel" Height="50px" Sty1e="z-index: 102; left: 24px; position: absolute; top: 368px" Width="488px"> <Fields> <asp:boundfield Datal-ield= "Mode lid" HeaderTex t="modelld ti InsertVisible="False" ReadOnly="True" SortExpression="Modelld" I> <asp: BoundField Datal-ield= ti ModelA<li" Header'I'ext= "ModelAdi" SortExpression="ModelAdi" I> <asp:boundfield DataFicld="MarkaAditl HcaderTcxt=tlMarkaAdi" SortExpression="MarkaAdi" I> <asp:boundfield DataFicld=''UrunAditl HeaderText=tlUrunAdi" SortExpression= "UrunAdi ti I> <asp:boundfield DataField=tlFiyat'' HcadcrText=tlFiyat" Sortlixpression=Piyat" I> <asp:boundfield DataField="StokMiktaritl HeaderText=tlStokMiktari" Sorılixpressiou=" StokMiktari" I> -casp.commandf-ield ShowDeleteButton="True'' ShowEditButton="True'' Showlnsertbutton=t'True" I> <!Fields> <lasp:details View> <brl> 42
53 II <asp:sqldatasource ID="SqlDataSourcel runaıe+server" ConflictDetection= "CompareAllValues" Connection String= ";~o/o$ ConnectionStrings :MyConnection fo> 11 DeleteComınancl=11DELETE FROM [Model] WHERE [Modelld] AND [ModelAdi] AND [MarkaAdi] AND [UrunAdi] AND AND [StokMiktari] InsertComrnand="INSERT INTO [Model] ([ModelAdi], [MarkaAdi], [UrunAdi], [Fiyat], [StokMiktari]) 11 OldValuesParameterFormatString=" original_ {O}" SelectComınand=" SELECT * FROM [Model] ORDER BY [ModelAdi]" UpdateCommand="UPDATE [Model] SET [ModelAdi] [MarkaAdi] [UrunAdi] [StokMiktari] WHERE [Modelld] AND [ModelAdi] AND [MarkaAdi] AND [UrunAdi] AND AND [StokMiktari] S tokmiktari" > <DeleteParameters> <asp:parameter Name="original_Modelld" Type="Int16" I> -casp.parameter Name='1original_ModelAdi" Type="String" I> -casp.parameter Namee.'toriginal jvlarka.adi" Type="String" I> <asp:parameter Name="original_UrunAdi" Type=11String" I> -casp.pararneter Nameevoriginal Fiyat" Type=11Int3211 I> «asp.parameter Namc="original_StokMiktari" Type=11Intl611 I> </Delete Parameters> <UpdateParameters> -casp.parameter Name="ModelAdi11 Type=11String" I> <asp:parameter NameeMarka.Adi" Type="String11 I> <asp:parameter Narne=11UrunAdi" Typc="String11 I> <asp:parameter Narne="Fiyat" Type=11Int3211 I> -casp.parameter NameeStoklvliktari" Type="Intl611 I> <asp:parameter Name=11original_Modelld" Typee'Tntl ô" I> <asp:parameter Name="original_ModelAdi" Type=11String" I> -casp.parameter Namee'toriginal Marka.Adi" Type="String" I> <asp:parameter Nameevoriginal LlrunAdi" Type="String" I> -casp.parameter Narne="original_Fiyat" Type="Int3211 I> -casp.parameter Nameevoriginal Stoklvliktari'' Type="Int16" I> <IUpdateParameters> <lnsertparameters> -casp.parameter Name='Model.Adi" Type="String11 I> -casp.parameter NameeMarka.Adi" Type="String" I> -casp.parameter NameeUrun.Adi" Type="String" I> <asp:parameter Name=Piyat'' Type=11Int32" I> <asp:parameter Name="StokMiktari" Typc=11Intl611 I> -c/insertl'aramctcrs> </asp:sqldatasource> 43
54 <asp:sqldatasource ID=11SqlDataSource2" runatevserver" ConflictDetection= 11CompareAllValues 11 Connectionxtring=t'<jbô ConnectionStrings:MyConnection,%>11 DeleteCoınrnand=11DELETE FROM [Model] WHERE [Modelld] AND [ModelAdi] AND [MarkaAdi] AND [UrunAdi] AND AND [StokMiktari] InsertCornmand=11lNSERT INTO [Model] ([ModelAdi], [MarkaAdi], [UrunAdi], [Fiyat], [StokMiktari]) 11 OldValuesParaıneterFormatString="original_ {O} 11 Se1cctCommand=11SELECT * FROM [Model] ORDER BY [ModelAdi]" UpdateCommand=11UPDATE [Model] SET [ModelAdi] [MarkaAdi] [UrunAdi] [StokMiktari] WHERE [Modelld] AND [ModelAdi] AND [MarkaAdi] AND [UrunAdi] AND AND [StokMiktari] tokmiktari 11 > <Delete Parameters> <asp:parameter Naıne="original_Modelld" Type="lntl611 I> -casp.parameter Narneevoriginal Model.Adi" Type=11String11 I> «asp.parameter Name=11original_MarkaAdi11 Type=11String11 I> <asp:pararneter Namee'tonginalUrun.Adi" Type=11String11 I> -casp.pararneter Name=11original_Fiyat11 Typee.'Tntô?" I> -casp.parameter Name="original_StokMiktari" Type="lnt16" I> «/Deletel'arameters> <Updatef'arameters> -casp.parameter Namee'Model.Adi" Type=11String" I> -casp.parameter Name=11MarkaAdi" 'IypeeString" I> -casp.parameter Name=11UrunAdi11 Type=11String11 I> -casp.parameter Naınc=11Fiyat11 Type=11lnt3211 I> «asp.parameter Namee'fitoklvliktari'' Tvpeee'Tnt l.ô" I> -casp.parameter Name="original_Modclld11 Typc=11lntl611 /> -casp.parameter Name=11original_ModelAdi11 Typee+String'' I> -casp.parameter Nameeongmal Markaôdi" TypeeString'' I> -casp.parameter Name="@riginal_UrunAdi11 Type=11String11 I> -casp.parameter Nameevoriginal Piyat" Typc=11lnt3211 I> -casp.parameter Narne=11original_StokMiktari" Type="lnt16" I> -c/updatel'arameters> <lnsertparameters> <asp:parameter Name="ModelAdi" Type=11String" I> -casp.parameter Namc="MarkaAdi" Type="String" I> -casp.parameter Naıne="UrunAdi" Typc="String" I> -casp.parameter Namc="Fiyat" Type=11lnt32" I> -casp.parameter Name=11StokMiktari11 Typc=11Intl611 I> <llnscrtparameters> </asp:sqldatasource> <br I> 44
55 <brl> <brl> <br I> <br I> <br I> &nhsp; &nhsp; &nhsp; &nhsp; &nhsp; &nhsp; &nhsp; &nhsp; &nhsp; &nhsp; &nhsp; &nhsp; &ııbsp; &nhsp; &nhsp; &nhsp; &nhsp; &nhsp; &nhsp; &nhsp; &nhsp; <br I> <hr/> <br Z> <br I> <hr/> <hr/> <hr/> <hr I> <hr/> <hr/> <br I> <hr I> <lasp:content> b ] C# CODE F'OR ModelElde.aspx 45
56 using System; using System.Data; using System.Configuration; using System. Collections; using System.Web; using System.Web.Security; using System.Web.Ul; using System.Web.DI.WebControls; using System.Web.DI.WebControls.WebParts; using System.Web.DI.HtmlControls; public partial class Adminf'agcs Modcllikle: System.Web.DI.Page { protected void Page_Load(object sender, EventArgs e) { 3,e} Untitll!d Pııru, Mozilla Firefoıı: "-- ~-ı--,,..~,~ı,~v ~..ı,....a.;tı,<- UrünDüzeııle Edit Delete SelectjlOOO ju~;~ıi,iluı~~~a.&[kateır.oıiadi IBuzdolabııBeyaz Eşya,Edi.I Delete Sele~ct 1002 f Edit Delete Select 1004 ~;,i!beyaz Eşya Dız Ustü teiektronik ffufu~~ Fırın BeyazEş:,ı:a_j. Masa Elektronik Edıt Delete~ 1005 Üstü -.::.::: ~! 46
57 3.4 - a ) ASP CODE FOR ~.%@ Page Language="C#" MasterPageFile="-/BaşSayfa.master" AutoEventWireup="true" CodeFile="UrunEkle.aspx.cs" Inherits="AdminPages_UrunEkle" Title="Untitled Page"%> <asp.content ID="Contentl" ContentPlaccHolderID="ContentPlaceHolderl" Runat="Server"> <asp:detailsview ld="detailsviewl" runat="server" AllowPaging="True" DataSourceID="SqlDataSourcel" Height="50px" Style="z-index: 100; left: 120px; position: absolute; top: 344px" Width="256px"> <Fields> <asp:commandfield ShowDeleteButton="True" ShowEditButton="True" ShowinsertButton="True" I> </Fields> <lasp:details View> <asp:sqldatasource ID="SqlDataSourcel" runat="server" ConfüctDetection= "CompareAll Values" ConncctionString="<9fu$ ConnectionStrings:MyConnection :%>" DcleteCommand="DELETE FROM [Urun] WHERE [Urunid] AND [UrunAdi] AND [KategoriAdi] InscrtCommand="INSERT INTO [Urun] ([UrunAdi], [KategoriAdi]) VALUES OldValuesParameterFormatString="original_ {O}" SelectCommand=" SELECT * FROM [Urun] ORDER BY [UrunAdi]" UpdateCommand="UPDATE [Urun] SET [UrunAdi] [KategoriAdi] WHERE [Urunld] AND [UrunAdi] AND [KatcgoriAdi] <Delete Parameters> -casp.parameter Name="original_Urunld" Type="Int16" I> -casp.parameter Name="qriginal_UrunAdi" Type="String" I> -casp.parameter Namc="original_KategoriAdi" Type="String" I> -c/deleteparameters> <UpdateParameters>, -casp.parameter Narne="UrunAdi" Type="String" I> -casp.parameter Name="KategoriAdi" Type="String" I> -casp.parameter Naınc="original_Urunld" Type="Int16" I> -casp.parameter Name="original_UrunAdi" Typc="String" I> -casp.parameter Name="original_KategoriAdi" Type="String" I> <IUpdateParameters> <lnsertparameters> -casp.pararneter Namc="UrunAdi" Type="String" I> -casp.parameter Narne="KategoriAdi" Type="String" I> </InsertParameters> <lasp:sqldatasource> 47
58 <asp:label ID="Labell" runat="server" Style="z-index: 101; left: 120px; position: absolute; top: 304px" Text="Ürün Düzenle"><lasp:Label> <a href="../anasayfa.aspx">geri<la><br I> <brl> <br I> <br I> <asp:gridview ID="GridViewl" runat="server" Allowl'aging='True" AllowSorting="True" AutoGenerateColunms="False" DataKeyNames= 11U runld" DataSourcclD= 11 SqlDataSource2'' Style="z-index: 103; left: 400px; position: absolute; top: 336px" Width="264px"> <Columns> <asp:commandfield Showljeletefsutton='True" SbowEditButton="True" ShowSe1ectButton="True" I> <asp:boundfield DataField="Urunld" HeaderText="Urunld" Insertv isible="false" ReadOnly="True" SortExpression=11Urunld" I> <asp:boundfield DataFieJ,d=''UrunAdi"HeaderText=''UrunAdi'' SortExpression="UrunAdi II I> <asp:boundfield DataFiclli="KategoriAdi" HcadcrTcxt="KatcgoriAdi" SortExprcssion="KatcgoriAdi II I> «/Columns> </asp:gridvicw> <asp:sqldatasource ID="SqlDataSourcc2" runat='tservcr" ConflictDctection=''ComparcAllValucs'' ConnectionString="<%$ ConnectionStrings:MyConnection %>'' DeleteCommand="DELETE FROM [Urun] WHERE [Urunld] AND [UrunAdi] AND [KategoriAdi] lnsertcommand=11insert INTO [Urun] ([UrunAdi], [KategoriAdi]) VALUES OldValuesParameterFormatString="original_ {O}" SelectCornmand="SELECT * FROM [Urun] ORDER BY [UrunAdi]" 48
59 UpdateCommand="UPDATE [Urun] SET [UrunAdi] [KategoriAdi] WHERE [Urunld] AND [UrunAdi] AND [KategoriAdi] <DeleteParameters> -casp.parameter Name="original_Urunld" Type="lnt16" I> <asp:parameter Name="original_UrunAdi" Type="String" I> <asp:parameter Name="original_KategoriAdi" Typc="String" I> </DeleteParameters> <U pdateparameters> -casp.parameter Name="UrunAdi" Type="String" I> <asp:parameter Namc="KategoriAdi" Typc="String" I> -casp.pararneter Namc="original_Urunld" Typc="lnt16" I> <asp:parameter Name="original_UrunAdi" Type="String" I> -casp.pararneter Name="original_KategoriAdi" Type="String" I> <ı'updateparameters> <InsertParameters> <asp:parameter Name="UrunAdi" Type="String'' I> «asp.parameter Name="KategoriAdi" Type="String" I> </lnsertparamcters> <lasp:sqldatasource> <br I> <br /> <br I> «br /> <lasp:content>.., I: 3.4 b) (ODE FOR using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.DI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class AdminPages_lJrunEkle: System.Web.DI.Page { protected void Page_Load(object sender, EventArgs e) { 49
60 50.. ı:
61 CHAPER 4: CONFIGURATION PAGES 4.1-a)PAGE <?xml version>" 1.0" erıcoding=l'utf-s "?> <configuration> <system. web> <authorization> <deny roles="siteuye" I> <deny users="?" I> -c/authorization> -o'system.web> <!configuration>.. E 51
62 4,2 - a) PAGE <?xml version=" 1.0"?> <configuration> <connections trirıgs> <add name="myconnection" connectionstring="data Source=.\SQLEXPRESS;AttachDbFilename=JDataDirectoryl\ASPNETDB.MDF;Integr ated Securitye'True; User Instance= True" provider Name=" S ystem.data.sql Client'"> </connections trirıgs> <system. web> <authorization> <allow roles="admin"/> -c/authorization> <rolemanager enabled='frue'"> <authentication mode="forms"i> <compilation debug="true"/></system. web> </configuration> 52
63 CHAPTER 5 : WORK ENVIRONMENT ModelEkle.aspx. cs [0] lliunekle, aspx 1fil UrunEkle.aspx.cs il@ web.config $] App_Data Gill AnaScıyfa.aspx C:J BaşSayfa.master ;J±ı Hesap. aspx (@] Login.aspx t@ SatinAI. aspx [El Search.aspx illfil Sepet, aspx [@j UrunSecme.aspx ]& web.config Detebese Diagrams Tables... ~ aspnet_applications +, [ill aspnet_membershıp ffi UQ aspnet_paths H+ f111 aspnet_personalizationaiiusers te Üfil aspnet_personalizationperuser ± IT1} aspnet_profile UM aspnet_roles lfj. Gfil aspnet_schemaversions l t1'a aspnet_users if ÜE aspnet_userslnroles f:ın as:pnet_webevent_events J Sill Kategori 'İJ 3iJ Marka İ illi1 Model 'f 1fil ModelOzellik 't.i Q3 Sepet H-> Q1 Urun rb f1y Views ( Qm Stored Procedures lf.ı Gd Functions i kili Synonyms $ Lill Types lt.1 C1J Assemblies VISUAL WEB DEVELOPER 2005 FOR INTERFACE AND C# AND ASP FOR PROGRAMMING AND SQLSERVER 2005 FOR DATABASE 53
64 CHAPTER 6 : TABLES ApplicationName nvarchar(256) LoweredApplicationName nvarchar(256) Applicationld uniqueidentifier Description nvarchar(256) Unchecked Unchecked Unchecked Checked Applicationld uniqueidentifier Unchecked Userld uniqueidentifier Unchecked Password nvarchar(128) Unchecked PasswordFormat int Unchecked PasswordSalt nvarchar(128) Unchecked MobilePIN nvarchar(16) Checked nvarchar(256) Checked Lowered nvarchar(256) Checked PasswordQuestion nvarchar(256) Checked PasswordAnswer nvarchar(l 28) Checked lsapproved bit Unchecked IsLockedOut bit Unchecked CreateDate datetime Unchecked LastLoginDate datetime Unchecked LastPasswordChangedDate datetime Unchecked LastLockoutDate datetime Unchecked FailedPasswordAttemptCount int Unchecked 54
65 FailedPasswordAttempt Windows tart date time Unchecked FailedPasswordAnswerAttemptCount int Unchecked FailedPasswordAnswer Attempt Window Start date time Unchecked Comment ntext Checked 6,3 ~ Applicationld uniqueidentifier Unchecked Pathld uniqueidentifier Unchecked Path nvarchar(256) Unchecked LoweredPath nvarchar(256) Unchecked Pathld uniqueidentifier Unchecked PageSettings image Unchecked LastUpdatedDate date time Unchecked l< Id uniqueidentifier Unchecked Pathld uniqueidentifier Checked User Id uniqueidentifier Checked PageSettings image Unchecked LastUpdatedDate date time Unchecked 55
66 6,6 - User Id Property PropertyValuesString Property ValuesBinary LastUpdatedDate uniqueidentifier Names ntext ntext ımage date time Unchecked Unchecked Unchecked Unchecked Unchecked 6,7 - Applicationld uniqueidentifier Unchecked Roleld uniqueidentifier Unchecked RoleName nvarchar(256) Unchecked LoweredRoleN ame nvarchar(256) Unchecked Description nvarchar(256) Checked Feature nvarchar(128) Unchecked CompatibleSchema Version ~ nvarchar(128) Unchecked IsCurrent Version bit Unchecked Applicationld Userld User Name uniqueidentifier uniqueidentifier nvarchar(256) Unchecked Unchecked Unchecked 56
67 LoweredU sern arne nvarchar(256) Unchecked MobileAlias IsAnonyrnous LastActivityDate nvarchar(l 6) bit date time Checked Unchecked Unchecked User Id Roleld uniqueidentifier uniqueidentifier Unchecked Unchecked Eventld char(32) EventTirneUtc date time Unchecked EventTirne date time Unchecked EventType nvarchar(256) Unchecked EventSequence Unchecked decirnal(l9, O) Unchecked Eventüccurrence decirnal(l9, O) Unchecked EventCode int Unchecked EventDetailCode int Unchecked " Message nvarchar(l 024) Checked ApplicationPath nvarchar(256) Checked Application VirtualPath nvarchar(256) Checked MachineN arne nvarchar(256) Unchecked RequestUrl nvarchar( 1024) Checked Exception Type nvarchar(256) Details ntext Checked Checked 57
68 Kategorild smallint Unchecked KategoriAdi nvarchar(30) Unchecked Markald smallint Unchecked MarkaAdi nvarchar(30) Unchecked UrunAdi nvarchar(30) Unchecked Mode lid smallint Unchecked ModelAdi nvarchar(30) Unchecked MarkaAdi nvarchar(30) Unchecked UrunAdi nvarchar(30) Unchecked Fiyat int Unchecked StokMiktari l's. smallınt Unchecked ıs- ModelAdi nvarchar(30) Unchecked ModelOzellikleri text Unchecked ModelFiyatı int Unchecked Taksit_ay tinyint Unchecked 58
69 .. \ I ı,~ I; '", ''- \ ',>,,,':,\,,. to,. ' '\ -,,,..... Sepetld sınallint Unchecked ModelAdi nvarchar(30) Unchecked Fiyat int Unchecked Urunld small int Unchecked UrunAdi nvarchar(30) Unchecked KategoriAdi nvarchar(30) Unchecked 59
70 CHAPER 7 : QUERIES AND DESIGNS AND RESUL TS FOR VIEWS Ft LE Database Dia gr ams rf) (TuJ Tables [?... Llfil Views 1 vw_aspnet_applications vw_aspnet_membershipuseffit! vw _aspnet_profiles vw_aspnet_userslnroles vw_aspnet_webpartstate_ Kategori Urun Model li'l El Rl Marka 0 (fj dbo-.k~t e öorı: Kate ğ öriadi;- db ö-:ürun:ür~~a d i~---dbo: Mode ı: Mo;ieıAdi; dso:i;;ar~:-markaadi; aso:-r.;,oaelfiy;i; cfr;o, Modei: stokmikt:ir i dbo.kategori INNERJOIN dbo.urun ON dbo.kategori.kategoriadi = dbo.urun.kategoriadi INNER JOIN dbo.model ON dbo.urun.urunadi = dbo.model.urunadi INNER JOIN dbo.markaon dbo.model.markaadi= dbo.marka.markaadianddbo.urun.urunadi= dbo,marka.urunadi 1" SELECT dbo.kategori.kategoriadi, dbo.urun.urunadi, dbo.model.modeladi, dbo.marka.markaadi, dbo.model.fiyat, dbo.model.stokmiktari FROM dbo.kategori INNER JOIN JOIN dbo.urun ON dbo.kategori.kategoriadi = dbo.urun.kategoriadi INNER dbo.model ON dbo.urun.urunadi = dbo.model.urunadi INNER JOIN dbo.marka ON dbo.model.markaadi = dbo.marka.markaadi AND dbo.urun.urunadi = dbo.marka.urunadi 60
71 1-a) : Buzdolabı arç-çift kapa~ Arçelik 900 Buzdolabı arç-tek kapaklı Arçelik Buzdolabı vest-no-frost Vest el ı:iı l;ill1 vw_aspnet_applications Buzdolabı vest-500 It Vestel j\ ~ 1 vw_aspnet_membershipuse Çamaşır Makinesi 5000 Devir Arçelik ı! 1 QJJ vw_aspnet_profiles Çamaşır Makinesi 3000 Devir Arçelik ıf;- fij vw_aspnet_roles Çamaşır Makinesi A-Plus Vest el 700 Çamaşır Makinesi C-Plus Vestel Diz üstü Pentium3rx2 Arçelik 1000 Diz Ustü Pentium Ce\eron Arçelik Diz Üstü vest lptp celrn Vestel Diz üstü vest lptp P4+ Vestel Masa Üstü pentium4 Veste\ Masa Üstü Deskotp Celeron Vestel 800 Masa Üstü Arç Desktop P4 Arçelik 1000 Masaüstü Arç Desktop Ce\3 Arçelik 1200 NUH NUll NUii NUii NUii il 0/0 ~,., ;r, :,ıv"'" ()c,:,';:,i;~_ii:,r,t,~;u,:, Distinct Values No Q(:.)U?B'i )ı_:- < r sr <-.ı..> :..st : <,.ır..~.v. -.::,.,, _,.,.e Sw 61
72 (~ vw_aspnet_applications vw_aspnet_membershipuse vw_aspnet_users vw_aspnet_userslnro\es vw_aspnet_webpartstatejli Sepet Model Model EZ] Fil o [aj <>0 cıtıo :s epet : Mode ıi,,d"c"abo: M-ödei:-FıYat dbo.model INNER JOIN dbo.sepeton dbo.model.modeladi= dbo,sepet.modeladi (dbo.model.stokmiktari<> O) Description Distinct Values No SELECT FROM dbo.sepet.modeladi, dbo.model.fiyat dbo.model INNER JOIN dbo.sepet ON dbo.model.modeladi = dbo.sepet.modeladi WHERE (dbo.model.stokmiktari <> O) - a} 62
73 t!i ımçhıın Visum Web Develop,r :Z005 gpress EditiPtı Window Community Help NUU SepetView vw_aspnet_applications &r [JU vw_aspnet_membershipuse ff)- ~ vw_aspnet_profiles ffj [illl vw_aspnet_roles l±i [fj] vw_aspnet_users ~ [illj vw_aspnet_usersinroles SELECT ApplicationN ame, LoweredApplicationN ame, Applicationld, Description 63
74 FROM dbo.aspnet_applications 7.4 SELECT dbo.aspnet_membership. User Id, dbo. aspnet_membership.passwordformat, dbo. aspnet_membershi p. MobilePIN, dbo. aspnet_membership. , dbo.aspnet_membership.lowered , dbo.aspnet_membership.passwordquestion, dbo.aspnet_membership.passwordanswer, dbo.aspnet_membership.isapproved, dbo.aspnet_membership.islockedout, dbo.aspnet_membership.createdate, dbo. aspnet_membershi p.lastlo gindate, dbo.aspnet_membership.lastpasswordchangeddate, dbo. aspnet_membershi p.lastlockoutdate, dbo.aspnet_membership.failedpasswordattemptcount, dbo.aspnet_membership.failedpasswordattemptwindowstart, dbo.aspnet_membership.failedpasswordanswerattemptcount, dbo.aspnet_membership.failedpasswordanswerattemptwindowstart, dbo.aspnet_membership. Comment, dbo.aspnet_ U sers.applicationid, dbo.aspnet_ Users. UserN ame, dbo.aspnet_ Users.MobileAlias, dbo.aspnet_ Users.IsAnonymous, dbo.aspnet_ U sers.lastacti vitydate FROM dbo.aspnet_membership INNER JOIN dbo. aspnet_ Users.User Id dbo.aspnet_users ON dbo.aspnet_membership.userld = SELECT Userid, LastUpdatedDate, DATALENGTH(PropertyNames) + DATALENGTH(PropertyValuesString) + DAT ALENGTH(PropertyValuesBinary) AS DataSize FROM dbo.aspnet_profile 64
75 SELECT Applicationld, Roleld, RoleName, LoweredRoleName, Description FROM dbo.aspnet_roles SELECT Applicationld, Userld, UserName, LoweredUserName, MobileAlias, IsAnonymous, LastActivityDate FROM dbo.aspnet_users SELECT FROM Userld, Roleld dbo.aspnet_userslnroles SELECT Applicationld, Pathld, Path, LoweredPath FROM dbo.aspnet_paths SELECT Pathld, DATALENGTH(PageSettings) AS DataSize, LastUpdatedDate FR OM dbo. aspnet_personalizationall Users 65
76 SELECT Pathld, Userld, DATALENGTH(PageSettings) AS DataSize, LastUpdatedDate FROM dbo.aspnet_personalizationperu ser 66
77 CHAPTER 8 : STORED PROCEDURES ALTER PROCEDURE int AS -- Check Membership table if (@TablesToCheck & l) is set IF ((@TablesToCheck & 1) <> O AND (EXISTS (SELECT name FROM sysobjccts WHERE (name= N'vw_aspnet_MembcrshipUsers') AND (type= 'V')))) IF (EXISTS(SELECT TOP 1 Userld FROM dbo.aspnet_membership)) SELECT N'aspnet_Membership' RETURN -- Check aspnct_roles table if (@TablesToCheck & 2) is set IF ((@TablcsToCheck & 2) <> O AND (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_Roles') AND (type= 'V')))) IF (EXISTS(SELECT TOP 1 Roleid FROM dbo.aspnet_roles)) SELECT N'aspnet_Roles' RETURN ' -- Check aspnet Profile table if (@TablesToChcck & 4) is set IF ((@TablcsToCheck & 4) <> O AND (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_Profiles') AND (type= 'V')))) IF (EXISTS(SELECT TOP 1 Userld FROM dbo.aspnet_profile)) SELECT N'aspnet_Profile' RETURN 67
78 -- Check aspnet_personalizationperuser table if & 8) is set IF & 8) <> O AND (EXISTS (SELECT name FROM sysobjects WHERE (name= N'vw_aspnet_WebPartState_User') AND (type= 'V')))) IF (EXISTS(SELECT TOP 1 Userld FROM dbo.aspnet_personalizationperuser)) SELECT N'aspnet_PersonalizationPerUser' RETURN -- Check aspnet_personalizationperuser table if (@TablesToCheck & 16) is set IF ((@TablesToCheck & 16) <> O AND (EXISTS (SELECT name FROM sysobjects WHERE (name= N'aspnet_WebEvent_LogEvent') AND (type= 'P')))) IF (EXISTS(SELECT TOP 1 * FROM dbo.aspnet_webevent_events)) SELECT N'aspnet_WebEvent_Events' RETURN -- Check aspnet_users table if (@TablesToCheck & 1,2,4 & 8) are all set IF ((@TablesToCheck & 1) <> O AND (@TablesToCheck & 2) <> O AND (@TablesToCheck & 4) <> O AND (@TablesToCheck & 8) <> O AND (@TablesToCheck & 32) <> O AND (@TablesToCheck & 128) <> O AND (@TablesToCheck & 256) <> O AND (@TablesToCheck & 512) <> O AND (@TablesToCheck & 1024) <> O) ~ IF (EXISTS(SELECT TOP 1 Userid FROM dbo.aspnet_users)) SELECT N'aspnet_Users' RETURN IF (EXISTS(SELECT TOP 1 Applicationid FROM dbo.aspnet_applications)) SELECT N'aspnet_Applications' RETURN 68
79 ALTER PROCEDURE [dbo].aspnet_applications_ uniqueidentifier OUTPUT AS = Applicationld FROM dbo.aspnet_applications WHERE LOWER(@ ApplicationN arne) = LoweredApplicationN arne IF(@Applicationld IS NULL) bit = = O) TRANSACTION = 1 ELSE = O Applicationld = Applicationld FROM dbo.aspnet_applications WITH (UPDLOCK, HOLDLOCK) WHERE LOWER(@ ApplicationN arne) = LoweredApplicationN arne IF(@Applicationld IS NULL) Applicationld = NEWID() INSERT dbo.aspnet_applications (Applicationld, ApplicationN arne, LoweredApplicationN arne) VALUES LOWER(@ApplicationN arne)) ~ = 1 ) IF(@@ERROR = O) = O COMMIT TRANSACTION ELSE = O ROLLBACK TRANSACTION 69
80 ALTER PROCEDURE [dbo].aspnet_applications_ arne uniqueidentifier OUTPUT AS = Applicationld FROM dbo.aspnet_applications WHERE LOWER(@ApplicationNarne) = LoweredApplicationNarne IF(@Applicationld IS NULL) bit = O = O ) TRANSACTION = 1 ELSE = O ı. Applicationld = Applicationld FROM dbo.aspnet_applications WITH (UPDLOCK, HOLDLOCK) WHERE LOWER(@ApplicationNarne) = LoweredApplicationNarne ' IF(@Applicationld IS NULL) Applicationld = NEWID() INSERT dbo.aspnet_applications (Applicationld, ApplicationNarne, LoweredApplicationNarne) VALUES LOWER(@ApplicationNarne)) = 1 ) 70
81 = O) = O COMMIT TRANSACTION ELSE = O ROLLBACK TRANSACTION ALTER PROCEDURE uniqueidentifier OUTPUT AS = Applicationld FROM dbo.aspnet_applications WHERE LOWER(@ApplicationName) = LoweredApplicationName, IF(@Applicationld IS NULL) bit, = =O) TRANSACTION = 1 ELSE = O Applicationld = Applicationld FROM dbo.aspnet_applications WITH (UPDLOCK, HOLDLOCK) WHERE LOWER(@ApplicationName) = LoweredApplicationName IF(@Applicationid IS NULL) 71
82 Applicationld = NEWID() INSERT dbo.aspnet_applications (Applicationld, ApplicationName, LoweredApplicationN ame) VALUES LOWER(@ ApplicationN ame)) = 1 ) IF(@@ERROR = O) = O COMMIT TRANSACTION ELSE = O ROLLBACK TRANSACTION ALTER PROCEDURE "" nvarchar( 128), nvarchar(128), nvarchar(256), nvarchar(256), nvarchar(128), ff ime Ute date datetime = int = int = AS uniqueidentifier OUTPUT uniqueidentifier 72
83 Applicationid = NULL uniqueidentifier = NULL bit = O datetime = CONVERT( datetime, ' ', 112) int = O datetime = CONVERT( datetime, ' ', 112) int = O datetime = CONVERT( datetime, ' ', 112) bit int O = O int bit = = O ) TRANSACTION = 1 ELSE = O OUTPUT O) = - 1 GOTO Cleanup 73
84 = Userld FROM dbo.aspnet_users WHERE LOWER(@UserName) = LoweredUserName = Applicationid IF IS NULL) Value = dbo.aspnet_ Users_ @NewUserld OUTPUT = 1 ELSE = O IS NOT NULL) = 6 GOTO Cleanup O) = -1 GOTO Cleanup -1) = 10 GOTO Cleanup IF ( EXISTS ( SELECT Userld!< FROM dbo.aspnet_membership = Userld)) = 6 GOTO Cleanup IF (@Unique = 1) IF (EXISTS (SELECT * FROM dbo.aspnet_membership m WITH ( UPDLOCK, HOLDLOCK) 74
85 WHERE Applicationld AND Lowered = LOWER(@ ))) = 7 GOTO Cleanup IF (@NewUserCreated = O) UPDATE dbo.aspnet_users SET LastActivityDate = Userld O) = - 1 GOTO Cleanup INSERT INTO dbo.aspnet_membership ( Applicationld, UserId, Password, PasswordSalt, , Lowered , PasswordQuestion, PasswordAnswer, PasswordFormat, IsApproved, IsLockedOut, CreateDate, LastLoginDate, LastPasswordChangedDate, LastLockoutDate, ı. FailedPasswordAttemptCount, FailedPasswordAttemptWindowStart, FailedPasswordAnswerAttemptCount, FailedPasswordAnswerAttemptWindowStart) 75
86 @FailedPasswordAttemptWindowStart, IF( O) = -1 GOTO Cleanup = 1 ) = O COMMIT TRANSACTION RETURN O Cleanup: = 1 ) = O ROLLBACK TRANSACTION ALTER PROCEDURE int, 76
87 @PageSize int AS uniqueidentifier = NULL = Applicationld FROM dbo.aspnet_applications WHERE LOWER(@ApplicationNaille) = Lowered Applicatiorılvame IF (@Applicationld IS NULL) RETURN O -- Set the page bounds int int int Create a temp table TO store the select results CREATE TABLE #PagelndexForUsers ( Indexld int IDENTITY (O, 1) NOT NULL, U serld uniqueidentifier ) -- Insert into our temp table IS NULL) INSERT INTO #PagelndexForUsers (Userld) SELECT u.userld FROM dbo.aspnet_users u, dbo.aspnetmembership ill WHERE u.applicationld AND ill.userld = u.userld AND ill. IS NULL ORDER BY m.loweredlimail ELSE INSERT INTO #PagelndexForUsers (Userld) SELECT u.userld FROM dbo.aspnet_users u, dbo.aspnet_meillbership ill WHERE u.applicationld AND ill.userld = u.userld AND m.loweredlimail LIKE LOWER(@EillailToMatch) ORDER BY m.loweredlimail SELECT u.userlvame, m. , m.passwordquestion, ill.comment, m.is Approved, ill. CreateDate, ill.lastlogindate, u.lastactivitydate, ill.lastpasswordchangeddate, u.userld, m.isl.ockedout, ill.lastlockoutdate FROM dbo.aspnetmembership ill, dbo.aspnet_users u, #PagelndexForUsers p WHERE u.userld = p.userld AND u.userld = ill.userld AND p.indexld AND p.indexld 77
88 ORDER BY rn.loweredernail = COUNT(*) FROM #PagelndexForUsers ALTER PROCEDURE int AS uniqueidentifier Applicationld = NULL = Applicationld FROM dbo.aspnet_applications WHERE LOWER(@ApplicationNarne) = LoweredApplicationNarne IF (@Applicationld IS NULL) RETURN O -- Set the page bounds int int Create a temp table TO store the select results CREATE TABLE #PagelndexForUsers ( Indexld int IDENTITY (O, 1) NOT NULL, Userld uniqueidentifier ) -- Insert into our temp table INSERT INTO #PagelndexForUsers (Userld) SELECT u.userld 78
89 FROM dbo.aspnet_users u, dbo.aspnet_membership m WHERE u.applicationld AND m.userld = u.userld AND u.loweredusername LIKE LOWER(@UserNameToMatch) ORDER BY u.username SELECT u.username, m. , m.passwordquestion, m.comment, m.isapproved, m.createdate, m.lastlogindate, u.lastactivitydate, m.lastpasswordchangeddate, u.userld, m.islockedout, m.lastlockoutdate FROM dbo.aspnet_membership m, dbo.aspnet_users u, #PagelndexForUsers p WHERE u.userld = p.userld AND u.userld = m.userld AND p.indexld AND p.indexld ORDER BY u.username = COUNT(*) FROM #PagelndexForUsers ALTER PROCEDURE nvarchar(256), int AS uniqueidentifier Applicationld = NULL = Applicationld FROM dbo.aspnet_applications WHERE LOWER(@ApplicationName) = LoweredApplicationName IF (@Applicationld IS NULL) RETURN O -- Set the page bounds int int 79
90 int Create a temp table TO store the select results CREATE TABLE #PagelndexForUsers ( Indexid int IDENTITY (O, 1) NOT NULL, Userid uniqueidentifier ) -- Insert into our temp table INSERT INTO #PageindexForUsers (Userld) SELECT u.userid FROM dbo.aspnet_users u, dbo.aspnet_membership m WHERE u.applicationid AND m.userid = u.userid AND u.loweredusername LIKE LOWER(@UserNameToMatch) ORDER BY u.username SELECT u.username, m. , m.passwordquestion, m.comment, m.isapproved, m. CreateDate, m.lastlogindate, u.lastactivitydate, m.lastpasswordchangeddate, u.userld, m.islockedout, m.lastlockoutdate FROM dbo.aspnet_membership m, dbo.aspnet_users u, #PagelndexForUsers p WHERE u.userld = p.userld AND u.userld = m.userld AND p.indexid AND p.indexid ORDER BYu.UserName = COUNT(*) FROM #PagelndexForUsers ~ ALTER PROCEDURE dbo.aspnet_membership_ GetNumberOfU ve int, 80
91 @CurrentTimeUtc date time AS datetime = DATEADD(minute, int = COUNT(*) FROM dbo.aspnet_users u(nolock), dbo.aspnet_applications a(nolock), dbo.aspnet_membership m(nolock) WHERE u.applicationld = a.applicationld AND LastActivityDate AND a.loweredapplicationname = LOWER(@ApplicationName) AND u.userld = m.userld ALTER PROCEDURE datetime AS datetime = DATEADD(minute, int = COUNT(*) FROM dbo.aspnet_users u(nolock), dbo.aspnet_applications a(nolock), dbo.aspnet_membership m(nolock) WHERE u.applicationld = a.applicationld AND LastActivityDate AND a.loweredapplicationname = LOWER(@ApplicationName) AND u.userld = m.userld 81
92 ALTER PROCEDURE ame datetime AS bit uniq ueidentifier nvarchar(128) nvarchar(128) int int int bit datetime datetime =NULL = @FailedPasswordAnswerAttemptCount=FailedPasswordAnswerAttemptCount, = = LastLoginDate FROM dbo.aspnet_applications a, dbo.aspnet Üsers u, dbo.aspnet_membership m WHERE LOWER(@ApplicationN ame) = a.loweredapplicationn ame AND u.applicationld = a.applicationld AND u.userld = m.userld AND LOWER(@UserName) = u.loweredusername IF IS NULL) RETURN 1 IF (@IsLockedOut = 1) RETURN 99 82
93 IF = 1 = 1) UPDATE dbo.aspnet_membership SET LastLoginDate WHERE Userld UPDATE dbo.aspnet_users SET LastActivityDate Id = User Id RETURN O ALTER PROCEDURE dbo.aspnet_membership_ GetU serb ame nvarchar(256) AS IS NULL) SELECT u.username FROM dbo.aspnet_applications " a, dbo.aspnet_users u, dbo.aspnet_membership m WHERE LOWER(@ApplicationN ame) = a.loweredapplicationn ame AND u.applicationld = a.applicationld AND u.userld = m.userld AND m.lowered IS NULL ELSE SELECT u.username FROM dbo.aspnet_applications a, dbo.aspnet_users u, dbo.aspnet_membership m WHERE LOWER(@ApplicationN ame) = a.loweredapplicationn ame AND u.applicationld = a.applicationld AND u.userld = m.userld AND LOWER(@ ) = m.lowered 83
94 = O) RETURN(l) RETURN(O) ALTER PROCEDURE dbo.aspnet_membership_ GetU serbyn ame bit= O AS uniqueidentifier IF (@UpdateLastActivity = 1) SELECT TOP 1 m. , m.passwordquestion, m.comment, m.lsapproved, m.createdate, m.lastpasswordchangeddate, u.user Id, m.islockedout,m.lastlockoutdate FROM dbo.aspnet_applications a, dbo.aspnet_users u, dbo.aspnet_membership m WHERE LOWER(@ ApplicationN ame) = a.loweredapplicationn ame AND u.applicationld = a.applicationld AND LOWER(@UserName) = u.loweredusername AND u.userld = m.userld IF (@@ROWCOUNT RETURN -1 dbo.aspnet_users = O) -- Usernarne not found UPDATE SET LastActivityDate = Userld ELSE SELECT TOP 1 m. , m.passwordquestion, m.comment, m.lsapproved, m.createdate, m.lastlogindate, u.lastactivitydate, m.lastpasswordchangeddate, u.u serld, m.lslockedout,m.lastlockoutdate FROM dbo.aspnet_applications a, dbo.aspnet_users u, dbo.aspnet_membership m WHERE LOWER(@ApplicationName) = a.loweredapplicationname AND u.applicationld = a.applicationld AND 84
95 = u.loweredusername AND u.userld = m.userld IF (@@ROWCOUNT RETURN -1 = 0)-- Username not found RETURN O ALTER PROCEDURE dbo.aspnet_membership_ GetU serb yu Id Utc date bit= O AS IF = 1 ) UPDATE dbo.aspnet_users SET LastActivityDate FROM dbo.aspnet_users = U serld IF RETURN -1 =O) -- User ID not found SELECT m. , m.passwordquestion, m.comment, m.isapproved, m.createdate, m.lastlogindate, u.lastactivitydate, m.lastpasswordchangeddate, u.u sern ame, m.islockedout, m.lastlockoutdate FROM dbo.aspnet_users u, dbo.aspnet_membership m = u.userld AND u.userld = m.userld IF RETURN -1 =O) -- User ID not found RETURN O 85
96 15- ALTER PROCEDURE nvarchar( int= nvarchar(l28) = NULL AS bit datetime int datetime int datetime = NULL uniqueidentifier = O int bit = = O ) TRANSACTION = 1 ELSE = O = u.userld FROM dbo.aspnet_users u, dbo.aspnet_applications a, dbo.aspnet_membership m WHERE LoweredUserName = LOWER(@UserName) AND u.applicationld = a.applicationld AND LOWER(@ApplicationName) = a.loweredapplicationname AND u.userld = m.userld IF IS NULL) = 1 GOTO Cleanup 86
97 = = = = = = FailedPasswordAnswerAttemptWindowStart FROM dbo.aspnet_membership WITH ( UPDLOCK) = U serld = 1 ) = 99 GOTO Cleanup UPDATE dbo.aspnet_membership SET LastPasswordChangedDate PasswordFormat PasswordSalt = U serld AND ( IS NULL) OR ( LOWER( PasswordAnswer) = IF =O) > = 1 ELSE ) =
98 = 3 ELSE >O) = O = CONVERT( datetime, ' ', 112) IF( NOT IS NULL)) UPDATE dbo.aspnet_membership SET IsLockedOut LastLockoutDate FailedPasswordAttemptCount FailedPasswordAttemptWindowStart FailedPasswordAnswerAttemptCount FailedPasswordAnswerAttemptWindowStart = Userld O) = - 1 GOTO Cleanup = 1 ) = O COMMIT TRANSACTION Cleanup: = 1 ) = O ROLLBACK TRANSACTION 88
99 ALTER PROCEDURE nvarchar( int= O AS uniqueidentifier = NULL = u.userld FROM dbo.aspnet_users u, dbo.aspnet_applications a, dbo.aspnet_membership m WHERE LoweredUserName = LOWER(@UserName) AND u.applicationld = a.applicationld AND LOWER(@ ApplicationN ame) = a.loweredapplicationn ame AND u. Userld = m. Userld IF (@Userld IS NULL) RETURN(l) UPDATE dbo.aspnet_membersfiip SET PasswordFormat PasswordSalt LastPasswordChangedDate Utc = Userld RETURN(O) 89
100 ALTER PROCEDURE Name nvarchar(256) AS uniqueidentifier = NULL = u.userld FROM dbo.aspnet_users u, dbo.aspnet_applications a, dbo.aspnet_membership m WHERE LoweredUserName = LOWER(@UserName) AND u.applicationld = a.applicationld AND LOWER(@ApplicationName) = a.loweredapplicationname AND u.userld = m.userld IF IS NULL) RETURN 1 UPDATE dbo.aspnet_membership SET IsLockedOut = O, FailedPasswordAttemptCount = O, FailedPasswordAttemptWindowStart = CONVERT( datetime, ' ', 112 ), FailedPasswordAnswerAttemptCount = O, FailedPasswordAnswerAttemptWindowStart = CONVERT( datetime, ' ', 112 ), LastLockoutDate = CONVERT( datetime, ' ', 112) = Userld RETURN O 8- ALTER PROCEDURE datetime AS 90
101 uniqueidentifier uniqueidentifier = NULL = = a.applicationid FROM dbo.aspnet_users u, dbo.aspnet_applications a, dbo.aspnet_membership m WHERE LoweredUserName = LOWER(@UserName) AND u.applicationid = a.applicationid AND LOWER(@ApplicationName) = a.loweredapplicationname AND u.userid = m.userid IF (@Userid IS NULL) RETURN(l) IF (@Unique = 1) IF (EXISTS (SELECT * FROM dbo.aspnet_membership WITH (UPDLOCK, HOLDLOCK) WHERE Applicationid Applicationid <> Userld AND Lowered = LOWER(@ ))) RETURN(7) bit = =O) TRANSACTION = 1 ELSE = O UPDATE dbo.aspnet_users WITH (ROWLOCK) SET LastActivityDate = Userld O) GOTO Cleanup UPDATE dbo.aspnet_membership WITH (ROWLOCK) SET Lowered = LOWER(@ ), Comment IsApproved 91
102 LastLoginDate = Userld O) GOTO Cleanup = 1 ) = O COMMIT TRANSACTION RETURN O Cleanup: = 1 ) = O ROLLBACK TRANSACTION RETURN -1 ALTER PROCEDURE dbo.aspnet_membership_ Update User Name Window datetime 92
103 AS uniqueidentifier bit bit date time int datetirne int datetirne int = O bit = =O) TRANSACTION = 1 ELSE = O = = = = = = = = m.failedpasswordansweratternptwindowstart FROM dbo.aspnet_applications a, dbo.aspnet_users u, dbo.aspnet_membership rn WITH ( UPDLOCK ) WHERE LOWER(@ApplicationNarne) = a.loweredapplicationnarne AND u.applicationid = a.applicationid AND ' u.userid = rn.userid AND LOWER(@UserNarne) = u.loweredusernarne IF =O) = 1 GOTO Cleanup = 1 ) 93
104 GOTO Cleanup = O ) > = 1 ELSE = 1 ELSE > O >O) = O = CONVERT( datetime, ' ', 112) = O = CONVERT( datetime, ' ', 112) = CONVERT( datetime, ' ', 112) = 1 ) UPDATE dbo.aspnet_users SET LastActivityDate = Userld O) = -1 94
105 GOTO Cleanup UPDATE dbo.aspnet_membership SET LastLoginDate WHERE Userld O) = -1 GOTO Cleanup UPDATE dbo.aspnet_membership SET IsLockedOut LastLockoutDate FailedPasswordAttemptCount FailedPasswordAttemptWindowStart FailedPasswordAnswerAttemptCount FailedPasswordAnswerAttemptWindowStart = Userld O) = -1 GOTO Cleanup = 1 ) = O COMMIT TRANSACTION Cleanup: = 1 ) = O ROLLBACK TRANSACTION 95
106 ALTER PROCEDURE dbo.aspnet_paths_ UNIQUEIDENTIFIER OUTPUT AS TRANSACTION IF (NOT EXISTS(SELECT * FROM dbo.aspnet_paths WHERE LoweredPath = LOWER(@Path) AND Applicationid INSERT dbo.aspnet_paths (Applicationid, Path, LoweredPath) VALUES LOWER(@Path)) COMMIT TRANSACTION = Pathid FROM dbo.aspnet_paths WHERE LOWER(@Path) = LoweredPath AND Applicationid Applicationid ı - ALTER PROCEDURE dbo.aspnet_personalization_getapplicationid UNIQUEIDENTIFIER OUT) AS = Applicationid FROM dbo.aspnet_applications WHERE LOWER(@ApplicationName) = LoweredApplicationName 96
107 ALTER PROCEDURE dbo.aspnet_personalizationadministration_deleteallstate int OUT) AS UNIQUEIDENTIFIER EXEC dbo.aspnet_personalization_ OUTPUT IF (@ Applicationid IS NULL) O ELSE IF (@AllUsersScope = 1) DELETE FROM aspnet_personalizationallusers WHERE Pathid IN (SELECT Paths.Pathid FROM dbo.aspnet_paths Paths WHERE Paths.Applicationid ELSE DELETE FROM aspnet_personalizationperuser WHERE Pathid IN (SELECT Paths.Pathid FROM dbo.aspnet_paths Paths WHERE Paths.Applicationid SELECT ALTER PROCEDURE dbo.aspnet_personalizationadministration_findstate NVARCHAR(256) = NVARCHAR(256) = NULL, 97
108 @InactiveSinceDate DATETIME = NULL) AS UNIQUEIDENTIFIER EXEC OUTPUT IF (@ Applicationld IS NULL) RETURN -- Set the page bounds INT INT INT Create a temp table to store the selected results CREA TE TABLE #Pagelndex ( Indexld int IDENTITY (O, 1) NOT NULL, Itemld UNIQUEIDENTIFIER ) IF (@AllUsersScope = 1) -- Insert into our temp table INSERT INTO #Pagelndex (Itemid) SELECT Paths.Pathld FROM dbo.aspnet_paths Paths, ((SELECT Paths.Pathid FROM dbo.aspnet_personalizationallusers AllUsers, dbo.aspnet_paths Paths WHERE Paths.Applicationld AND AllUsers.Pathid = Paths.Pathid AND (@Path IS NULL OR Paths.LoweredPath LIKE LOWER(@Path)) ) AS SharedDataPerPath FULL OUTER JOIN (SELECT DISTINCT Paths.Pathid FROM dbo.aspnet_personalizationperuser PerUser, dbo.aspnet_paths Paths WHERE Paths.Applicationid AND PerUser.Pathld = Paths.Pathid AND (@Path IS NULL OR Paths.LoweredPath LIKE LOWER(@Path)) ) AS UserDataPerPath ON SharedDataPerPath.Pathld = UserDataPerPath.Pathld ) WHERE Paths.Pathld = SharedDataPerPath.Pathid OR Paths.Pathid = UserDataPerPath.Pathid ORDER BY Paths.Path ASC SELECT Paths.Path, 98
109 SharedDataPerPath.LastUpdatedDate, SharedDataPerPath.SharedDataLength, U serdataperpath. UserDataLength, U serdataperpath. UserCount FROM dbo.aspnet_paths Paths, ((SELECT Pagelndex.Itemld AS Pathld, AllUsers.LastUpdatedDate AS LastUpdatedDate, DATALENGTH(AllUsers.PageSettings) AS SharedDataLength FROM dbo.aspnet_personalizationallusers AllUsers, #Pagelndex Pagelndex WHERE AllUsers.Pathld = Pagelndex.Itemld AND Pagelndex.lndexld AND Pagelndex.lndexld ) AS SharedDataPerPath FULL OUTER JOIN (SELECT Pagelndex.Itemld AS Pathld, SUM(DATALENGTH(PerUser.PageSettings)) AS UserDataLength, COUNT(*) AS UserCount FROM aspnet_personalizationperuser PerUser, #Pagelndex Pagelndex WHERE PerUser.Pathld = Pagelndex.Itemld AND Pagelndex.lndexld AND Pagelndex.lndexld GROUP BY Pagelndex.Itemld ) AS UserDataPerPath ON SharedDataPerPath.Pathld = UserDataPerPath.Pathld ) WHERE Paths.Pathld = SharedDataPerPath.Pathld OR Paths.Pathld = UserDataPerPath.Pathld ORDER BY Paths.Path ASC ELSE -- Insert into our temp table INSERT INTO #Pagelndex (ltemld) SELECT PerUser.Id FROM dbo.aspnet_personalizationperuser PerUser, dbo.aspnet_users Users, dbo.aspnet_paths Paths " WHERE Paths.Applicationld AND PerUser.Userld = Users.Userld AND PerUser.Pathld = Paths.Pathld AND (@Path IS NULL OR Paths.LoweredPath LIKE LOWER(@Path)) AND (@UserName IS NULL OR Users.LoweredUserName LIKE LOWER(@UserName)) AND (@lnactivesincedate IS NULL OR Users.LastActivityDate ORDER BY Paths.Path ASC, Users.UserName ASC SELECT Paths.Path, PerUser.LastUpdatedDate, DATALENGTH(PerUser.PageSettings), Users.UserName, Users.LastActivityDate 99
110 FROM dbo.aspnet_personalizationperuser PerUser, dbo.aspnet_users Users, dbo.aspnet_paths Paths, #Pageindex Pagelndex WHERE PerUser.Id = Pageindex.Itemid AND PerUser.Userid = Users.Userld AND PerUser.Pathid = Paths.Pathid AND Pageindex.Indexid AND Pageindex.Indexid Upper Bound ORDER BY Paths.Path ASC, Users.UserName ASC ALTER PROCEDURE dbo.aspnet_personalizationadministration_ GetCountOfState int ame NV NVARCHAR(256) = NVARCHAR(256) = DATETIME = NULL) AS UNIQUEIDENTIFIER EXEC dbo.aspnet_personalization_ OUTPUT IF (@Applicationid IS NULL) O ELSE IF (@AllUsersScope = 1) COUNT(*) FROM dbo.aspnet_personalizationallusers AllUsers, dbo.aspnet_paths Paths WHERE Paths.Applicationid AND AllUsers.Pathid = Paths.Pathid AND (@Path IS NULL OR Paths.LoweredPath LIKE LOWER(@Path)) ELSE COUNT(*) FROM dbo.aspnet_personalizationperuser PerUser, dbo.aspnet_users Users, dbo.aspnet_paths Paths WHERE Paths.Applicationid AND PerUser.Userld = Users.Userld AND PerUser.Pathid = Paths.Pathid 100
111 AND IS NULL OR Paths.LoweredPath LIKE AND IS NULL OR Users.LoweredUserName LIKE AND IS NULL OR Users.LastActivityDate 5 - ALTER PROCEDURE dbo.aspnet_personalizationadministration_resetsharedstate int NVARCHAR(256)) AS UNIQUEIDENTIFIER EXEC dbo.aspnet_personalization_ OUTPUT IF (@Applicationid IS NULL) = O ELSE DELETE FROM dbo.aspnet_personalizationallu sers WHERE Pathid IN (SELECT AllUsers.Pathid FROM dbo.aspnet_personalizationallusers AllUsers, dbo.aspnet_paths Paths WHERE Paths.Applicationid AND AllUsers.Pathid = Paths.Pathid AND Paths.Loweredl'ath = ALTER PROCEDURE dbo.aspnet_personalizationadministration_resetuserstate ( 101
112 ApplicationN int OUT, NV ARCHAR(256), DATETIME = NULL, NV ARCHAR(256) = NULL, NV ARCHAR(256) AS UNIQUEIDENTIFIER EXEC OUTPUT IF (@Applicationld IS NULL) = O ELSE DELETE FROM dbo.aspnet_personalizationperuser WHERE Id IN (SELECT PerUser.ld FROM dbo.aspnet_personalizationperuser PerUser, dbo.aspnet_users Users, dbo.aspnet_paths Paths WHERE Paths.Applicationld AND PerUser.Userld = Users.Userld AND PerUser.Pathld = Paths.Pathld AND (@lnactivesincedate IS NULL OR Users.LastActivityDate AND (@UserName IS NULL OR Users.LoweredUserName = LOWER(@UserName)) AND (@Path IS NULL OR Paths.LoweredPath = ALTER PROCEDURE dbo.aspnet_personalizationallusers_getpagesettings NVARCHAR(256)) AS UNIQUEIDENTIFIER UNIQUEIDENTIFIER Applicationld = NULL = NULL 102
113 EXEC dbo.aspnet_personalization_ OUTPUT IF IS NULL) RETURN = u.pathid FROM dbo.aspnet_paths u WHERE u.applicationid AND u.loweredpath = LOWER(@Path) IF (@Pathid IS NULL) RETURN SELECT p.pagesettings FROM dbo.aspnet_personalizationallusers p WHERE p.pathid ALTER PROCEDURE dbo.aspnet_personalizationallusers_resetpagesettings NVARCHAR(256)) AS UNIQUEIDENTIFIER UNIQUEIDENTIFIER Applicationid = NULL = NULL OUTPUT. IF (@Applicationid IS NULL) RETURN = u.pathid FROM dbo.aspnet_paths u WHERE u.applicationid AND u.loweredpath = LOWER(@Path) IF (@Pathid IS NULL) RETURN 103
114 DELETE FROM dbo.aspnet_personalizationallusers RETURN O WHERE Pathld ALTER PROCEDURE dbo.aspnet_personalizationallusers_setpagesettings DATETIME) AS UNIQUEIDENTIFIER UNIQUEIDENTIFIER Applicationld = NULL = NULL OUTPUT = u.pathld FROM dbo.aspnet_paths u WHERE u.applicationld AND u.loweredpath = LOWER(@Path) IF (@Pathld ıs NULL) @Pathld OUTPUT ' IF (EXISTS(SELECT Pathld FROM dbo.aspnet_personalizationallusers WHERE Pathld UPDATE dbo.aspnet_personalizationallusers SET PageSettings LastUpdatedDate WHERE Pathld ELSE INSERT INTO dbo.aspnet_personalizationallusers(pathld, PageSettings, LastUpdatedDate) RETURN O 104
115 ALTER PROCEDURE dbo.aspnet_personalizationperuser_getpagesettings ame NV DATETIME) AS UNIQUEIDENTIFIER UNIQUEIDENTIFIER UNIQUEIDENTIFIER Applicationld = NULL = NULL = NULL EXEC OUTPUT IF (@Applicationld IS NULL) RETURN = u.pathld FROM dbo.aspnet_paths u WHERE u.applicationid AND u.loweredpath = LOWER(@Path) IF (@Pathid IS NULL) RETURN = u.userld FROM dbo.aspnetdsers u WHERE u.applicationid AND u.loweredusername = LOWER(@UserName) IF (@Userld IS NULL) RETURN UPDATE dbo.aspnet_users WITH (ROWLOCK) SET LastActivityDate WHERE Userid IF (@@ROWCOUNT = O) -- Username not found RETURN 105
116 SELECT p.pagesettings FROM dbo.aspnet_personalizationperuser p WHERE p.pathld AND p.userld 1- ALTER PROCEDURE dbo.aspnet_personalizationperuser_resetpagesettings DATETIME) AS UNIQUEIDENTIFIER UNIQUEIDENTIFIER UNIQUEIDENTIFIER Applicationid = NULL = NULL = NULL OUTPUT IF (@Applicationld IS NULL) RETURN = u.pathid FROM dbo.aspnet_paths u WHERE u.applicationid AND u.loweredpath = LOWER(@Path) IF (@Pathid IS NULL) RETURN = u.userld FROM dbo.aspnet_users u WHERE u.applicationid AND u.loweredusername = LOWER(@UserName) IF (@Userid IS NULL) RETURN 106
117 UPDATE dbo.aspnet_users WITH (ROWLOCK) SET LastActivityDate WHERE Userld IF = O) -- Username not found RETURN DELETE FROM dbo.aspnet_personalizationperuser WHERE Pathld AND Userld RETURN O ALTER PROCEDURE dbo.aspnet_personalizationperuser_setpagesettings DATETIME) AS UNIQUEIDENTIFIER UNIQUEIDENTIFIER UNIQUEIDENTIFIER Applicationld = NULL = NULL = NULL OUTPUT = u.pathld FROM dbo.aspnet_paths u WHERE u.applicationld AND u.loweredpath = LOWER(@Path) IF (@Pathld IS NULL) @Pathid OUTPUT = u.userld FROM dbo.aspnet_users u WHERE u.applicationld AND u.loweredusername = LOWER(@UserName) IF (@Userld IS NULL) @Userld OUTPUT 107
118 UPDATE dbo.aspnet_users WITH (ROWLOCK) SET LastActivityDate WHERE Userld IF (@@ROWCOUNT = O) -- Userrıame not found RETURN IF (EXISTS(SELECT Pathld FROM dbo.aspnet_personalizationperuser WHERE Userld AND Pathld UPDATE dbo.aspnet_personalizationperuser SET PageSettings LastUpdatedDate WHERE Userld AND Pathld ELSE INSERT INTO dbo.aspnet_personalizationperuser(userld, Pathld, PageSettings, LastUpdatedDate) @CurrentTimeUtc) RETURN O ALTER PROCEDURE ame datetime AS uniqueiderıtifier = NULI, = Applicationld FROM aspnet_applications WHERE LOWER(@ApplicationName) = LoweredApplicationName IF (@Applicationld IS NULL) SELECT O RETURN DELETE FROM dbo.aspnet_profile WHERE User Id IN ( SELECT U serld FROM dbo.aspnet_users u WHERE Applicationld Applicationld AND (LastActivityDate 108
119 SELECT ) AND( (@ProfileAuthOptions = 2) OR (@ProfileAuthOptions = O AND IsAnonymous = 1) OR (@ProfileAuthOptions = 1 AND IsAnonymous = O) ALTER PROCEDURE ame nvarchar(4000) AS nvarchar(256) int int int int bit int = O = 1 = O = O =O) TRANSACTION = 1 ELSE = O WHILE (@CurrentPos <= LEN(@UserNames)) 109
120 IF = O IS NULL) = LEN(@UserNames) IF (LEN(@UserName) > O) = O OUTPUT O) = - 1 GOTO Cleanup IF (@DeletedUser <> O) + 1 IF (@TranStarted = 1) = O COMMIT TRANSACTION = O RETURN O Cleanup: IF (@TranStarted = 1 ) = O ROLLBACK TRANSACTI@N 5 - ALTER PROCEDURE dbo.aspnet_profile_ GetNumberOflnacti veprofiles 110
121 @ AS nvarchar(256), int, datetime uniqueidentifier Applicationid = NULL = Applicationid FROM aspnet_applications WHERE LOWER(@ApplicationName) = LoweredApplicationName IF (@Applicationid IS NULL) SELECT O RETURN SELECT COUNT(*) FROM dbo.aspnet_users u, dbo.aspnet_profile p WHERE Applicationid Applicationid AND u.userld = p.userld AND (LastActivityDate AND( (@ProfileAuthOptions = 2) OR (@ProfileAuthOptions = O AND IsAnonymous = 1) OR (@ProfileAuthOptions = 1 AND IsAnonymous = O) ) ALTER PROCEDURE nvarchar(256) = datetime = NULL AS uniqueidentifier Applicationid = NULL = Applicationid FROM aspnet_applications WHERE LOWER(@ApplicationName) = LoweredApplicationName IF (@Applicationid IS NULL) 111
122 RETURN -- Set the page bounds int int int Create a temp table TO store the select results CREATE TABLE #PageindexForUsers ( lndexid int IDENTITY (O, 1) NOT NULL, Userld uniqueidentifier ) -- Insert into our temp table INSERT INTO #PageindexForUsers (Userld) SELECT u.userid FROM dbo.aspnet_users u, dbo.aspnet_profile P WHERE Applicationid Applicationid AND u.userid = p.userid AND (@InactiveSinceDate IS NULL OR LastActivityDate AND ( (@ProfileAuthOptions = 2) OR (@ProfileAuthOptions = O AND IsAnonymous = 1) OR (@ProfileAuthOptions = 1 AND IsAnonymous = O) ) AND (@UserNameToMatch IS NULL OR LoweredUserName LIKE LOWER(@UserNameToMatch)) ORDER BY UserName SELECT u.username, u.isanonymous, u.lastactivitydate, p.lastupdateddate, DATALENGTH(p.PropertyNames) + DATALENGTH(p.PropertyValuesString) + DATALENGTH(p.PropertyValuesBinary) FROM dbo.aspnet_users u, dbe.aspnet Profile p, #PageindexForUsers i WHERE u.userld = p.userld AND p.userid = i.userld AND i.indexid AND i.indexid SELECT COUNT(*) FROM #PageindexForUsers DROP TABLE #PageindexForUsers 112
123 7- ALTER PROCEDURE datetime AS uniqueidentifier Applicationid = NULL = Applicationid FROM dbo.aspnet_applications WHERE LOWER(@ApplicationName) = LoweredApplicationName IF (@Applicationid IS NULL) RETURN uniqueidentifier = NULL = Userld FROM dbo.aspnet_users WHERE Applicationid AND LoweredUserName = LOWER(@UserName) IF (@Userid IS NULL) RETURN SELECT TOP 1 PropertyNames, PropertyValuesString, PropertyValuesBinary FROM dbo.aspnet_profile WHERE Userid IF (@@ROWCOUNT > O) UPDATE dbo.aspnet_users. LastActivityDate=@CurrentTimeUtc SET WHERE Userid 113
124 ALTER PROCEDURE ame Names datetime AS uniqueidentifier = NULL int = O bit = = O ) TRANSACTION = 1 ELSE = O EXEC dbo.aspnet_applications_ OUTPUT O) = - 1 GOTO Cleanup uniqueidentifier datetime = NULL = Userld FROM dbo.aspnet_users WHERE Applicationld Applicationld AND LoweredU sern ame = LOWER(@UserName) IF (@Userld IS NULL) @Userld OUTPUT 114
125 IF( O) = - 1 GOTO Cleanup UPDATE dbo.aspnet_users SET LastActivityDate=@CurrentTimeUtc WHERE Userid O) = - 1 GOTO Cleanup IF (EXISTS( SELECT * FROM dbo.aspnet_profile WHERE Userid UPDATE dbo.aspnet_profile SET PropertyNames=@PropertyNames, PropertyValuesString ValuesString, PropertyValuesBinary LastUpdatedDate=@CurrentTimeUtc WHERE Userid ELSE INSERT INTO dbo.aspnet_profile(u serld, PropertyN ames, PropertyValuesString, PropertyValuesBinary, LastUpdatedDate) O) = - 1 GOTO Cleanup = 1 ) = O COMMIT TRANSACTION RETURN O Cleanup: = 1 ) = O 115
126 ROLLBACK TRANSACTION ALTER PROCEDURE [dbo].aspnet_registerschema bit AS = 1 ) DELETE FROM dbo.aspnet_schema Versions WHERE Feature = ELSE = 1 ) UPDATE dbo.aspnet_schema Versions SET IsCurrentVersion = O WHERE Feature= LOWER( ~Feature) INSERT dbo.aspnet_schemaversionsı Feature, Compatible.SchemaVersion, IsCurrentVersion ) @IsCurrentVersion ) 116
127 ALTER PROCEDURE dbo.aspnet_roles_ ame nvarchar(256) AS uniqueidentifier Applicationid = NULL int = O bit = = O ) TRANSACTION = 1 ELSE = O EXEC OUTPUT O) = -1 GOTO Cleanup IF (EXISTS(SELECT Roleid FROM dbo.aspnet_roles WHERE LoweredRoleName = LOWER(@RoleName) AND Applicationid = 1 GOTO Cleanup INSERT INTO dbo.aspnet_roles (Applicationid, RoleName, LoweredRoleName) VALUES ame, LOWER(@RoleN ame)) O) = -1 GOTO Cleanup = 1 ) 117
128 = O COMMIT TRANSACTION RETURN(O) Cleanup: = 1 ) = O ROLLBACK TRANSACTION ALTER PROCEDURE ame bit AS Applicationid uniqueiderıtifier Applicationid = NULL = Applicationid FROM aspnet_applications WHERE LOWER(@ ApplicationN ame) = Lowered.Applicationlv ame IF (@Applicationid IS NULL) RETURN(l) int = O bit = = O ) TRANSACTION = 1 118
129 ELSE = O uniqueidentifier = NULL = Roleld FROM dbo.aspnet_roles WHERE LoweredRoleName = AND Applicationld Applicationld IF (@Roleld IS NULL) = 1 GOTO Cleanup IF (@DeleteOnlylfRolelsEmpty <> O) IF (EXISTS (SELECT Roleld FROM dbo.aspnet_userslnroles = Roleid)) = 2 GOTO Cleanup DELETE FROM dbo.aspnet_userslnroles = Roleld O) = - 1 GOTO Cleanup DELETE FROM dbo.aspnet_roles = Roleld AND Applicationid O) = -1 GOTO Cleanup = 1 ) = O COMMIT TRANSACTION RETURN(O) Cleanup: 119
130 = 1 ) = O ROLLBACK TRANSACTION ALTER PROCEDURE dbo.aspnet_roles_getallroles nvarchar(256)) AS uniqueidentifier Applicationid = NULL = Applicationid FROM aspnet_applications WHERE LOWER(@ApplicationName) = LoweredApplicationName IF (@Applicationid IS NULL) RETURN SELECT RoleName FROM dbo.aspnet_roles WHERE Applicationid ORDER BY RoleName ALTER PROCEDURE nvarchar(256) AS uniqueidentifier 120
131 = NULL = Applicationld FROM aspnet_applications WHERE LOWER(@ApplicationName) = LoweredApplicationName IF (@Applicationld IS NULL) RETURN(O) IF (EXISTS (SELECT RoleName FROM dbo.aspnet_roles WHERE LOWER(@RoleName) = LoweredRoleName AND Applicationld Applicationld ) ) RETURN(l) ELSE RETURN(O) ALTER PROCEDURE sysname AS CREATE TABLE #aspnet_rolemembers ( Group_name sysname, Group_id smallint, Users_in_group sysname, User_id smallint ) INSERT INTO #aspnet_rolemembers EXEC smallint nvarchar(500) DECLARE cl cursor FORWARD_ONLY FOR SELECT User_id FROM #aspnet_rolemembers OPEN cl FETCH cl WHILE = O) = 'EXEC sp_droprolemember' +""+@name+'","'+ USER_NAME(@user_id) EXEC (@cmd) FETCH cl 121
132 CLOSE cl DEALLOCATE c 1 ALTER PROCEDURE [ sysname AS sysname char(lü) varchar(60) sysname nvarchar(500) DECLARE cl cursor FORW ARD_ONL Y FOR SELECT Object, ProtectType, [Action], Grantee FROM #aspnet_permissions where OPEN cl FETCH WHILE = O) +''+@action+' EXEC (@cmd) FETCH CLOSE cl DEALLOCATE c 1 122
133 ALTER PROCEDURE [dbo].aspnet_ UnRegisterSchema Version nvarchar( 128) AS DELETE FROM dbo.aspnet_schema Versions WHERE Feature= = CompatibleSchema Version ALTER PROCEDURE uniqueidentifier OUTPUT AS IS NULL ) = NEWID() ELSE IF( EXISTS( SELECT Userld FROM dbo.aspnet_users = Userld)) RETURN -1 INSERT dbo.aspnet_users (Applicationld, Userid, UserName, LoweredUserName, IsAnonymous, LastActivityDate) @LastActivityDate) RETURN O 123
134 I I ALTER PROCEDURE ame int OUTPUT AS uniqueidentifier =NULL = O bit = = O) TRANSACTION = 1 ELSE = O int int = O = O = u.userld FROM dbo.aspnet_users u, dbo.aspnet_applications a WHERE u.loweredusername = LOWER(@UserName) AND u.applicationld = a.applicationld AND LOWER(@ApplicationName) = a.loweredapplicationname IF IS NULL) GOTO Cleanup -- Delete from Membership table if (@TablcsToDe1eteFrom& l) is set IF ((@TablesToDeleteFrom & 1) <> O AND (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_MembershipUsers') AND (type= 'V')))) 124
135 DELETE FROM dbo.aspnet_membership = Userld t I = <> O ) GOTO Cleanup IF (@RowCount <> O) Delete from aspnet_usersinroles table if & 2) is set IF ((@TablesToDeleteFrom & 2) <> O AND (EXISTS (SELECT name FROM sysobjects WHERE (name= N'vw_aspnet_UsersinRoles') AND (type= 'V')))) DELETE FROM dbo.aspnet_usersinroles = Userid = <> O ) GOTO Cleanup IF <> O) Delete from aspnet Profile table if (@TablcsToDcictcFrom & 4) is set IF ((@TablesToDeleteFrom & 4) <> O AND (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_Profiles') AND (type= 'V')))) DELETE FROM dbo.aspnet_prnfile = Userid = <> O ) GOTO Cleanup IF (@RowCount <> O) Delete from aspnet_personalizationperuser table if (@TablesToDeleteFrom & 8) is set IF ((@TablesToDeleteFrom & 8) <> O AND 125
136 (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_ WebPartState_User') AND (type= 'V')))) DELETE FROM dbo.aspnet_personalizationperuser = Userld ı I = <> O ) GOTO Cleanup IF <> O) Delete from aspnetusers table if (@TablesToDelcteFrorn & 1,2,4 & 8) are all set IF ((@TablesToDeleteFrom & 1) <> O AND (@TablesToDeleteFrom & 2) <> O AND (@TablesToDeleteFrom & 4) <> O AND (@TablesToDeleteFrom & 8) <> O AND (EXISTS (SELECT Userld FROM dbo.aspnet_users = Userld))) DELETE FROM dbo.aspnet_users = Userld = <> O ) GOTO Cleanup IF (@RowCount <> O) + 1 = 1 ) ~ = O COMMIT TRANSACTION RETURN O Cleanup: = O = 1 ) = O ROLLBACK TRANSACTION 126
137 ALTER PROCEDURE dbo.aspnet_ UserslnRoles_AddU datetime AS uniqueidentifier = NULL = Applicationld FROM aspnet_applications WHERE LOWER(@ ApplicationN ame) = LoweredApplicationN ame IF (@Appld IS NULL) RETURN(2) bit = O =O) TRANSACTION = 1 KEY) KEY) KEY) table(name nvarchar(256) NOT NULL PRIMARY ' uniqueidentifier NOT NULL PRIMARY uniqueidentifier NOT NULL PRIMARY DECLARE DECLARE int int int nvarchar(256)
138 <= IF (@NextPos = O IS NULL) = LEN(@RoleNames) + 1 RTRIM(LTRIM(SUBSTRING(@RoleNames, @NextPos+l INSERT VALUES (@Name) + 1 INSERT SELECT Roleid FROM dbo.aspnet_roles t WHERE LOWER(t.Name) = ar.loweredrolename AND ar.applicationid IF (@@ROWCOUNT SELECT TOP 1 Name WHERE LOWER(Name) NOT IN (SELECT ar.loweredrolename FROM dbo.aspnet_roles r WHERE r.roleld = ar.roleid) = 1 ) ROLLBACK TRANSACTION RETURN(2) DELETE WHERE 1=1 1 <= LEN ames)) IF (@NextPos = O IS NULL) = LEN(@UserNames) + 1 RTRIM(LTRIM(SUBSTRING(@UserNames, @NextPos+l INSERT VALUES (@Name) + 1 INSERT SELECT U serld FROM dbo.aspnet_users t 128
139 WHERE LOWER(t.Name) = ar.loweredusername AND ar.applicationid IF (@@ROWCOUNT DELETE WHERE LOWER(Name) IN (SELECT LoweredUserName FROM dbo.aspnet_users u WHERE au.userld = u.userid) INSERT dbo.aspnet_users (Applicationid, Userld, UserName, LoweredUserName, IsAnonymous, LastActivityDate) NEWID(), Name, LOWER(Name), INSERT SELECT Userld FROM dbo.aspnet_users t WHERE LOWER(t.Name) = au.loweredusername AND au.applicationid IF (EXISTS (SELECT* FROM dbo.aspnet_usersinroles tr WHERE tu.userid = ur.userld AND tr.roleid = ur.roleid)) SELECT TOP 1 UserName, RoleName FROM dbo.aspnet_usersinroles tr, aspnet_users u, aspnet_roles r WHERE u.userld = tu.userld AND r.roleid = tr.roleid AND tu.userid = ur.userid AND tr.roleid = ur.roleid = 1 ) ROLLBACK TRANSACTION RETURN(3) INSERT INTO dbo.aspnet_usersinroles (Userld, Roleid) SELECT Userld, = 1 ) COMMIT TRANSACTION RETURN(O) 129
140 ALTER PROCEDURE dbo.aspnet_ UserslnRoles_FindU ame ametomatch nvarchar(256) AS uniqueidentifier Applicationld = NULL = Applicationld FROM aspnet_applications WHERE LOWER(@ApplicationName) = LoweredApplicationName IF (@Applicationld IS NULL) RETURN(l) uniqueidentifier = NULL = Roleld FROM dbo.aspnet_roles WHERE LOWER(@RoleName) = LoweredRoleName AND Applicationld Applicationld IF (@Roleld IS NULL) RETURN(l) SELECT u.username FROM dbo.aspnet_users u, dbo.aspnet_userslnroles ur WHERE u.userld = ur.userld = ur.roleld AND u.applicationld AND LoweredUserName LIKE LOWER(@UserNameToMatch) ORDER BY u.username RETURN(O) 51 ~ ALTER PROCEDURE nvarchar(256) AS 130
141 uniqueidentifier Applicationid = NULL = Applicationid FROM aspnet_applications WHERE LOWER(@ ApplicationN ame) = LoweredApplicationN ame IF (@Applicationid IS NULL) RETURN(l) uniqueidentifier = NULL SELECT = Userld dbo.aspnet_users WHERE LoweredUserName = LOWER(@UserName) AND Applicationid Applicationid IF IS NULL) RETURN(l) SELECT r.rolen ame FROM dbo.aspnet_roles r, dbo.aspnet_usersinroles ur WHERE r.roleid = ur.roleid AND r.applicationid Applicationid AND ur.userid ORDER BY r.rolename RETURN (O) ALTER PROCEDURE dbo.aspnet_ UsersinRoles_ GetU nvarchar(256) AS uniqueidentifier Applicationid = NULL = Applicationid FROM aspnet_applications LOWER(@ApplicationN ame) = LoweredApplicationN ame WHERE IF (@Applicationld IS NULL) RETURN(l) uniqueidentifier = NULL = Roleid 131
142 FROM dbo.aspnet_roles WHERE = LoweredRoleName AND Applicationld IF (@Roleld IS NULL) RETURN(!) SELECT u.username FROM dbo.aspnet_users u, dbo.aspnet_userslnroles ur WHERE u.userld = ur.userld = ur.roleld AND u.applicationld Applicationld ORDER BY u.username RETURN(O) ALTER PROCEDURE nvarchar(256) AS uniqueidentifier Applicationld = NULL = Applicationld FROM aspnet_applications WHERE LOWER(@ApplicationName) = LoweredApplicationName IF (@Applicationld IS NULL) I!' RETURN(2) uniqueidentifier = NULL uniqueidentifier = NULL = Userld FROM dbo.aspnet_users WHERE LoweredUserName = LOWER(@UserName) AND Applicationld Applicationld IF IS NULL) RETURN(2) = Roleld 132
143 FROM dbo.aspnet_roles WHERE LoweredRoleName = LOWER(@RoleName) AND Applicationid Applicationid IF (@Roleid IS NULL) RETURN(3) IF (EXISTS( SELECT* FROM dbo.aspnet_usersinroles WHERE Userld AND Roleid RETURN(l) ELSE RETURN(O) ALTER PROCEDURE nvarchar(4000) AS uniqueidentifier = NULL = Applicationid FROM aspnet_applications WHERE LOWER(@ApplicationName) = LoweredApplicationName IF (@Appid IS NULL) RETURN(2) bit = = O ) TRANSACTION = 1 KEY) KEY) table(name nvarchar(256) NOT NULL PRIMARY table(roleid uniqueidentifier NOT NULL PRIMARY 133
144 KEY) table(userld uniqueidentifier NOT NULL PRIMARY int int int nvarchar(256) int int int 1 <= LEN ames)) IF (@NextPos = O IS NULL) = LEN(@RoleNames) + 1 RTRIM(LTRIM(SUBSTRING(@RoleNames, @NextPos+l INSERT VALUES (@Name) + 1 INSERT SELECT Roleid FROM dbo.aspnet_roles t WHERE LOWER(t.Name) = ar.loweredrolename AND ar.applicationid IF (@CountR SELECT TOP 1 N4', Name WHERE LOWER(Name) NOT IN (SELECT ar.loweredrolename FROM dbo.aspnet_roles r WHERE r.roleld = ar.roleid) = 1 ) ROLLBACK TRANSACTION RETURN(2) DELETE WHERE 1=1 SET@Num=O 1 134
145 <= LEN ames)) IF (@NextPos = O IS NULL) = LEN(@UserNames) + 1 RTRIM(LTRIM(SUBSTRING(@UserNames, @NextPos+l INSERT VALUES 1 INSERT SELECT Userid FROM dbo.aspnet_users t WHERE LOWER(t.Name) = ar.loweredusername AND ar.applicationid IF (@CountU SELECT TOP 1 Name, N" WHERE LOWER(Name) NOT IN (SELECT au.loweredusername FROM dbo.aspnet_users u WHERE u.userld = au.userld) = 1 ) ROLLBACK TRANSACTION RETURN(l) = COUNT(*) FROMdbo.aspnet_UsersinRoles r WHERE ur.userld = u.userid AND ur.roleid = r.roleid IF (@CountAll SELECT TOP 1 UserName, RoleName tr, dbo.aspnet_users u, dbo.aspnet_roles r WHERE u.userld = tu.userld AND r.roleid = tr.roleid AND tu.userld NOT IN (SELECT ur.userld FROM dbo.aspnet_usersinroles ur WHERE ur.roleid = tr.roleid) AND tr.roleid NOT IN (SELECT ur.roleid FROM dbo.aspnet_usersinroles ur WHERE ur.userld = tu.userld) = 1 ) ROLLBACK TRANSACTION RETURN(3) 135
146 DELETE FROM dbo.aspnet_usersinroles WHERE Userld IN (SELECT Userld AND Roleid IN (SELECT Roleid = 1 ) COMMIT TRANSACTION RETURN(O) 55~ ALTER PROCEDURE decimal(l ntext AS INSERT dbo.aspnet_webevent_events ( Eventld, EventTimeUtc, EventTime, EventType, EventSequence, EventOccurrence, EventCode, EventDetailCode, Message, ApplicationPath, ApplicationVirtualPath, 136
147 MachineN ame, RequestUrl, Exception Type, Details ) @ Application ame, ) 137
148 CHAPTER 9 : TEN TERMS l m You Even if this book were 3,000 pages long, it still wouldn't be long enough to cover everything there is to know about Visual Web Developer, HTML, CSS, ASP.NET, and programming. You'll often need to refer to online resources or books for more information. Given that Visual Web Developer is a tool for software developers, you'll have to get accustomed to terminology that developers use. This chapter presents the top ten terms that everyone will assume you already know and understand. Familiar computer terms can change when they venture onto the World Wide Web. For instance, you may already know application as a program such as a word processor or spreadsheet, but the term Web application basically means a Web site or Web page that contains more than just static, uncharıging HTML and text that looks the same to all visitors. A Web application is more dynamic than that; the page's exact content is created just before the page is sent. Exactly what the visitor sees depends on who that visitor is, or the specific information the user requested. There are two main types of computer users in the world, those who use ' software, and those who create software. The people who create software are called developers. Everyone else is called a user. It's a lot easier to be a user than a developer. As a user, you can often figure out how to do things just by guessing and hacking away until you get it right. Not so for a developer. You have to actually know how the technology works - as well as what you're doing with it - to create software. Guessing and hacking away at 138
149 random generally leads to nothing but endless hours of hair-pulling frustration. A data-driven Web site consists of Web pages whose content depends upon ("is driven by") the data stored in a database. For example, when you search the Internet with a search engine such as Google, you're basically sending a query string to Google's database. What you get back is a dynamic page created in response to your query; exactly what appears on it depends on what you searched for. The page's specific content is "driven" (determined) by what's in Google's database that matches what you searched for. 5 - ASP stands for Active Server Pages, and is Microsoft's fundamental technology for building dynamic, data-driven Web sites. As with all technologies, ASP has evolved over the years to become ever more powerful and easy to use. As I write this book, ASP.NET 2.0 is the latest version of ASP. It's also the version of ASP used by Visual Web Developer to create dynamic data-driven Web sites. To publish a site you created with Visual Web Developer, you must find a hosting provider that supports ASP.NET 2.0. Visual Studio is Microsoft's main software-development tool. It has all kinds of functionality for creating all kinds of programs. It's big, complex, and easy to get lost in because Visual Studio provides a seemingly-endless array of tools and options. Even so, Visual Web Developer is (believe it or not) a greatly uncomplicated version of Visual Studio; it focuses on developing one type of application: dynamic, data-driven Web sites. In effect, Visual Web Developer just "hides" 139
150 the parts of Visual Studio that aren't relevant to developing Web applications. IDE acronym stands for Integrated Development Environment. Both Visual Studio and Visual Web Developer are IDEs. They're called integrated because they give you access to all the various tools and technologies you need to get the job done. To create data-driven Web sites, for example, you need a pretty specific list of things: HTML, CSS, ASP.NET, a data source (such as SQL Server), and at least one programming language (such as C#). An IDE like Visual Web developer brings all those technologies together under one roof, so to speak, so you can get all your work done in one program window. (What a concept.) You've seen a similar (but unrelated) term before: In hard drives, IDE stands for Integrated Device Electronics. But that concept is in no way related to software development. In hard drives, it just means that all the electronics the disk needs to operate are contained within the drive' s case... When used as a noun within the context of programming, the term control refers to things in a program, or on a page, that allow users to control the action. For example, open any Windows dialog box and you see a bunch of text boxes, drop-down menus, check boxes, and buttons. All of these are relatively small, simple controls. In a more general sense, a control can be anything on the page that a user interacts with. In Visual Web Developer's Toolbox, each item actually represents a control that you can drag and drop onto a page. As a developer, you 140
151 choose which controls users will see, and can program what happens when a user interacts with a control. Code is the text that forms the instructions for the computer, written in some programming language such as C# or Visual Basic. It has a different function from text that's typed in a human language. Unlike regular text, code uses no sentences or paragraphs. Instead, code consists of statements (lines) written in the programming language rather than in a human language. When you write in (say) English, you can get away with murder in terms of spelling and punctuation; even if the text would make your composition teacher cry, your human recipient will probably still be able to figure out what you mean - simply by studying the context of the message. (If you've spent any time in online forums, you've no doubt seen the extent to which people can get away with worse-than-iffy spelling and punctuation.) When you write code, there is no such margin for error. Every character of every word counts; if it isn't just so, you'll likely get an error message rather than code that works. Unlike a human being who can figure out (at least) the intent of some dreadfully composed written message, a computer can't "figure out" diddley squat. You either write the code correctly and it works, or you write it incorrectly and it doesn't work. There are two ways to interact with controls. One way is manual: You actually use the finished control yourself. For example, when you click a button in a Windows dialog box, you are manually operating the control with your mouse and keyboard. As a programmer, you can also write code to specify the exact appearance 141
152 and behavior of a control, as well as what happens after a user interacts with the control. That sort of code is generally executed in response to some event, as when the user clicks a button or makes a selection from a dropdown menu. In essence, a user who is viewing a page and makes a selection from the options provided is manually using the control. But exactly what happens after the user makes a selection is generally handled programmatically - the control runs some code you' ve written, and that code tells the machine exactly what to do. 1 ' The term database is often used casually to refer to any body of knowledge or collection of information. In programming terms, it's more specific - referring to data that's organized into tables that consist of columns and rows so it can be stored and accessed consistently. The database for a Web site is made available through the Database Explorer tab in Visual Web Developer, as shown in Figure A database management system (DBMS) is a program that allows you to organize data into tables, and retrieve data programmatically. Microsoft Access and SQL Server are examples of database-management systems. Microsoft Access is a self-contained DBMS; it contains all the tools you need to create tables, queries, forms, reports, and other aspects of an application - in one program. Server isn't so much an application as it is a server - a single-minded program obsessed with serving up data. Unlike an application program, which has its own program window, a server works behind the scenes; it has no particular interface or program window of its own. Instead, the server just 142
153 "serves up" data to some external application - such as (for a convenient example) a dynamic data-driven Web site you create in Visual Web Developer 143
154 CHAPER 10: TEN ALTERNATIVES TO BEING HELPLESS Visual Web Developer brings together all the technologies you need to create dynamic, data-driven Web sites. Those technologies include HTML, CSS, ASP.NET, C#, the.net Framework, and SQL Server- each and every one of which is an enormous topic in itself. (For example, the first printed documentation for the.net Framework alone consisted of over 8,000 pages, bound into several volumes.) To deal with such a gigantic body of knowledge, you must find ways to get exactly the information you need, when you need it. Sending desperate "PLEASE HELP!!!!" messages generally won't cut it. You have to be more resourceful - and know where the people you're asking are getting their information, so you can go get that information too. The sites listed in this chapter get you in the ballpark. Of course, Web sites being what they are, some of the URLs listed here may change between now and the time you actually read this. That's why I keep an up-to-date list of links on in case any change occurs. If you have any problems finding a page, try looking there. Developer The Microsoft Developer Network at is home to all Microsoft software-development tools and technologies. This is where the hardcore computer geeks go to get information about Microsoft developer products. 144
155 -HTML All Web pages are formatted using HyperText Markup Language (HTML). The W3C (Word Wide Web Consortium) is the "official" site for all things HTML (including that useful new mutant, XHTML). To go straight to documentation on HTML or XHTML, use the link Cascading Style Sheets (CSS) are a must if you intend to give your Web site a consistent look and feel. They're even more indispensable if you intend to use themes, because every theme includes some CSS. The home page for CSS is at XML Home Page XML (extensible Markup Language) is a standardized means of transmitting raw data across the Internet via the Word Wide Web. (By "raw" I mean unformatted, like the data in a database - useful even if it isn't pretty to look at.) Whether your site needs (or can even use) XML depends on many factors. In Visual Web Developer, you may be able to get by with little or no XML at all - that depends on your site. If you do need XML info, the official site at contains all the specs. I' ASP.NET If I was forced to pin down my choice for the main technology behind Visual Web Developer, ASP.NET 2.0 would be the one I'd choose. Although there are plenty of Web sites that address this topic, the most "official" would have to be the one whose URL is also the easiest in the world to remember: ASP.NET Starter Kits Clicking the Starter Kits tab at the ASP.NET Web site takes you to a page of 145
156 sample Web applications that you can download for free. There are different kinds of Starter Kits for different types of Web sites. If you have a particular type of site in mind, but don't quite know how to organize things, a Starter Kit could be a great way to get started. The ASP.NET Forums at give you a handy place to go for questions and answers. There are a lot of discussions to choose from. You may have to scroll down to find Visual Web Developer and related discussions. You can discover a lot about what the technology can do just by reading through some of the questions and answers that have already been posted. The subtitle to this Web page, "Enabling a world of data-driven applications," is what SQL Server is all about. In a Visual Web Developer site, SQL Server contains all the data that drives the Web site. As I write this, the URL for SQL Server 2005 is If that doesn't work, try the more general URL The Microsoft.NET Framework is a huge collection of pre-written software ' that most modern programmers use to create modern programs. In fact, all the Using statements you see at the top of a code-behind page in VWD are references to namespaces within the.net Framework. Each namespace is like a folder containing usable code organized into classes. The dotnetjunkies site (at is a place for people who are into the whole.net way of doing things. Though it spans the whole 146
157 of.net Framework development tools, there's always info on ASP.NET 2.0 and Visual Web Developer. This site encompasses all of Microsoft's software-development tools - and discusses them in blogs, technical chats, newsgroups, webcasts, communities, user groups, and forums. There are all sorts of ways to interact with other people who use the same tools you're using. The URL for this site is 147
158 CONCLUSION We are in the 21century and the time is short, business is expanding jobs are much likely to be done with the least time and power resources. The technology out of all is the web which is burning the mid night out in this fast world. To sum up I have being using such a fast and brilliant technology of web and internet facilities to get the best out of it. The most vital factor considered while building this project was the dynamic Driven, simply not just being awesome but being proficient in the task. Security is one the basic and very much to be faced out in the whole cyber world every single day. To get sorted out in a fabulous way I used GUI the high level security identification system
159 REFERENCES [1] Alan Simpson, Visual Web Developer 2005 Express Edition Publishing : WROX 2005 [2] David Sussman Alex Hommer, ASP.NET Visual Web Developer 2005 Express Edition STARTER KIT Publishing WROX 2005 [3] A guide for writing asp codes retrived from the world wide web ASP FORUMS [4]Tutorials for writing asp and c# retrieved from world wide web TUTORIAL OF ASP [5] Tutotials and code examples retrieved from world wide web ALL ABOUT ASP 149
İNTERNET TABANLI PROGRAMLAMA- 13.ders GRIDVIEW, DETAILSVIEW, ACCESSDATASOURCE NESNELERİ İLE BİLGİ GÖRÜNTÜLEME
İNTERNET TABANLI PROGRAMLAMA- 13.ders GRIDVIEW, DETAILSVIEW, ACCESSDATASOURCE NESNELERİ İLE BİLGİ GÖRÜNTÜLEME Asp.Net kodları
Website Login Integration
SSO Widget Website Login Integration October 2015 Table of Contents Introduction... 3 Getting Started... 5 Creating your Login Form... 5 Full code for the example (including CSS and JavaScript):... 7 2
Implementing Specialized Data Capture Applications with InVision Development Tools (Part 2)
Implementing Specialized Data Capture Applications with InVision Development Tools (Part 2) [This is the second of a series of white papers on implementing applications with special requirements for data
<script type="text/javascript"> var _gaq = _gaq []; _gaq.push(['_setaccount', 'UA 2418840 25']); _gaq.push(['_trackpageview']);
Caldes CM12: Content Management Software Introduction v1.9
Caldes CM12: Content Management Software Introduction v1.9 Enterprise Version: If you are using Express, please contact us. Background Information This manual assumes that you have some basic knowledge
How to use SSO with SharePoint 2010 (FBA) using subdomains. Moataz Esmat EXT.1386
How to use SSO with SharePoint 2010 (FBA) using subdomains Moataz Esmat EXT.1386 I. Browse the web applications using subdomains: After creating the FBA web applications you need to simulate browsing the
Web Design Basics. Cindy Royal, Ph.D. Associate Professor Texas State University
Web Design Basics Cindy Royal, Ph.D. Associate Professor Texas State University HTML and CSS HTML stands for Hypertext Markup Language. It is the main language of the Web. While there are other languages
Web Development 1 A4 Project Description Web Architecture
Web Development 1 Introduction to A4, Architecture, Core Technologies A4 Project Description 2 Web Architecture 3 Web Service Web Service Web Service Browser Javascript Database Javascript Other Stuff:
A PROJECT REPORT ON. SkyDrive. Submitted for the partial fulfillment of the requirement for the Award of the degree of MASTER OF COMPUTER APPLICATION
A PROJECT REPORT ON SkyDrive Submitted for the partial fulfillment of the requirement for the Award of the degree of MASTER OF COMPUTER APPLICATION By UTTAM KUWAR VERMA 11004101172 GALGOTIAS INSTITUTE
Cisco Adaptive Security Appliance (ASA) Web VPN Portal Customization: Solution Brief
Guide Cisco Adaptive Security Appliance (ASA) Web VPN Portal Customization: Solution Brief Author: Ashur Kanoon August 2012 For further information, questions and comments please contact [email protected]
WEB DESIGN LAB PART- A HTML LABORATORY MANUAL FOR 3 RD SEM IS AND CS (2011-2012)
WEB DESIGN LAB PART- A HTML LABORATORY MANUAL FOR 3 RD SEM IS AND CS (2011-2012) BY MISS. SAVITHA R LECTURER INFORMATION SCIENCE DEPTATMENT GOVERNMENT POLYTECHNIC GULBARGA FOR ANY FEEDBACK CONTACT TO EMAIL:
Script Handbook for Interactive Scientific Website Building
Script Handbook for Interactive Scientific Website Building Version: 173205 Released: March 25, 2014 Chung-Lin Shan Contents 1 Basic Structures 1 11 Preparation 2 12 form 4 13 switch for the further step
WHITEPAPER. Skinning Guide. Let s chat. 800.9.Velaro www.velaro.com [email protected]. 2012 by Velaro
WHITEPAPER Skinning Guide Let s chat. 2012 by Velaro 800.9.Velaro www.velaro.com [email protected] INTRODUCTION Throughout the course of a chat conversation, there are a number of different web pages that
2. Modify default.aspx and about.aspx. Add some information about the web site.
This was a fully function Shopping Cart website, which was hosted on the university s server, which I no longer can access. I received an A on this assignment. The directions are listed below for your
Web Building Blocks. Joseph Gilbert User Experience Web Developer University of Virginia Library joe.gilbert@virginia.
Web Building Blocks Core Concepts for HTML & CSS Joseph Gilbert User Experience Web Developer University of Virginia Library [email protected] @joegilbert Why Learn the Building Blocks? The idea
Creating Form Rendering ASP.NET Applications
Creating Form Rendering ASP.NET Applications You can create an ASP.NET application that is able to invoke the Forms service resulting in the ASP.NET application able to render interactive forms to client
Introduction to XHTML. 2010, Robert K. Moniot 1
Chapter 4 Introduction to XHTML 2010, Robert K. Moniot 1 OBJECTIVES In this chapter, you will learn: Characteristics of XHTML vs. older HTML. How to write XHTML to create web pages: Controlling document
HOTEL RESERVATION SYSTEM. Database Management System Project
HOTEL RESERVATION SYSTEM Database Management System Project Contents 1. Introduction. 1 2. Requirements. 2 3. Design. 3 4. Coding. 7 5. Output. 20 1. Introduction Hotel needs to maintain the record of
Intell-a-Keeper Reporting System Technical Programming Guide. Tracking your Bookings without going Nuts! http://www.acorn-is.
Intell-a-Keeper Reporting System Technical Programming Guide Tracking your Bookings without going Nuts! http://www.acorn-is.com 877-ACORN-99 Step 1: Contact Marian Talbert at Acorn Internet Services at
Website Planning Checklist
Website Planning Checklist The following checklist will help clarify your needs and goals when creating a website you ll be surprised at how many decisions must be made before any production begins! Even
Introduction to Web Design Curriculum Sample
Introduction to Web Design Curriculum Sample Thank you for evaluating our curriculum pack for your school! We have assembled what we believe to be the finest collection of materials anywhere to teach basic
HTML Tables. IT 3203 Introduction to Web Development
IT 3203 Introduction to Web Development Tables and Forms September 3 HTML Tables Tables are your friend: Data in rows and columns Positioning of information (But you should use style sheets for this) Slicing
Introduction to ASP.NET and Web Forms
Introduction to ASP.NET and Web Forms This material is based on the original slides of Dr. Mark Sapossnek, Computer Science Department, Boston University, Mosh Teitelbaum, evoch, LLC, and Joe Hummel, Lake
c. Write a JavaScript statement to print out as an alert box the value of the third Radio button (whether or not selected) in the second form.
Practice Problems: These problems are intended to clarify some of the basic concepts related to access to some of the form controls. In the process you should enter the problems in the computer and run
Tutorial #1: Getting Started with ASP.NET
Tutorial #1: Getting Started with ASP.NET This is the first of a series of tutorials that will teach you how to build useful, real- world websites with dynamic content in a fun and easy way, using ASP.NET
Chapter 2 HTML Basics Key Concepts. Copyright 2013 Terry Ann Morris, Ed.D
Chapter 2 HTML Basics Key Concepts Copyright 2013 Terry Ann Morris, Ed.D 1 First Web Page an opening tag... page info goes here a closing tag Head & Body Sections Head Section
Building A Very Simple Web Site
Sitecore CMS 6.2 Building A Very Simple Web Site Rev 100601 Sitecore CMS 6. 2 Building A Very Simple Web Site A Self-Study Guide for Developers Table of Contents Chapter 1 Introduction... 3 Chapter 2 Building
Fortigate SSL VPN 4 With PINsafe Installation Notes
Fortigate SSL VPN 4 With PINsafe Installation Notes Table of Contents Fortigate SSL VPN 4 With PINsafe Installation Notes... 1 1. Introduction... 2 2. Overview... 2 2.1. Prerequisites... 2 2.2. Baseline...
Accessibility in e-learning. Accessible Content Authoring Practices
Accessibility in e-learning Accessible Content Authoring Practices JUNE 2014 Contents Introduction... 3 Visual Content... 3 Images and Alt... 3 Image Maps and Alt... 4 Meaningless Images and Alt... 4 Images
Web Development CSE2WD Final Examination June 2012. (a) Which organisation is primarily responsible for HTML, CSS and DOM standards?
Question 1. (a) Which organisation is primarily responsible for HTML, CSS and DOM standards? (b) Briefly identify the primary purpose of the flowing inside the body section of an HTML document: (i) HTML
Web Design and Databases WD: Class 7: HTML and CSS Part 3
Web Design and Databases WD: Class 7: HTML and CSS Part 3 Dr Helen Hastie Dept of Computer Science Heriot-Watt University Some contributions from Head First HTML with CSS and XHTML, O Reilly Recap! HTML
Create Your own Company s Design Theme
Create Your own Company s Design Theme A simple yet effective approach to custom design theme INTRODUCTION Iron Speed Designer out of the box already gives you a good collection of design themes, up to
Short notes on webpage programming languages
Short notes on webpage programming languages What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is a markup language A markup language is a set of
CS412 Interactive Lab Creating a Simple Web Form
CS412 Interactive Lab Creating a Simple Web Form Introduction In this laboratory, we will create a simple web form using HTML. You have seen several examples of HTML pages and forms as you have worked
A send-a-friend application with ASP Smart Mailer
A send-a-friend application with ASP Smart Mailer Every site likes more visitors. One of the ways that big sites do this is using a simple form that allows people to send their friends a quick email about
Fortigate SSL VPN 3.x With PINsafe Installation Notes
Fortigate SSL VPN 3.x With PINsafe Installation Notes Table of Contents Fortigate SSL VPN 3.x With PINsafe Installation Notes... 1 1. Introduction... 2 2. Overview... 2 2.1. Prerequisites... 2 2.2. Baseline...
Further web design: HTML forms
Further web design: HTML forms Practical workbook Aims and Learning Objectives The aim of this document is to introduce HTML forms. By the end of this course you will be able to: use existing forms on
Working with RD Web Access in Windows Server 2012
Working with RD Web Access in Windows Server 2012 Introduction to RD Web Access So far in this series we have talked about how to successfully deploy and manage a Microsoft Windows Server 2012 VDI environment.
Guide to Integrate ADSelfService Plus with Outlook Web App
Guide to Integrate ADSelfService Plus with Outlook Web App Contents Document Summary... 3 ADSelfService Plus Overview... 3 ADSelfService Plus Integration with Outlook Web App... 3 Steps Involved... 4 For
GoDaddy (CentriqHosting): Data driven Web Application Deployment
GoDaddy (CentriqHosting): Data driven Web Application Deployment Process Summary There a several steps to deploying an ASP.NET website that includes databases (for membership and/or for site content and
HELP DOCUMENTATION SSRPM CITRIX AND MICROSOFT TERMINAL SERVICES
HELP DOCUMENTATION SSRPM CITRIX AND MICROSOFT TERMINAL SERVICES Copyright 1998-2013 Tools4ever B.V. All rights reserved. No part of the contents of this user guide may be reproduced or transmitted in any
Advanced Web Design. Zac Van Note. www.design-link.org
Advanced Web Design Zac Van Note www.design-link.org COURSE ID: CP 341F90033T COURSE TITLE: Advanced Web Design COURSE DESCRIPTION: 2/21/04 Sat 9:00:00 AM - 4:00:00 PM 1 day Recommended Text: HTML for
HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout
CALIFORNIA STATE UNIVERSITY, LOS ANGELES INFORMATION TECHNOLOGY SERVICES HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout Fall 2011, Version 1.0 Table of Contents Introduction...3 Downloading
Creating your personal website. Installing necessary programs Creating a website Publishing a website
Creating your personal website Installing necessary programs Creating a website Publishing a website The objective of these instructions is to aid in the production of a personal website published on
LAB MANUAL CS-322364(22): Web Technology
RUNGTA COLLEGE OF ENGINEERING & TECHNOLOGY (Approved by AICTE, New Delhi & Affiliated to CSVTU, Bhilai) Kohka Kurud Road Bhilai [C.G.] LAB MANUAL CS-322364(22): Web Technology Department of COMPUTER SCIENCE
Embedding a Data View dynamic report into an existing web-page
Embedding a Data View dynamic report into an existing web-page Author: GeoWise User Support Released: 23/11/2011 Version: 6.4.4 Embedding a Data View dynamic report into an existing web-page Table of Contents
Intermediate ASP.NET Web Development with C# Instructor: Frank Stepanski. Data Sources on the Web
Intermediate ASP.NET Web Development with C# Instructor: Frank Stepanski Data Sources on the Web Many websites on the web today are just a thin user interface shell on top of sophisticated data-driven
Using Form Tools (admin)
EUROPEAN COMMISSION DIRECTORATE-GENERAL INFORMATICS Directorate A - Corporate IT Solutions & Services Corporate Infrastructure Solutions for Information Systems (LUX) Using Form Tools (admin) Commission
Web Design Revision. AQA AS-Level Computing COMP2. 39 minutes. 39 marks. Page 1 of 17
Web Design Revision AQA AS-Level Computing COMP2 204 39 minutes 39 marks Page of 7 Q. (a) (i) What does HTML stand for?... () (ii) What does CSS stand for?... () (b) Figure shows a web page that has been
ICT 6012: Web Programming
ICT 6012: Web Programming Covers HTML, PHP Programming and JavaScript Covers in 13 lectures a lecture plan is supplied. Please note that there are some extra classes and some cancelled classes Mid-Term
WEB PROGRAMMING LAB (Common to CSE & IT)
138 WEB PROGRAMMING LAB (Common to CSE & IT) Course Code :13CT1121 L T P C 0 0 3 2 Course Educational Objectives: The main objective of the lab course is to expose the students to different programming
Database Communica/on in Visual Studio/C# using ASP.NET Web Forms. Hans- PeBer Halvorsen, M.Sc.
Database Communica/on in Visual Studio/C# using ASP.NET Web Forms Hans- PeBer Halvorsen, M.Sc. Web Programming Hans- PeBer Halvorsen, M.Sc. Web is the Present and the Future 3 History of the Web Internet
Lab 8: ASP.NET 2.0 Configuration API and Health Monitoring
Lab 8: ASP.NET 2.0 Configuration API and Health Monitoring Estimated time to complete this lab: 45 minutes ASP.NET 2.0 s configuration API fills a hole in ASP.NET 1.x by providing an easy-to-use and extensible
Last week we talked about creating your own tags: div tags and span tags. A div tag goes around other tags, e.g.,:
CSS Tutorial Part 2: Last week we talked about creating your own tags: div tags and span tags. A div tag goes around other tags, e.g.,: animals A paragraph about animals goes here
BASICS OF WEB DESIGN CHAPTER 2 HTML BASICS KEY CONCEPTS COPYRIGHT 2013 TERRY ANN MORRIS, ED.D
BASICS OF WEB DESIGN CHAPTER 2 HTML BASICS KEY CONCEPTS COPYRIGHT 2013 TERRY ANN MORRIS, ED.D 1 LEARNING OUTCOMES Describe the anatomy of a web page Format the body of a web page with block-level elements
What is CSS? Official W3C standard for controlling presentation Style sheets rely on underlying markup structure
CSS Peter Cho 161A Notes from Jennifer Niederst: Web Design in a Nutshell and Thomas A. Powell: HTML & XHTML, Fourth Edition Based on a tutorials by Prof. Daniel Sauter / Prof. Casey Reas What is CSS?
In order for the form to process and send correctly the follow objects must be in the form tag.
Creating Forms Creating an email form within the dotcms platform, all the HTML for the form must be in the Body field of a Content Structure. All names are case sensitive. In order for the form to process
Programming the Web 06CS73 SAMPLE QUESTIONS
Programming the Web 06CS73 SAMPLE QUESTIONS Q1a. Explain standard XHTML Document structure Q1b. What is web server? Name any three web servers Q2. What is hypertext protocol? Explain the request phase
ASP.NET(C#) ile Kayıt Listeleme, Silme ve Düzenleme İşlemi
ASP.NET(C#) ile Kayıt Listeleme, Silme ve Düzenleme İşlemi Web.config içerisine aşağıdaki kod eklenir.
How to Create a Mobile Responsive Template in ExactTarget
How to Create a Mobile Responsive Template in ExactTarget This manual contains the following: Section 1: How to create a new mobile responsive template for a Business Unit/Artist Section 2: How to adjust
How to code, test, and validate a web page
Chapter 2 How to code, test, and validate a web page Slide 1 Objectives Applied 1. Use a text editor like Aptana Studio 3 to create and edit HTML and CSS files. 2. Test an HTML document that s stored on
ITNP43: HTML Lecture 4
ITNP43: HTML Lecture 4 1 Style versus Content HTML purists insist that style should be separate from content and structure HTML was only designed to specify the structure and content of a document Style
Visualization: Combo Chart - Google Chart Tools - Google Code
Page 1 of 8 Google Chart Tools Home Docs FAQ Forum Terms Visualization: Combo Chart Overview Example Loading Data Format Configuration Options Methods Events Data Policy Overview A chart that lets you
HTML Form Widgets. Review: HTML Forms. Review: CGI Programs
HTML Form Widgets Review: HTML Forms HTML forms are used to create web pages that accept user input Forms allow the user to communicate information back to the web server Forms allow web servers to generate
Email Campaign Guidelines and Best Practices
epromo Guidelines HTML Maximum width 700px (length = N/A) Maximum total file size, including all images = 200KB Only use inline CSS, no stylesheets Use tables, rather than layout Use more TEXT instead
Client-side Web Engineering From HTML to AJAX
Client-side Web Engineering From HTML to AJAX SWE 642, Spring 2008 Nick Duan 1 What is Client-side Engineering? The concepts, tools and techniques for creating standard web browser and browser extensions
Installation and Integration Manual TRANZILA Secure 5
Installation and Integration Manual TRANZILA Secure 5 Last update: July 14, 2008 Copyright 2003 InterSpace Ltd., All Rights Reserved Contents 19 Yad Harutzim St. POB 8723 New Industrial Zone, Netanya,
Dynamic HTML: Filters and Transitions
iw3htp2_15.fm Page 504 Wednesday, July 4, 2001 3:39 PM 15 Dynamic HTML: Filters and Transitions Objectives To use filters to achieve special effects. To combine filters to achieve an even greater variety
HTML Forms and CONTROLS
HTML Forms and CONTROLS Web forms also called Fill-out Forms, let a user return information to a web server for some action. The processing of incoming data is handled by a script or program written in
Web Server Lite. Web Server Software User s Manual
Web Server Software User s Manual Web Server Lite This software is only loaded to 7188E modules acted as Server. This solution was general in our products. The Serial devices installed on the 7188E could
JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK
Programming for Digital Media EE1707 JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK 1 References and Sources 1. DOM Scripting, Web Design with JavaScript
To be able to use web parts to create a portal-style web application
CHAPTER Additional ASP.NET Features LEARNING OBJECTIVES To be able to upload image data to a web application To be able to manage image data in a database To be able to use database transactions To be
AJAX The Future of Web Development?
AJAX The Future of Web Development? Anders Moberg (dit02amg), David Mörtsell (dit01dml) and David Södermark (dv02sdd). Assignment 2 in New Media D, Department of Computing Science, Umeå University. 2006-04-28
Appendix for Tx5xx and P85x1 manuals
Appendix for Tx5xx and P85x1 manuals Content Appendix for Tx5xx and P85x1 manuals...1 Content...1 Design of www pages for Tx5xx and P85x1 Ethernet transducers...2 Procedure of creation of www pages for
Installation & Configuration Guide Version 2.2
ARPMiner Installation & Configuration Guide Version 2.2 Document Revision 1.8 http://www.kaplansoft.com/ ARPMiner is built by Yasin KAPLAN Read Readme.txt for last minute changes and updates which can
Caldes CM2: Marketing Emails Support Document v1.12
Caldes CM2: Marketing Emails Support Document v1.12 Caldes Enterprise software can be used to send out marketing email. Due to the nature of these being bespoke designs, Caldes make a one off charge to
Visualizing an OrientDB Graph Database with KeyLines
Visualizing an OrientDB Graph Database with KeyLines Visualizing an OrientDB Graph Database with KeyLines 1! Introduction 2! What is a graph database? 2! What is OrientDB? 2! Why visualize OrientDB? 3!
Advanced Drupal Features and Techniques
Advanced Drupal Features and Techniques Mount Holyoke College Office of Communications and Marketing 04/2/15 This MHC Drupal Manual contains proprietary information. It is the express property of Mount
The McGill Knowledge Base. Last Updated: August 19, 2014
The McGill Knowledge Base Last Updated: August 19, 2014 Table of Contents Table of Contents... 1... 2 Overview... 2 Support... 2 Exploring the KB Admin Control Panel Home page... 3 Personalizing the Home
Chapter 22 How to send email and access other web sites
Chapter 22 How to send email and access other web sites Murach's PHP and MySQL, C22 2010, Mike Murach & Associates, Inc. Slide 1 Objectives Applied 1. Install and use the PEAR Mail package to send email
So we're set? Have your text-editor ready. Be sure you use NotePad, NOT Word or even WordPad. Great, let's get going.
Web Design 1A First Website Intro to Basic HTML So we're set? Have your text-editor ready. Be sure you use NotePad, NOT Word or even WordPad. Great, let's get going. Ok, let's just go through the steps
EUROPEAN COMPUTER DRIVING LICENCE / INTERNATIONAL COMPUTER DRIVING LICENCE WEB EDITING
EUROPEAN COMPUTER DRIVING LICENCE / INTERNATIONAL COMPUTER DRIVING LICENCE WEB EDITING The European Computer Driving Licence Foundation Ltd. Portview House Thorncastle Street Dublin 4 Ireland Tel: + 353
How to Properly Compose E-Mail HTML Code : 1
How to Properly Compose E-Mail HTML Code : 1 For any successful business, creating and sending great looking e-mail is essential to project a professional image. With the proliferation of numerous e-mail
Visualizing a Neo4j Graph Database with KeyLines
Visualizing a Neo4j Graph Database with KeyLines Introduction 2! What is a graph database? 2! What is Neo4j? 2! Why visualize Neo4j? 3! Visualization Architecture 4! Benefits of the KeyLines/Neo4j architecture
Kentico CMS 7.0 Tutorial ASPX
Kentico CMS 7.0 Tutorial ASPX 2 Kentico CMS 7.0 Tutorial ASPX Table of Contents Introduction 5... 5 Kentico CMS Overview Installation 7... 7 Prerequisites... 8 Setup installation... 9 Web application installation...
