diff --git a/9781590598917.jpg b/9781590598917.jpg new file mode 100644 index 0000000..f6e8c0a Binary files /dev/null and b/9781590598917.jpg differ diff --git a/Beginning ASP.NET 3.5/Chapter03/App_Code/Product.cs b/Beginning ASP.NET 3.5/Chapter03/App_Code/Product.cs new file mode 100644 index 0000000..526269f --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter03/App_Code/Product.cs @@ -0,0 +1,62 @@ +using System; + +// Define the delegate that represents the event. +public delegate void PriceChangedEventHandler(); + +public class Product +{ + private string name; + private decimal price; + private string imageUrl; + + public string Name + { + get + { return name; } + set + { name = value; } + } + + // Define the event. + public event PriceChangedEventHandler PriceChanged; + + public decimal Price + { + get + { return price; } + set + { + price = value; + + // Fire the event, provided there is at least one listener. + if (PriceChanged != null) + { + PriceChanged(); + } + } + } + + public string ImageUrl + { + get + { return imageUrl; } + set + { imageUrl = value; } + } + + public string GetHtml() + { + string htmlString; + htmlString = "

" + name + "


"; + htmlString += "

Costs: " + price.ToString() + "


"; + htmlString += ""; + return htmlString; + } + + public Product(string name, decimal price) + { + Name = name; + Price = price; + } +} + diff --git a/Beginning ASP.NET 3.5/Chapter03/Default.aspx b/Beginning ASP.NET 3.5/Chapter03/Default.aspx new file mode 100644 index 0000000..dc177b3 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter03/Default.aspx @@ -0,0 +1,19 @@ +<%@ Page Language="C#" %> + + + + + + + + Product Test + + + diff --git a/Beginning ASP.NET 3.5/Chapter03/Garbage.jpg b/Beginning ASP.NET 3.5/Chapter03/Garbage.jpg new file mode 100644 index 0000000..d704155 Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter03/Garbage.jpg differ diff --git a/Beginning ASP.NET 3.5/Chapter03/Web.config b/Beginning ASP.NET 3.5/Chapter03/Web.config new file mode 100644 index 0000000..b3b2e3e --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter03/Web.config @@ -0,0 +1,113 @@ + + + + + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter05/CurrencyConverter.aspx b/Beginning ASP.NET 3.5/Chapter05/CurrencyConverter.aspx new file mode 100644 index 0000000..d801b39 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter05/CurrencyConverter.aspx @@ -0,0 +1,30 @@ +<%@ Page Language="C#" AutoEventWireup="true" + CodeFile="CurrencyConverter.aspx.cs" Inherits="CurrencyConverter" %> + + + + + + Currency Converter + + +
+ +
+ Convert:   +   U.S. dollars to   + + +

+ Currency Graph +

+
+
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter05/CurrencyConverter.aspx.cs b/Beginning ASP.NET 3.5/Chapter05/CurrencyConverter.aspx.cs new file mode 100644 index 0000000..eea8c25 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter05/CurrencyConverter.aspx.cs @@ -0,0 +1,45 @@ +using System; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.HtmlControls; + +public partial class CurrencyConverter : System.Web.UI.Page +{ + protected void Page_Load(Object sender, EventArgs e) + { + if (this.IsPostBack == false) + { + // The HtmlSelect control accepts text or ListItem objects. + Currency.Items.Add(new ListItem("Euros", "0.85")); + Currency.Items.Add(new ListItem("Japanese Yen", "110.33")); + Currency.Items.Add(new ListItem("Canadian Dollars", "1.2")); + } + Graph.Visible = false; + } + protected void Convert_ServerClick(object sender, EventArgs e) + { + decimal amount; + bool success = Decimal.TryParse(US.Value, out amount); + if (success) + { + // Retrieve the selected ListItem object by its index number. + ListItem item = Currency.Items[Currency.SelectedIndex]; + + decimal newAmount = amount * Decimal.Parse(item.Value); + Result.InnerText = amount.ToString() + " U.S. dollars = "; + Result.InnerText += newAmount.ToString() + " " + item.Text; + } + else + { + Result.InnerText = "The number you typed in was not in the correct format. "; + Result.InnerText += "Use only numbers."; + } + } + + protected void ShowGraph_ServerClick(object sender, EventArgs e) + { + Graph.Src = "Pic" + Currency.SelectedIndex.ToString() + ".png"; + Graph.Visible = true; + } +} diff --git a/Beginning ASP.NET 3.5/Chapter05/CurrencyConverter.html b/Beginning ASP.NET 3.5/Chapter05/CurrencyConverter.html new file mode 100644 index 0000000..2c4b391 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter05/CurrencyConverter.html @@ -0,0 +1,22 @@ + + + + + Currency Converter + + +
+
+ Convert:  + +  U.S. dollars to Euros. +

+ +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter05/Global.asax b/Beginning ASP.NET 3.5/Chapter05/Global.asax new file mode 100644 index 0000000..94ef54f --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter05/Global.asax @@ -0,0 +1,12 @@ +<%@ Application Language="C#" %> + + diff --git a/Beginning ASP.NET 3.5/Chapter05/HtmlEncodeTest.aspx b/Beginning ASP.NET 3.5/Chapter05/HtmlEncodeTest.aspx new file mode 100644 index 0000000..bb058ab --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter05/HtmlEncodeTest.aspx @@ -0,0 +1,21 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="HtmlEncodeTest.aspx.cs" Inherits="HtmlEncodeTest" %> + + + + + + Untitled Page + + +
+
+

Properly encoded:

+
+


+

Incorrectly encoded:

+
+
+ + + diff --git a/Beginning ASP.NET 3.5/Chapter05/HtmlEncodeTest.aspx.cs b/Beginning ASP.NET 3.5/Chapter05/HtmlEncodeTest.aspx.cs new file mode 100644 index 0000000..898db69 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter05/HtmlEncodeTest.aspx.cs @@ -0,0 +1,19 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class HtmlEncodeTest : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + ctrl1.InnerHtml = "To bold text use the tag."; + ctrl2.InnerHtml = "To bold text use the " + Server.HtmlEncode("") + " tag."; + } +} diff --git a/Beginning ASP.NET 3.5/Chapter05/ImageTest.aspx b/Beginning ASP.NET 3.5/Chapter05/ImageTest.aspx new file mode 100644 index 0000000..81213de --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter05/ImageTest.aspx @@ -0,0 +1,28 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ImageTest.aspx.cs" Inherits="ImageTest" %> + + + + + + Untitled Page + + +
+
+ +

Click on the Image

+ + +
+
+ + +
+ + + diff --git a/Beginning ASP.NET 3.5/Chapter05/ImageTest.aspx.cs b/Beginning ASP.NET 3.5/Chapter05/ImageTest.aspx.cs new file mode 100644 index 0000000..1812b0b --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter05/ImageTest.aspx.cs @@ -0,0 +1,35 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class ImageTest : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + } + + protected void ImgButton_ServerClick(Object sender, + ImageClickEventArgs e) + { + Result.InnerText = "You clicked at (" + e.X.ToString() + + ", " + e.Y.ToString() + "). "; + + if ((e.Y < 100) && (e.Y > 20) && (e.X > 20) && (e.X < 275)) + { + Result.InnerText += "You clicked on the button surface."; + } + else + { + Result.InnerText += "You clicked the button border."; + } + Response.Redirect("HtmlEncodeTest.aspx"); + } + +} diff --git a/Beginning ASP.NET 3.5/Chapter05/ShowSettings.aspx b/Beginning ASP.NET 3.5/Chapter05/ShowSettings.aspx new file mode 100644 index 0000000..8320de8 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter05/ShowSettings.aspx @@ -0,0 +1,17 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ShowSettings.aspx.cs" Inherits="ShowSettings" %> + + + + + + Untitled Page + + +
+
+ +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter05/ShowSettings.aspx.cs b/Beginning ASP.NET 3.5/Chapter05/ShowSettings.aspx.cs new file mode 100644 index 0000000..c7e8424 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter05/ShowSettings.aspx.cs @@ -0,0 +1,21 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using System.Web.Configuration; + +public partial class ShowSettings : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + lblTest.Text = "This app will look for data in the directory:
"; + lblTest.Text += WebConfigurationManager.AppSettings["DataFilePath"]; + lblTest.Text += ""; + } +} diff --git a/Beginning ASP.NET 3.5/Chapter05/Web.config b/Beginning ASP.NET 3.5/Chapter05/Web.config new file mode 100644 index 0000000..1862df7 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter05/Web.config @@ -0,0 +1,117 @@ + + + + + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter05/button.png b/Beginning ASP.NET 3.5/Chapter05/button.png new file mode 100644 index 0000000..0eae1f7 Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter05/button.png differ diff --git a/Beginning ASP.NET 3.5/Chapter05/pic0.png b/Beginning ASP.NET 3.5/Chapter05/pic0.png new file mode 100644 index 0000000..ffe57ed Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter05/pic0.png differ diff --git a/Beginning ASP.NET 3.5/Chapter05/pic1.png b/Beginning ASP.NET 3.5/Chapter05/pic1.png new file mode 100644 index 0000000..b01997f Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter05/pic1.png differ diff --git a/Beginning ASP.NET 3.5/Chapter05/pic2.png b/Beginning ASP.NET 3.5/Chapter05/pic2.png new file mode 100644 index 0000000..636e922 Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter05/pic2.png differ diff --git a/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker.sln b/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker.sln new file mode 100644 index 0000000..27f6a85 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker.sln @@ -0,0 +1,35 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "GreetingCardMaker", "D:\Code\Beginning ASP.NET 3.5\Chapter06\GreetingCardMaker\", "{57799CEA-4ED0-4DEF-8D07-64C655C38280}" + ProjectSection(WebsiteProperties) = preProject + TargetFramework = "3.5" + Debug.AspNetCompiler.VirtualPath = "/GreetingCardMaker" + Debug.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 3.5\Chapter06\GreetingCardMaker\" + Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\GreetingCardMaker\" + Debug.AspNetCompiler.Updateable = "true" + Debug.AspNetCompiler.ForceOverwrite = "true" + Debug.AspNetCompiler.FixedNames = "false" + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.VirtualPath = "/GreetingCardMaker" + Release.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 3.5\Chapter06\GreetingCardMaker\" + Release.AspNetCompiler.TargetPath = "PrecompiledWeb\GreetingCardMaker\" + Release.AspNetCompiler.Updateable = "true" + Release.AspNetCompiler.ForceOverwrite = "true" + Release.AspNetCompiler.FixedNames = "false" + Release.AspNetCompiler.Debug = "False" + VWDPort = "50328" + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|.NET = Debug|.NET + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {57799CEA-4ED0-4DEF-8D07-64C655C38280}.Debug|.NET.ActiveCfg = Debug|.NET + {57799CEA-4ED0-4DEF-8D07-64C655C38280}.Debug|.NET.Build.0 = Debug|.NET + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker.suo b/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker.suo new file mode 100644 index 0000000..8df6a7d Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker.suo differ diff --git a/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker/GreetingCardMaker.aspx b/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker/GreetingCardMaker.aspx new file mode 100644 index 0000000..aa8bb6e --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker/GreetingCardMaker.aspx @@ -0,0 +1,41 @@ +<%@ Page language="c#" Inherits="GreetingCardMaker.GreetingCardMaker" CodeFile="GreetingCardMaker.aspx.cs" %> + + + + + + Greeting Card Maker + + +
+
+
Choose + a background color:
+ +

+ Choose a font:
+ +

+ Specify a numeric font size:
+ +

+ Choose a border style:
+ +

+ +

+ Enter the greeting text below:
+ +

+ +
+
  + +


+ +
+
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker/GreetingCardMaker.aspx.cs b/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker/GreetingCardMaker.aspx.cs new file mode 100644 index 0000000..c667b45 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker/GreetingCardMaker.aspx.cs @@ -0,0 +1,108 @@ +using System; +using System.Collections; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Web; +using System.Web.SessionState; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.HtmlControls; + +namespace GreetingCardMaker +{ + + public partial class GreetingCardMaker : System.Web.UI.Page + { + protected void Page_Load(object sender, System.EventArgs e) + { + if (this.IsPostBack == false) + { + // Set color options. + lstBackColor.Items.Add("White"); + lstBackColor.Items.Add("Red"); + lstBackColor.Items.Add("Green"); + lstBackColor.Items.Add("Blue"); + lstBackColor.Items.Add("Yellow"); + + // Set font options. + lstFontName.Items.Add("Times New Roman"); + lstFontName.Items.Add("Arial"); + lstFontName.Items.Add("Verdana"); + lstFontName.Items.Add("Tahoma"); + + // Set border style options by adding a series of + // ListItem objects. + ListItem item = new ListItem(); + + // The item text indicates the name of the option. + item.Text = BorderStyle.None.ToString(); + + // The item value records the corresponding integer + // from the enumeration. To obtain this value, you + // must cast the enumeration value to an integer, + // and then convert the number to a string so it + // can be placed in the HTML page. + item.Value = ((int)BorderStyle.None).ToString(); + + // Add the item. + lstBorder.Items.Add(item); + + // Now repeat the process for two other border styles. + item = new ListItem(); + item.Text = BorderStyle.Double.ToString(); + item.Value = ((int)BorderStyle.Double).ToString(); + lstBorder.Items.Add(item); + + item = new ListItem(); + item.Text = BorderStyle.Solid.ToString(); + item.Value = ((int)BorderStyle.Solid).ToString(); + lstBorder.Items.Add(item); + + // Select the first border option. + lstBorder.SelectedIndex = 0; + + // Set the picture. + imgDefault.ImageUrl = "defaultpic.png"; + } + } + + protected void cmdUpdate_Click(object sender, System.EventArgs e) + { + // Update the color. + pnlCard.BackColor = Color.FromName(lstBackColor.SelectedItem.Text); + + // Update the font. + lblGreeting.Font.Name = lstFontName.SelectedItem.Text; + + try + { + if (Int32.Parse(txtFontSize.Text) > 0) + { + lblGreeting.Font.Size = + FontUnit.Point(Int32.Parse(txtFontSize.Text)); + } + } + catch + { + // Use error handling to ignore invalid value. + } + + // Update the border style. + pnlCard.BorderStyle = (BorderStyle)Int32.Parse(lstBorder.SelectedItem.Value); + + // Update the picture. + if (chkPicture.Checked == true) + { + imgDefault.Visible = true; + } + else + { + imgDefault.Visible = false; + } + + // Set the text. + lblGreeting.Text = txtGreeting.Text; + } + } +} diff --git a/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker/GreetingCardMaker.suo b/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker/GreetingCardMaker.suo new file mode 100644 index 0000000..33dedc6 Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker/GreetingCardMaker.suo differ diff --git a/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker/GreetingCardMaker2.aspx b/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker/GreetingCardMaker2.aspx new file mode 100644 index 0000000..d2d36ce --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker/GreetingCardMaker2.aspx @@ -0,0 +1,43 @@ +<%@ Page language="c#" Inherits="GreetingCardMaker.GreetingCardMaker2" CodeFile="GreetingCardMaker2.aspx.cs" %> + + + + + + Greeting Card Maker + + +
+
+
Choose + a background color:
+
+
+ Choose a foreground (text) color:
+
+
+ Choose a font name:
+
+
+ Specify a font size:
+
+
+ Choose a border style:
+
+
+
+
+ Enter the greeting text below:
+
+
+  
+
  + +


+ +
+
+
+ + \ No newline at end of file diff --git a/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker/GreetingCardMaker2.aspx.cs b/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker/GreetingCardMaker2.aspx.cs new file mode 100644 index 0000000..6123493 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker/GreetingCardMaker2.aspx.cs @@ -0,0 +1,119 @@ +using System; +using System.Collections; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Web; +using System.Web.SessionState; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.HtmlControls; +using System.Drawing.Text; + +namespace GreetingCardMaker +{ + public partial class GreetingCardMaker2 : System.Web.UI.Page + { + protected void Page_Load(object sender, System.EventArgs e) + { + if (this.IsPostBack == false) + { + // Get the list of colors. + string[] colorArray = Enum.GetNames(typeof(KnownColor)); + lstBackColor.DataSource = colorArray; + lstBackColor.DataBind(); + + lstForeColor.DataSource = colorArray; + lstForeColor.DataBind(); + lstForeColor.SelectedIndex = 34; + lstBackColor.SelectedIndex = 163; + + // Get the list of available fonts and add them to the font list. + InstalledFontCollection fonts = new InstalledFontCollection(); + foreach (FontFamily family in fonts.Families) + { + lstFontName.Items.Add(family.Name); + } + + // Set border style options. + string[] borderStyleArray = Enum.GetNames(typeof(BorderStyle)); + lstBorder.DataSource = borderStyleArray; + lstBorder.DataBind(); + + // Select the first border option. + lstBorder.SelectedIndex = 0; + + // Set the picture. + imgDefault.ImageUrl = "defaultpic.png"; + } + } + + private void UpdateCard() + { + // Update the color. + pnlCard.BackColor = Color.FromName(lstBackColor.SelectedItem.Text); + lblGreeting.ForeColor = Color.FromName(lstForeColor.SelectedItem.Text); + + // Update the font. + lblGreeting.Font.Name = lstFontName.SelectedItem.Text; + try + { + if (Int32.Parse(txtFontSize.Text) > 0) + { + lblGreeting.Font.Size = FontUnit.Point(Int32.Parse(txtFontSize.Text)); + } + } + catch + { + // Ignore invalid value. + } + + try + { + if (Int32.Parse(txtFontSize.Text) > 0) + { + lblGreeting.Font.Size = + FontUnit.Point(Int32.Parse(txtFontSize.Text)); + } + } + catch + { + // Ignore invalid value. + } + + // Find the appropriate TypeConverter for the BorderStyle enumeration. + TypeConverter cnvrt = TypeDescriptor.GetConverter(typeof(BorderStyle)); + + // Update the border style using the value from the converter. + pnlCard.BorderStyle = (BorderStyle)cnvrt.ConvertFromString( + lstBorder.SelectedItem.Text); + + + // Update the picture. + if (chkPicture.Checked == true) + { + imgDefault.Visible = true; + } + else + { + imgDefault.Visible = false; + } + + // Set the text. + lblGreeting.Text = txtGreeting.Text; + } + + protected void ControlChanged(Object sender, EventArgs e) + { + // Refresh the greeting card (because a control was changed). + UpdateCard(); + } + + protected void cmdUpdate_Click(object sender, EventArgs e) + { + // Refresh the greeting card (because the button was clicked). + UpdateCard(); + } + } + +} diff --git a/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker/Web.config b/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker/Web.config new file mode 100644 index 0000000..b3b2e3e --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker/Web.config @@ -0,0 +1,113 @@ + + + + + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker/defaultpic.png b/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker/defaultpic.png new file mode 100644 index 0000000..92668f1 Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter06/GreetingCardMaker/defaultpic.png differ diff --git a/Beginning ASP.NET 3.5/Chapter06/WebControls.sln b/Beginning ASP.NET 3.5/Chapter06/WebControls.sln new file mode 100644 index 0000000..7590e39 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter06/WebControls.sln @@ -0,0 +1,35 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "WebControls", "WebControls\", "{AC1D1EF6-159E-4AB0-BBB2-D8A09DA25D4B}" + ProjectSection(WebsiteProperties) = preProject + TargetFramework = "3.5" + Debug.AspNetCompiler.VirtualPath = "/WebControls" + Debug.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 3.5\Chapter06\WebControls\" + Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\WebControls\" + Debug.AspNetCompiler.Updateable = "true" + Debug.AspNetCompiler.ForceOverwrite = "true" + Debug.AspNetCompiler.FixedNames = "false" + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.VirtualPath = "/WebControls" + Release.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 3.5\Chapter06\WebControls\" + Release.AspNetCompiler.TargetPath = "PrecompiledWeb\WebControls\" + Release.AspNetCompiler.Updateable = "true" + Release.AspNetCompiler.ForceOverwrite = "true" + Release.AspNetCompiler.FixedNames = "false" + Release.AspNetCompiler.Debug = "False" + VWDPort = "53861" + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|.NET = Debug|.NET + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AC1D1EF6-159E-4AB0-BBB2-D8A09DA25D4B}.Debug|.NET.ActiveCfg = Debug|.NET + {AC1D1EF6-159E-4AB0-BBB2-D8A09DA25D4B}.Debug|.NET.Build.0 = Debug|.NET + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Beginning ASP.NET 3.5/Chapter06/WebControls.suo b/Beginning ASP.NET 3.5/Chapter06/WebControls.suo new file mode 100644 index 0000000..8dc16f0 Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter06/WebControls.suo differ diff --git a/Beginning ASP.NET 3.5/Chapter06/WebControls/BulletedList.aspx b/Beginning ASP.NET 3.5/Chapter06/WebControls/BulletedList.aspx new file mode 100644 index 0000000..8982a5c --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter06/WebControls/BulletedList.aspx @@ -0,0 +1,21 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="BulletedList.aspx.cs" Inherits="BulletedList_aspx" %> + + + + + + Untitled Page + + +
+
+ Bullet styles:
+
+ + +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter06/WebControls/BulletedList.aspx.cs b/Beginning ASP.NET 3.5/Chapter06/WebControls/BulletedList.aspx.cs new file mode 100644 index 0000000..011ebd2 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter06/WebControls/BulletedList.aspx.cs @@ -0,0 +1,32 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class BulletedList_aspx : System.Web.UI.Page +{ + + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + foreach (string style in + Enum.GetNames(typeof(BulletStyle))) + { + BulletedList1.Items.Add(style); + } + } + } + protected void BulletedList1_Click(object sender, BulletedListEventArgs e) + { + string styleName = BulletedList1.Items[e.Index].Text; + BulletStyle style = (BulletStyle)Enum.Parse(typeof(BulletStyle), styleName); + BulletedList1.BulletStyle = style; + } +} diff --git a/Beginning ASP.NET 3.5/Chapter06/WebControls/CheckListTest.aspx b/Beginning ASP.NET 3.5/Chapter06/WebControls/CheckListTest.aspx new file mode 100644 index 0000000..057a309 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter06/WebControls/CheckListTest.aspx @@ -0,0 +1,21 @@ +<%@ Page language="c#" Inherits="WebControls.CheckBoxTest" CodeFile="CheckListTest.aspx.cs" %> + + + + + + CheckBoxTest + + +
+
+ Choose your favorite programming languages:

+

+ +

+ +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter06/WebControls/CheckListTest.aspx.cs b/Beginning ASP.NET 3.5/Chapter06/WebControls/CheckListTest.aspx.cs new file mode 100644 index 0000000..230c396 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter06/WebControls/CheckListTest.aspx.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Web; +using System.Web.SessionState; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.HtmlControls; + +namespace WebControls +{ + + public partial class CheckBoxTest : System.Web.UI.Page + { + + protected void Page_Load(object sender, System.EventArgs e) + { + if (this.IsPostBack == false) + { + chklst.Items.Add("C"); + chklst.Items.Add("C++"); + chklst.Items.Add("C#"); + chklst.Items.Add("Visual Basic 6.0"); + chklst.Items.Add("VB.NET"); + chklst.Items.Add("Pascal"); + } + } + + + protected void cmdOK_Click(object sender, System.EventArgs e) + { + lblResult.Text = "You chose:"; + + foreach (ListItem lstItem in chklst.Items) + { + if (lstItem.Selected == true) + { + // Add text to label. + lblResult.Text += "
" + lstItem.Text; + } + } + + lblResult.Text += "
"; + } + } +} diff --git a/Beginning ASP.NET 3.5/Chapter06/WebControls/EventTracker.aspx b/Beginning ASP.NET 3.5/Chapter06/WebControls/EventTracker.aspx new file mode 100644 index 0000000..aca6710 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter06/WebControls/EventTracker.aspx @@ -0,0 +1,31 @@ +<%@ Page language="c#" Inherits="WebControls.EventTracker" CodeFile="EventTracker.aspx.cs" %> + + + + + + Event Tracker + + +
+
+

Controls being monitored for change events:

+ +

+ +

+ + +


+

List of events:

+
+
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter06/WebControls/EventTracker.aspx.cs b/Beginning ASP.NET 3.5/Chapter06/WebControls/EventTracker.aspx.cs new file mode 100644 index 0000000..bc4ca7a --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter06/WebControls/EventTracker.aspx.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Web; +using System.Web.SessionState; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.HtmlControls; + +namespace WebControls +{ + public partial class EventTracker : System.Web.UI.Page + { + + protected void Page_Load(object sender, System.EventArgs e) + { + Log("<< Page_Load >>"); + } + + private void Log(string entry) + { + lstEvents.Items.Add(entry); + + // Select the last item to scroll the list so the most recent + // entries are visible. + lstEvents.SelectedIndex = lstEvents.Items.Count - 1; + } + + protected void Page_PreRender(object sender, System.EventArgs e) + { + // When the Page.UnLoad event occurs it is too late + // to change the list. + Log("Page_PreRender"); + } + + protected void CtrlChanged(Object sender, EventArgs e) + { + // Find the control ID of the sender. + // This requires converting the Object type into a Control class. + string ctrlName = ((Control)sender).ID; + Log(ctrlName + " Changed"); + } + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter06/WebControls/TablePictures.aspx b/Beginning ASP.NET 3.5/Chapter06/WebControls/TablePictures.aspx new file mode 100644 index 0000000..9a15bc7 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter06/WebControls/TablePictures.aspx @@ -0,0 +1,29 @@ +<%@ Page language="c#" Inherits="WebControls.TablePictures" CodeFile="TablePictures.aspx.cs" %> + + + + + + Table Test + + +
+
+ Rows: +   + Cols: + +

+ +

+ +

+ +
+
+ + + diff --git a/Beginning ASP.NET 3.5/Chapter06/WebControls/TablePictures.aspx.cs b/Beginning ASP.NET 3.5/Chapter06/WebControls/TablePictures.aspx.cs new file mode 100644 index 0000000..3facc28 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter06/WebControls/TablePictures.aspx.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Web; +using System.Web.SessionState; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.HtmlControls; + +namespace WebControls +{ + public partial class TablePictures : System.Web.UI.Page + { + + protected void Page_Load(object sender, System.EventArgs e) + { + // Configure the table's appearance. + // This could also be performed in the .aspx file, + // or in the cmdCreate_Click event handler. + tbl.BorderStyle = BorderStyle.Inset; + tbl.BorderWidth = Unit.Pixel(1); + } + + protected void cmdCreate_Click(object sender, System.EventArgs e) + { + // Remove all the current rows and cells. + // This is not necessary if EnableViewState is set to false. + tbl.Controls.Clear(); + + int rows = Int32.Parse(txtRows.Text); + int cols = Int32.Parse(txtCols.Text); + + for (int i = 0; i < rows; i++) + { + // Create a new TableRow object. + TableRow rowNew = new TableRow(); + + // Put the TableRow in the Table. + tbl.Controls.Add(rowNew); + + for (int j = 0; j < cols; j++) + { + // Create a new TableCell object. + TableCell cellNew = new TableCell(); + + // Create a new Label object. + Label lblNew = new Label(); + lblNew.Text = "Example Cell (" + i.ToString() + "," + j.ToString() + ")
"; + + System.Web.UI.WebControls.Image imgNew = new System.Web.UI.WebControls.Image(); + imgNew.ImageUrl = "cellpic.png"; + + // Put the label and picture in the cell. + cellNew.Controls.Add(lblNew); + cellNew.Controls.Add(imgNew); + + if (chkBorder.Checked == true) + { + cellNew.BorderStyle = BorderStyle.Inset; + cellNew.BorderWidth = Unit.Pixel(1); + } + + // Put the TableCell in the TableRow. + rowNew.Controls.Add(cellNew); + } + } + + } + } +} diff --git a/Beginning ASP.NET 3.5/Chapter06/WebControls/Web.config b/Beginning ASP.NET 3.5/Chapter06/WebControls/Web.config new file mode 100644 index 0000000..b3b2e3e --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter06/WebControls/Web.config @@ -0,0 +1,113 @@ + + + + + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter06/WebControls/cellpic.PNG b/Beginning ASP.NET 3.5/Chapter06/WebControls/cellpic.PNG new file mode 100644 index 0000000..70af96a Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter06/WebControls/cellpic.PNG differ diff --git a/Beginning ASP.NET 3.5/Chapter07/CookielessSessions.sln b/Beginning ASP.NET 3.5/Chapter07/CookielessSessions.sln new file mode 100644 index 0000000..c88fa3f --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/CookielessSessions.sln @@ -0,0 +1,35 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio Codename Orcas +Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "CookielessSessions", "CookielessSessions\", "{D8DCBD07-D2B0-49BA-B6E7-93A0ED81600F}" + ProjectSection(WebsiteProperties) = preProject + TargetFramework = "3.5" + Debug.AspNetCompiler.VirtualPath = "/CookielessSessions" + Debug.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 2.0\Chapter07\CookielessSessions\" + Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\CookielessSessions\" + Debug.AspNetCompiler.Updateable = "true" + Debug.AspNetCompiler.ForceOverwrite = "true" + Debug.AspNetCompiler.FixedNames = "false" + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.VirtualPath = "/CookielessSessions" + Release.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 2.0\Chapter07\CookielessSessions\" + Release.AspNetCompiler.TargetPath = "PrecompiledWeb\CookielessSessions\" + Release.AspNetCompiler.Updateable = "true" + Release.AspNetCompiler.ForceOverwrite = "true" + Release.AspNetCompiler.FixedNames = "false" + Release.AspNetCompiler.Debug = "False" + VWDPort = "56371" + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|.NET = Debug|.NET + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D8DCBD07-D2B0-49BA-B6E7-93A0ED81600F}.Debug|.NET.ActiveCfg = Debug|.NET + {D8DCBD07-D2B0-49BA-B6E7-93A0ED81600F}.Debug|.NET.Build.0 = Debug|.NET + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Beginning ASP.NET 3.5/Chapter07/CookielessSessions.suo b/Beginning ASP.NET 3.5/Chapter07/CookielessSessions.suo new file mode 100644 index 0000000..5ae5d1d Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter07/CookielessSessions.suo differ diff --git a/Beginning ASP.NET 3.5/Chapter07/CookielessSessions/Cookieless1.aspx b/Beginning ASP.NET 3.5/Chapter07/CookielessSessions/Cookieless1.aspx new file mode 100644 index 0000000..a36270e --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/CookielessSessions/Cookieless1.aspx @@ -0,0 +1,36 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Cookieless1.aspx.cs" Inherits="Cookieless1" %> + + + + + + Untitled Page + + +
+
+ + + + + + + + + + + + + +
+ Link with Relative Path + Hyperlink.NavigateUrl is set to "Cookieless2.aspx" in code.
+ + The relative path uses
Response.Redirect("Cookieless2.aspx")
+ + The absolute path uses Response.Redirect("http://localhost/.../Cookieless2.aspx)"
+
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter07/CookielessSessions/Cookieless1.aspx.cs b/Beginning ASP.NET 3.5/Chapter07/CookielessSessions/Cookieless1.aspx.cs new file mode 100644 index 0000000..fe2b292 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/CookielessSessions/Cookieless1.aspx.cs @@ -0,0 +1,32 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class Cookieless1 : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + Session["test"] = "Test String"; + + } + protected void cmdLink_Click(object sender, EventArgs e) + { + Response.Redirect("Cookieless2.aspx"); + } + protected void cmdLinkAbsolute_Click(object sender, EventArgs e) + { + // Create a new URL based on the current URL (but ending with + // the page Cookieless2.aspx instead of Cookieless1.aspx. + string url = "http://" + Request.Url.Authority + + Request.Url.Segments[0] + Request.Url.Segments[1] + + "Cookieless2.aspx"; + Response.Redirect(url); + } +} diff --git a/Beginning ASP.NET 3.5/Chapter07/CookielessSessions/Cookieless2.aspx b/Beginning ASP.NET 3.5/Chapter07/CookielessSessions/Cookieless2.aspx new file mode 100644 index 0000000..3291b71 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/CookielessSessions/Cookieless2.aspx @@ -0,0 +1,18 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Cookieless2.aspx.cs" Inherits="Cookieless2" %> + + + + + + Untitled Page + + +
+
+ + +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter07/CookielessSessions/Cookieless2.aspx.cs b/Beginning ASP.NET 3.5/Chapter07/CookielessSessions/Cookieless2.aspx.cs new file mode 100644 index 0000000..0c54a5c --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/CookielessSessions/Cookieless2.aspx.cs @@ -0,0 +1,25 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class Cookieless2 : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + if (Session["test"] != null) + { + lblInfo.Text = "Successfully retrieved " + (string)Session["test"]; + } + else + { + lblInfo.Text = "Session information not found."; + } + } +} diff --git a/Beginning ASP.NET 3.5/Chapter07/CookielessSessions/Web.config b/Beginning ASP.NET 3.5/Chapter07/CookielessSessions/Web.config new file mode 100644 index 0000000..e7b7f78 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/CookielessSessions/Web.config @@ -0,0 +1,114 @@ + + + + + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter07/StateManagement.sln b/Beginning ASP.NET 3.5/Chapter07/StateManagement.sln new file mode 100644 index 0000000..2cff901 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/StateManagement.sln @@ -0,0 +1,35 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio Codename Orcas +Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "StateManagement", "StateManagement\", "{A87F7496-FDF0-4E6F-832D-2D82D43C6F10}" + ProjectSection(WebsiteProperties) = preProject + TargetFramework = "3.5" + Debug.AspNetCompiler.VirtualPath = "/StateManagement" + Debug.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 2.0\Chapter07\StateManagement\" + Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\StateManagement\" + Debug.AspNetCompiler.Updateable = "true" + Debug.AspNetCompiler.ForceOverwrite = "true" + Debug.AspNetCompiler.FixedNames = "false" + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.VirtualPath = "/StateManagement" + Release.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 2.0\Chapter07\StateManagement\" + Release.AspNetCompiler.TargetPath = "PrecompiledWeb\StateManagement\" + Release.AspNetCompiler.Updateable = "true" + Release.AspNetCompiler.ForceOverwrite = "true" + Release.AspNetCompiler.FixedNames = "false" + Release.AspNetCompiler.Debug = "False" + VWDPort = "55902" + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|.NET = Debug|.NET + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A87F7496-FDF0-4E6F-832D-2D82D43C6F10}.Debug|.NET.ActiveCfg = Debug|.NET + {A87F7496-FDF0-4E6F-832D-2D82D43C6F10}.Debug|.NET.Build.0 = Debug|.NET + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Beginning ASP.NET 3.5/Chapter07/StateManagement.suo b/Beginning ASP.NET 3.5/Chapter07/StateManagement.suo new file mode 100644 index 0000000..a803178 Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter07/StateManagement.suo differ diff --git a/Beginning ASP.NET 3.5/Chapter07/StateManagement/CookieExample.aspx b/Beginning ASP.NET 3.5/Chapter07/StateManagement/CookieExample.aspx new file mode 100644 index 0000000..befd50c --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/StateManagement/CookieExample.aspx @@ -0,0 +1,22 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CookieExample.aspx.cs" Inherits="CookieExample" %> + + + + + + Untitled Page + + +
+
+
+ +
+
+ Name: + + +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter07/StateManagement/CookieExample.aspx.cs b/Beginning ASP.NET 3.5/Chapter07/StateManagement/CookieExample.aspx.cs new file mode 100644 index 0000000..41f3ff0 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/StateManagement/CookieExample.aspx.cs @@ -0,0 +1,46 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class CookieExample : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + HttpCookie cookie = Request.Cookies["Preferences"]; + if (cookie == null) + { + lblWelcome.Text = "Unknown Customer"; + } + else + { + lblWelcome.Text = "Cookie Found.

"; + lblWelcome.Text += "Welcome, " + cookie["Name"]; + } + + } + protected void cmdStore_Click(object sender, EventArgs e) + { + // Check for a cookie, and only create a new one if + // one doesn't already exist. + HttpCookie cookie = Request.Cookies["Preferences"]; + if (cookie == null) + { + cookie = new HttpCookie("Preferences"); + } + + cookie["Name"] = txtName.Text; + cookie.Expires = DateTime.Now.AddYears(1); + Response.Cookies.Add(cookie); + + lblWelcome.Text = "Cookie Created.

"; + lblWelcome.Text += "New Customer: " + cookie["Name"]; + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter07/StateManagement/CrossPage1.aspx b/Beginning ASP.NET 3.5/Chapter07/StateManagement/CrossPage1.aspx new file mode 100644 index 0000000..e23613f --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/StateManagement/CrossPage1.aspx @@ -0,0 +1,26 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CrossPage1.aspx.cs" Inherits="CrossPage1" %> + + + + + + CrossPage1 + + + +
+
+ First Name: + +
+ Last Name: + +
+
+
+ +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter07/StateManagement/CrossPage1.aspx.cs b/Beginning ASP.NET 3.5/Chapter07/StateManagement/CrossPage1.aspx.cs new file mode 100644 index 0000000..e2c4332 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/StateManagement/CrossPage1.aspx.cs @@ -0,0 +1,31 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class CrossPage1 : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + if (Request.QueryString["err"] != null) + Page.Validate(); + } + + + protected void cmdTransfer_Click(object sender, EventArgs e) + { + Server.Transfer("CrossPage2.aspx", true); + } + + public string FullName + { + get { return txtFirstName.Text + " " + txtLastName.Text; } + } + +} diff --git a/Beginning ASP.NET 3.5/Chapter07/StateManagement/CrossPage2.aspx b/Beginning ASP.NET 3.5/Chapter07/StateManagement/CrossPage2.aspx new file mode 100644 index 0000000..130036a --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/StateManagement/CrossPage2.aspx @@ -0,0 +1,16 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CrossPage2.aspx.cs" Inherits="CrossPage2" %> + + + + + + Untitled Page + + + +
+
+
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter07/StateManagement/CrossPage2.aspx.cs b/Beginning ASP.NET 3.5/Chapter07/StateManagement/CrossPage2.aspx.cs new file mode 100644 index 0000000..6039cef --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/StateManagement/CrossPage2.aspx.cs @@ -0,0 +1,30 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class CrossPage2 : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + if (PreviousPage != null) + { + + lblInfo.Text = "You came from a page titled " + + PreviousPage.Title + "
"; + + CrossPage1 prevPage = PreviousPage as CrossPage1; + if (prevPage != null) + { + lblInfo.Text += "You typed in this: " + prevPage.FullName + + "
"; + } + } + } +} \ No newline at end of file diff --git a/Beginning ASP.NET 3.5/Chapter07/StateManagement/PreserveMembers.aspx b/Beginning ASP.NET 3.5/Chapter07/StateManagement/PreserveMembers.aspx new file mode 100644 index 0000000..e58199e --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/StateManagement/PreserveMembers.aspx @@ -0,0 +1,18 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PreserveMembers.aspx.cs" Inherits="PreserveMembers" %> + + + + + + Untitled Page + + +
+
+ This is a test of the PreserveMembers.aspx page
+
+ +  
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter07/StateManagement/PreserveMembers.aspx.cs b/Beginning ASP.NET 3.5/Chapter07/StateManagement/PreserveMembers.aspx.cs new file mode 100644 index 0000000..9d20922 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/StateManagement/PreserveMembers.aspx.cs @@ -0,0 +1,41 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class PreserveMembers : System.Web.UI.Page +{ + private string contents; + protected void Page_Load(object sender, EventArgs e) + { + if (this.IsPostBack) + { + // Restore variables. + contents = (string)ViewState["contents"]; + } + } + + protected void Page_PreRender(Object sender, EventArgs e) + { + // Persist variables. + ViewState["contents"] = contents; + } + + protected void cmdSave_Click(object sender, EventArgs e) + { + // Transfer contents of text box to member variable. + contents = txtValue.Text; + txtValue.Text = ""; + } + protected void cmdLoad_Click(object sender, EventArgs e) + { + // Restore contents of member variable to text box. + txtValue.Text = contents; + } +} diff --git a/Beginning ASP.NET 3.5/Chapter07/StateManagement/QueryStringRecipient.aspx b/Beginning ASP.NET 3.5/Chapter07/StateManagement/QueryStringRecipient.aspx new file mode 100644 index 0000000..c748bc5 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/StateManagement/QueryStringRecipient.aspx @@ -0,0 +1,16 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="QueryStringRecipient.aspx.cs" Inherits="QueryStringRecipient" %> + + + + + + Untitled Page + + +
+
+ +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter07/StateManagement/QueryStringRecipient.aspx.cs b/Beginning ASP.NET 3.5/Chapter07/StateManagement/QueryStringRecipient.aspx.cs new file mode 100644 index 0000000..25e344c --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/StateManagement/QueryStringRecipient.aspx.cs @@ -0,0 +1,20 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class QueryStringRecipient : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + lblInfo.Text = "Item: " + Request.QueryString["Item"]; + lblInfo.Text += "
Show Full Record: "; + lblInfo.Text += Request.QueryString["Mode"]; + } +} diff --git a/Beginning ASP.NET 3.5/Chapter07/StateManagement/QueryStringSender.aspx b/Beginning ASP.NET 3.5/Chapter07/StateManagement/QueryStringSender.aspx new file mode 100644 index 0000000..c8a5e82 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/StateManagement/QueryStringSender.aspx @@ -0,0 +1,24 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="QueryStringSender.aspx.cs" Inherits="QueryStringSender" %> + + + + + + Untitled Page + + +
+
+
+
+
+
+
+
+ + +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter07/StateManagement/QueryStringSender.aspx.cs b/Beginning ASP.NET 3.5/Chapter07/StateManagement/QueryStringSender.aspx.cs new file mode 100644 index 0000000..bbb3c97 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/StateManagement/QueryStringSender.aspx.cs @@ -0,0 +1,43 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class QueryStringSender : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + if (!this.IsPostBack) + { + // Add sample values. + lstItems.Items.Add("Econo Sofa"); + lstItems.Items.Add("Supreme Leather Drapery"); + lstItems.Items.Add("Threadbare Carpet"); + lstItems.Items.Add("Antique Lamp"); + lstItems.Items.Add("Retro-Finish Jacuzzi"); + } + } + protected void cmdGo_Click(object sender, EventArgs e) + { + if (lstItems.SelectedIndex == -1) + { + lblError.Text = "You must select an item."; + } + else + { + // Forward the user to the information page, + // with the query string data. + string url = "QueryStringRecipient.aspx?"; + url += "Item=" + Server.UrlEncode(lstItems.SelectedItem.Text) + "&"; + url += "Mode=" + chkDetails.Checked.ToString(); + Response.Redirect(url); + } + } + +} diff --git a/Beginning ASP.NET 3.5/Chapter07/StateManagement/SessionStateExample.aspx b/Beginning ASP.NET 3.5/Chapter07/StateManagement/SessionStateExample.aspx new file mode 100644 index 0000000..df0f3df --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/StateManagement/SessionStateExample.aspx @@ -0,0 +1,35 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SessionStateExample.aspx.cs" Inherits="SessionStateExample" %> + + + + + + Untitled Page + + +
+
+ + +

+
+ + + + + +
+ + + +
+
+ +
+
+ +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter07/StateManagement/SessionStateExample.aspx.cs b/Beginning ASP.NET 3.5/Chapter07/StateManagement/SessionStateExample.aspx.cs new file mode 100644 index 0000000..d603487 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/StateManagement/SessionStateExample.aspx.cs @@ -0,0 +1,105 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class SessionStateExample : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + if (!this.IsPostBack) + { + // Create Furniture objects. + Furniture piece1 = new Furniture("Econo Sofa", + "Acme Inc.", 74.99M); + Furniture piece2 = new Furniture("Pioneer Table", + "Heritage Unit", 866.75M); + Furniture piece3 = new Furniture("Retro Cabinet", + "Sixties Ltd.", 300.11M); + + // Add objects to session state. + Session["Furniture1"] = piece1; + Session["Furniture2"] = piece2; + Session["Furniture3"] = piece3; + + // Add rows to list control. + lstItems.Items.Add(piece1.Name); + lstItems.Items.Add(piece2.Name); + lstItems.Items.Add(piece3.Name); + } + + // Display some basic information about the session. + // This is useful for testing configuration settings. + lblSession.Text = "Session ID: " + Session.SessionID; + lblSession.Text += "
Number of Objects: "; + lblSession.Text += Session.Count.ToString(); + lblSession.Text += "
Mode: " + Session.Mode.ToString(); + lblSession.Text += "
Is Cookieless: "; + lblSession.Text += Session.IsCookieless.ToString(); + lblSession.Text += "
Is New: "; + lblSession.Text += Session.IsNewSession.ToString(); + lblSession.Text += "
Timeout (minutes): "; + lblSession.Text += Session.Timeout.ToString(); + + } + protected void cmdMoreInfo_Click(object sender, EventArgs e) + { + if (lstItems.SelectedIndex == -1) + { + lblRecord.Text = "No item selected."; + } + else + { + // Construct the right key name based on the index. + string key = "Furniture" + + (lstItems.SelectedIndex + 1).ToString(); + + // Retrieve the Furniture object from session state. + Furniture piece = (Furniture)Session[key]; + + // Display the information for this object. + lblRecord.Text = "Name: " + piece.Name; + lblRecord.Text += "
Manufacturer: "; + lblRecord.Text += piece.Description; + lblRecord.Text += "
Cost: " + piece.Cost.ToString("c"); + } + } + +} +public class Furniture +{ + private string name; + public string Name + { + get { return name; } + set { name = value; } + } + + private string description; + public string Description + { + get { return description; } + set { description = value; } + } + + private decimal cost; + public decimal Cost + { + get { return cost; } + set { cost = value; } + } + + public Furniture(string name, string description, + decimal cost) + { + Name = name; + Description = description; + Cost = cost; + } +} diff --git a/Beginning ASP.NET 3.5/Chapter07/StateManagement/SimpleCounter.aspx b/Beginning ASP.NET 3.5/Chapter07/StateManagement/SimpleCounter.aspx new file mode 100644 index 0000000..7428059 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/StateManagement/SimpleCounter.aspx @@ -0,0 +1,17 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SimpleCounter.aspx.cs" Inherits="SimpleCounter" %> + + + + + + Untitled Page + + +
+
+
+
+  
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter07/StateManagement/SimpleCounter.aspx.cs b/Beginning ASP.NET 3.5/Chapter07/StateManagement/SimpleCounter.aspx.cs new file mode 100644 index 0000000..bebb661 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/StateManagement/SimpleCounter.aspx.cs @@ -0,0 +1,33 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class SimpleCounter : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } + protected void cmdIncrement_Click(object sender, EventArgs e) + { + int counter; + if (ViewState["Counter"] == null) + { + counter = 1; + } + else + { + counter = (int)ViewState["Counter"] + 1; + } + + ViewState["Counter"] = counter; + lblCount.Text = "Counter: " + counter.ToString(); + } +} diff --git a/Beginning ASP.NET 3.5/Chapter07/StateManagement/StyleSheet.css b/Beginning ASP.NET 3.5/Chapter07/StateManagement/StyleSheet.css new file mode 100644 index 0000000..1411f55 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/StateManagement/StyleSheet.css @@ -0,0 +1,12 @@ +body { + font-family: Verdana; + font-size: 83%; +} + +div.Box +{ + padding: 5px; + border-width: 2px; + border-style: ridge; + background-color: Lime; +} diff --git a/Beginning ASP.NET 3.5/Chapter07/StateManagement/Web.config b/Beginning ASP.NET 3.5/Chapter07/StateManagement/Web.config new file mode 100644 index 0000000..b3b2e3e --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter07/StateManagement/Web.config @@ -0,0 +1,113 @@ + + + + + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter08/ErrorHandling.sln b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling.sln new file mode 100644 index 0000000..6c1188d --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling.sln @@ -0,0 +1,35 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio Codename Orcas +Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "ErrorHandling", "ErrorHandling\", "{F5EAAC66-2920-4B3D-8323-F427606BD082}" + ProjectSection(WebsiteProperties) = preProject + TargetFramework = "3.5" + Debug.AspNetCompiler.VirtualPath = "/ErrorHandling" + Debug.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 2.0\Chapter08\ErrorHandling\" + Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\ErrorHandling\" + Debug.AspNetCompiler.Updateable = "true" + Debug.AspNetCompiler.ForceOverwrite = "true" + Debug.AspNetCompiler.FixedNames = "false" + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.VirtualPath = "/ErrorHandling" + Release.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 2.0\Chapter08\ErrorHandling\" + Release.AspNetCompiler.TargetPath = "PrecompiledWeb\ErrorHandling\" + Release.AspNetCompiler.Updateable = "true" + Release.AspNetCompiler.ForceOverwrite = "true" + Release.AspNetCompiler.FixedNames = "false" + Release.AspNetCompiler.Debug = "False" + VWDPort = "53241" + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|.NET = Debug|.NET + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F5EAAC66-2920-4B3D-8323-F427606BD082}.Debug|.NET.ActiveCfg = Debug|.NET + {F5EAAC66-2920-4B3D-8323-F427606BD082}.Debug|.NET.Build.0 = Debug|.NET + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Beginning ASP.NET 3.5/Chapter08/ErrorHandling.suo b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling.suo new file mode 100644 index 0000000..ac7d69f Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling.suo differ diff --git a/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/ErrorHandlingTest.aspx b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/ErrorHandlingTest.aspx new file mode 100644 index 0000000..fce4c9f --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/ErrorHandlingTest.aspx @@ -0,0 +1,24 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ErrorHandlingTest.aspx.cs" Inherits="ErrorHandlingTest" %> + + + + + + Untitled Page + + + +
+
+ + 5
+ + 0
+
+
+
+
+
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/ErrorHandlingTest.aspx.cs b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/ErrorHandlingTest.aspx.cs new file mode 100644 index 0000000..ace0137 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/ErrorHandlingTest.aspx.cs @@ -0,0 +1,38 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using System.Drawing; + +public partial class ErrorHandlingTest : System.Web.UI.Page +{ + + protected void cmdCompute_Click(object sender, EventArgs e) + { + try + { + decimal a, b, result; + a = Decimal.Parse(txtA.Text); + b = Decimal.Parse(txtB.Text); + result = a / b; + lblResult.Text = result.ToString(); + lblResult.ForeColor = Color.Black; + } + catch (Exception err) + { + lblResult.Text = "Message: " + err.Message; + lblResult.Text += "

"; + lblResult.Text += "Source: " + err.Source; + lblResult.Text += "

"; + lblResult.Text += "Stack Trace: " + err.StackTrace; + lblResult.ForeColor = Color.Red; + } + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/ErrorTestCustomLog.aspx b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/ErrorTestCustomLog.aspx new file mode 100644 index 0000000..97fcded --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/ErrorTestCustomLog.aspx @@ -0,0 +1,24 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ErrorTestCustomLog.aspx.cs" Inherits="ErrorTestCustomLog" %> + + + + + + Untitled Page + + + +
+
+ + 5
+ + 0
+
+
+
+
+
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/ErrorTestCustomLog.aspx.cs b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/ErrorTestCustomLog.aspx.cs new file mode 100644 index 0000000..3666913 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/ErrorTestCustomLog.aspx.cs @@ -0,0 +1,55 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using System.Diagnostics; +using System.Drawing; + +public partial class ErrorTestCustomLog : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } + protected void cmdCompute_Click(object sender, EventArgs e) + { + try + { + decimal a, b, result; + a = Decimal.Parse(txtA.Text); + b = Decimal.Parse(txtB.Text); + result = a / b; + lblResult.Text = result.ToString(); + lblResult.ForeColor = Color.Black; + } + catch (Exception err) + { + lblResult.Text = "Message: " + err.Message + "

"; + lblResult.Text += "Source: " + err.Source + "

"; + lblResult.Text += "Stack Trace: " + err.StackTrace; + lblResult.ForeColor = Color.Red; + + // Write the information to the event log. + // Register the event source if needed. + if (!EventLog.SourceExists("DivideByZeroApp")) + { + // This registers the event source and creates the custom log, + // if needed. + EventLog.CreateEventSource("DivideByZeroApp", "ProseTech"); + } + + // Open the log. If the log doesn't exist, + // it will be created automatically. + EventLog log = new EventLog("ProseTech"); + log.Source = "DivideByZeroApp"; + log.WriteEntry(err.Message, EventLogEntryType.Error); + + } + } +} diff --git a/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/ErrorTestLog.aspx b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/ErrorTestLog.aspx new file mode 100644 index 0000000..e0b32d5 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/ErrorTestLog.aspx @@ -0,0 +1,24 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ErrorTestLog.aspx.cs" Inherits="ErrorTestLog" %> + + + + + + Untitled Page + + + +
+
+ + 5
+ + 0
+
+
+
+
+
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/ErrorTestLog.aspx.cs b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/ErrorTestLog.aspx.cs new file mode 100644 index 0000000..c3ad0e4 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/ErrorTestLog.aspx.cs @@ -0,0 +1,46 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using System.Drawing; +using System.Diagnostics; + +public partial class ErrorTestLog : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } + protected void cmdCompute_Click(object sender, EventArgs e) + { + try + { + decimal a, b, result; + a = Decimal.Parse(txtA.Text); + b = Decimal.Parse(txtB.Text); + result = a / b; + lblResult.Text = result.ToString(); + lblResult.ForeColor = Color.Black; + } + catch (Exception err) + { + lblResult.Text = "Message: " + err.Message + "

"; + lblResult.Text += "Source: " + err.Source + "

"; + lblResult.Text += "Stack Trace: " + err.StackTrace; + lblResult.ForeColor = Color.Red; + + // Write the information to the event log. + EventLog log = new EventLog(); + log.Source = "DivisionPage"; + log.WriteEntry(err.Message, EventLogEntryType.Error); + } + + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/EventReviewPage.aspx b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/EventReviewPage.aspx new file mode 100644 index 0000000..16804f5 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/EventReviewPage.aspx @@ -0,0 +1,31 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EventReviewPage.aspx.cs" Inherits="EventReviewPage" %> + + + + + + Untitled Page + + + +
+
+ +  ProseTech  +
+ +      + DivideByZeroApp
+
+
+
+
+ + + +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/EventReviewPage.aspx.cs b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/EventReviewPage.aspx.cs new file mode 100644 index 0000000..e217b41 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/EventReviewPage.aspx.cs @@ -0,0 +1,67 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using System.Diagnostics; + +public partial class EventReviewPage : System.Web.UI.Page +{ + protected void chkAll_CheckedChanged(object sender, EventArgs e) + { + // The chkAll control has AutoPostback = true. + if (chkAll.Checked) + { + txtSource.Text = ""; + txtSource.Enabled = false; + } + else + { + txtSource.Enabled = true; + } + + } + protected void cmdGet_Click(object sender, EventArgs e) + { + lblResult.Text = ""; + + // Check if the log exists. + if (!EventLog.Exists(txtLog.Text)) + { + lblResult.Text = "The event log " + txtLog.Text; + lblResult.Text += " doesn't exist."; + } + else + { + // For maximum performance, join all the event + // information into one large string using the + // StringBuilder. + System.Text.StringBuilder sb = new System.Text.StringBuilder(); + + EventLog log = new EventLog(txtLog.Text); + foreach (EventLogEntry entry in log.Entries) + { + // Write the event entries to the StringBuilder. + if (chkAll.Checked || + entry.Source == txtSource.Text) + { + sb.Append("Entry Type: "); + sb.Append(entry.EntryType.ToString()); + sb.Append("
Message: "); + sb.Append(entry.Message); + sb.Append("
Time Generated: "); + sb.Append(entry.TimeGenerated); + sb.Append("

"); + } + } + // Copy the complete text to the web page. + lblResult.Text = sb.ToString(); + } + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/SimpleTrace.aspx b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/SimpleTrace.aspx new file mode 100644 index 0000000..a39edd0 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/SimpleTrace.aspx @@ -0,0 +1,17 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SimpleTrace.aspx.cs" Inherits="SimpleTrace" %> + + + + + + Untitled Page + + +
+
+ A Simple Tracing Example
+
+
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/SimpleTrace.aspx.cs b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/SimpleTrace.aspx.cs new file mode 100644 index 0000000..3825ae5 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/SimpleTrace.aspx.cs @@ -0,0 +1,22 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class SimpleTrace : System.Web.UI.Page +{ + + protected void cmdTrace_Click(object sender, EventArgs e) + { + Page.Trace.IsEnabled = true; + + Session["TestString"] = "This is just a string."; + Session["MyDataSet"] = new DataSet(); + } +} diff --git a/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/StyleSheet.css b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/StyleSheet.css new file mode 100644 index 0000000..1411f55 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/StyleSheet.css @@ -0,0 +1,12 @@ +body { + font-family: Verdana; + font-size: 83%; +} + +div.Box +{ + padding: 5px; + border-width: 2px; + border-style: ridge; + background-color: Lime; +} diff --git a/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/TraceExample.aspx b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/TraceExample.aspx new file mode 100644 index 0000000..af38962 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/TraceExample.aspx @@ -0,0 +1,20 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TraceExample.aspx.cs" Inherits="TraceExample" Trace="true" %> + + + + + + Untitled Page + + +
+
+ + + + +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/TraceExample.aspx.cs b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/TraceExample.aspx.cs new file mode 100644 index 0000000..5369374 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/TraceExample.aspx.cs @@ -0,0 +1,46 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class TraceExample : System.Web.UI.Page +{ + + protected void cmdError_Click(object sender, EventArgs e) + { + try + { + DivideNumbers(5, 0); + } + catch (Exception err) + { + Trace.Warn("cmdError_Click", "Caught Error", err); + } + + } + protected void cmdWrite_Click(object sender, EventArgs e) + { + Trace.Write("About to place an item in session state."); + Session["Test"] = "Contents"; + Trace.Write("Placed item in session state."); + + } + protected void cmdWriteCategory_Click(object sender, EventArgs e) + { + Trace.Write("Page_Load", "About to place an item in session state."); + Session["Test"] = "Contents"; + Trace.Write("Page_Load", "Placed item in session state."); + } + + private decimal DivideNumbers(decimal number, decimal divisor) + { + return number / divisor; + } + +} diff --git a/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/Web.config b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/Web.config new file mode 100644 index 0000000..b3b2e3e --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter08/ErrorHandling/Web.config @@ -0,0 +1,113 @@ + + + + + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter10/Validation.sln b/Beginning ASP.NET 3.5/Chapter10/Validation.sln new file mode 100644 index 0000000..b6821cc --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter10/Validation.sln @@ -0,0 +1,35 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio Codename Orcas +Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Validation", "Validation\", "{DB82A7E0-C0C0-48A9-B24F-7281CD73E752}" + ProjectSection(WebsiteProperties) = preProject + TargetFramework = "3.5" + Debug.AspNetCompiler.VirtualPath = "/Validation" + Debug.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 2.0\Chapter10\Validation\" + Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\Validation\" + Debug.AspNetCompiler.Updateable = "true" + Debug.AspNetCompiler.ForceOverwrite = "true" + Debug.AspNetCompiler.FixedNames = "false" + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.VirtualPath = "/Validation" + Release.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 2.0\Chapter10\Validation\" + Release.AspNetCompiler.TargetPath = "PrecompiledWeb\Validation\" + Release.AspNetCompiler.Updateable = "true" + Release.AspNetCompiler.ForceOverwrite = "true" + Release.AspNetCompiler.FixedNames = "false" + Release.AspNetCompiler.Debug = "False" + VWDPort = "58348" + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|.NET = Debug|.NET + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DB82A7E0-C0C0-48A9-B24F-7281CD73E752}.Debug|.NET.ActiveCfg = Debug|.NET + {DB82A7E0-C0C0-48A9-B24F-7281CD73E752}.Debug|.NET.Build.0 = Debug|.NET + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Beginning ASP.NET 3.5/Chapter10/Validation.suo b/Beginning ASP.NET 3.5/Chapter10/Validation.suo new file mode 100644 index 0000000..87f1722 Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter10/Validation.suo differ diff --git a/Beginning ASP.NET 3.5/Chapter10/Validation/CustomerForm.aspx b/Beginning ASP.NET 3.5/Chapter10/Validation/CustomerForm.aspx new file mode 100644 index 0000000..cbc172b --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter10/Validation/CustomerForm.aspx @@ -0,0 +1,134 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CustomerForm.aspx.cs" Inherits="CustomerForm" %> + + + + + + Customer Form + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ User Name: + + +
+ + Password: + +
+ + Password (retype): + +
+ + E-mail: + +
+ + Age: + +
+ + Referrer Code: + +
+
+ +   + +
+
+ +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter10/Validation/CustomerForm.aspx.cs b/Beginning ASP.NET 3.5/Chapter10/Validation/CustomerForm.aspx.cs new file mode 100644 index 0000000..88cda17 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter10/Validation/CustomerForm.aspx.cs @@ -0,0 +1,47 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class CustomerForm : System.Web.UI.Page +{ + protected void cmdSubmit_Click(object sender, EventArgs e) + { + if (Page.IsValid) + { + lblMessage.Text = "This is a valid form."; + } + } + protected void cmdCancel_Click(object sender, EventArgs e) + { + lblMessage.Text = "No attempt was made to validate this form."; + } + protected void vldCode_ServerValidate(object source, ServerValidateEventArgs e) + { + try + { + // Check if the first three digits are divisible by seven. + int val = Int32.Parse(e.Value.Substring(0, 3)); + if (val % 7 == 0) + { + e.IsValid = true; + } + else + { + e.IsValid = false; + } + } + catch + { + // An error occured in the conversion. + // The value is not valid. + e.IsValid = false; + } + } +} diff --git a/Beginning ASP.NET 3.5/Chapter10/Validation/ErrorIcon.jpg b/Beginning ASP.NET 3.5/Chapter10/Validation/ErrorIcon.jpg new file mode 100644 index 0000000..f4da2c2 Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter10/Validation/ErrorIcon.jpg differ diff --git a/Beginning ASP.NET 3.5/Chapter10/Validation/ManualValidation.aspx b/Beginning ASP.NET 3.5/Chapter10/Validation/ManualValidation.aspx new file mode 100644 index 0000000..1e7ae7b --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter10/Validation/ManualValidation.aspx @@ -0,0 +1,26 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ManualValidation.aspx.cs" Inherits="ManualValidation" %> + + + + + + Manual Validation + + +
+
+ A number (1 to 10): +   +
+
+         Not validated:  +
+
+
+
+
+ +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter10/Validation/ManualValidation.aspx.cs b/Beginning ASP.NET 3.5/Chapter10/Validation/ManualValidation.aspx.cs new file mode 100644 index 0000000..93da504 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter10/Validation/ManualValidation.aspx.cs @@ -0,0 +1,39 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class ManualValidation : System.Web.UI.Page +{ + + protected void cmdOK_Click(object sender, EventArgs e) + { + string errorMessage = "Mistakes found:
"; + + bool pageIsValid = true; + // Search through the validation controls. + foreach (BaseValidator ctrl in this.Validators) + { + if (!ctrl.IsValid) + { + pageIsValid = false; + errorMessage += ctrl.ErrorMessage + "
"; + + // Find the corresponding input control, and change the + // generic Control variable into a TextBox variable. + // This allows access to the Text property. + TextBox ctrlInput = (TextBox)this.FindControl(ctrl.ControlToValidate); + errorMessage += " * Problem is with this input: "; + errorMessage += ctrlInput.Text + "
"; + } + } + if (!pageIsValid) lblMessage.Text = errorMessage; + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter10/Validation/RegularExpressionTest.aspx b/Beginning ASP.NET 3.5/Chapter10/Validation/RegularExpressionTest.aspx new file mode 100644 index 0000000..b73e0db --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter10/Validation/RegularExpressionTest.aspx @@ -0,0 +1,28 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RegularExpressionTest.aspx.cs" Inherits="RegularExpressionTest" %> + + + + + + Regular Expression Test + + +
+
+ + + + Current Expression: (none) + New Expression: + +
+ + + + + Test Current Expression: +
+
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter10/Validation/RegularExpressionTest.aspx.cs b/Beginning ASP.NET 3.5/Chapter10/Validation/RegularExpressionTest.aspx.cs new file mode 100644 index 0000000..b4fe7a1 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter10/Validation/RegularExpressionTest.aspx.cs @@ -0,0 +1,22 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class RegularExpressionTest : System.Web.UI.Page +{ + + protected void cmdSetExpression_Click(object sender, EventArgs e) + { + TestValidator.ValidationExpression = txtExpression.Text; + lblExpression.Text = "Current Expression: "; + lblExpression.Text += txtExpression.Text; + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter10/Validation/StyleSheet.css b/Beginning ASP.NET 3.5/Chapter10/Validation/StyleSheet.css new file mode 100644 index 0000000..1411f55 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter10/Validation/StyleSheet.css @@ -0,0 +1,12 @@ +body { + font-family: Verdana; + font-size: 83%; +} + +div.Box +{ + padding: 5px; + border-width: 2px; + border-style: ridge; + background-color: Lime; +} diff --git a/Beginning ASP.NET 3.5/Chapter10/Validation/ValidationGroups.aspx b/Beginning ASP.NET 3.5/Chapter10/Validation/ValidationGroups.aspx new file mode 100644 index 0000000..fb082be --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter10/Validation/ValidationGroups.aspx @@ -0,0 +1,40 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ValidationGroups.aspx.cs" Inherits="ValidationGroups" %> + + + + + + Untitled Page + + +
+
+ + + +
+
+
+ +  
+ + +
+
+
+

+
+
+ Fill in one text box. You can now use the button in underneath to post back the page. + However, if you click the other button (the one next to the empty text box), + validation will fail for that group, and you won't be able to post back the page. + + +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter10/Validation/ValidationGroups.aspx.cs b/Beginning ASP.NET 3.5/Chapter10/Validation/ValidationGroups.aspx.cs new file mode 100644 index 0000000..c968b04 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter10/Validation/ValidationGroups.aspx.cs @@ -0,0 +1,27 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class ValidationGroups : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } + + protected void Button_Click(object sender, EventArgs e) + { + if (Page.IsValid) + { + lblInfo.Text = "Page posted back at " + DateTime.Now.ToLongTimeString(); + } + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter10/Validation/ValidationSummary.aspx b/Beginning ASP.NET 3.5/Chapter10/Validation/ValidationSummary.aspx new file mode 100644 index 0000000..1983df4 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter10/Validation/ValidationSummary.aspx @@ -0,0 +1,32 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ValidationSummary.aspx.cs" Inherits="ValidationSummary" %> + + + + + + Validation Summary + + +
+
+

A number (1 to 10): +   + +
+
+         Not validated:  +
+

+


+
+
+
+
+

+
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter10/Validation/ValidationSummary.aspx.cs b/Beginning ASP.NET 3.5/Chapter10/Validation/ValidationSummary.aspx.cs new file mode 100644 index 0000000..09aa745 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter10/Validation/ValidationSummary.aspx.cs @@ -0,0 +1,24 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class ValidationSummary : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } + protected void cmdOK_Click(object sender, EventArgs e) + { + // Abort the event if the page isnt valid. + if (!Page.IsValid) return; + lblMessage.Text = "cmdOK_Click event handler executed."; + } +} diff --git a/Beginning ASP.NET 3.5/Chapter10/Validation/ValidationTest.aspx b/Beginning ASP.NET 3.5/Chapter10/Validation/ValidationTest.aspx new file mode 100644 index 0000000..2a2431c --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter10/Validation/ValidationTest.aspx @@ -0,0 +1,33 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ValidationTest.aspx.cs" Inherits="ValidationTest" %> + + + + + + Validation Test + + +
+
+

+ A number (1 to 10): +        +  
+
+         Not validated:  +
+

+


+
+
+   +

+

+ Client script is disabled on this page so you can see how validation performs on + down-level browsers. Even though they trigger a postback, your code should detect + that the page is invalid. To switch back to the default behavior, set RangeValidation.EnableClientScript + to true.

+
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter10/Validation/ValidationTest.aspx.cs b/Beginning ASP.NET 3.5/Chapter10/Validation/ValidationTest.aspx.cs new file mode 100644 index 0000000..9453363 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter10/Validation/ValidationTest.aspx.cs @@ -0,0 +1,25 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class ValidationTest : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } + protected void cmdOK_Click(object sender, EventArgs e) + { + // Abort the event if the page isn't valid. + if (!Page.IsValid) return; + lblMessage.Text = "cmdOK_Click event handler executed."; + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter10/Validation/Web.config b/Beginning ASP.NET 3.5/Chapter10/Validation/Web.config new file mode 100644 index 0000000..b3b2e3e --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter10/Validation/Web.config @@ -0,0 +1,113 @@ + + + + + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter11/RichControls.sln b/Beginning ASP.NET 3.5/Chapter11/RichControls.sln new file mode 100644 index 0000000..658560f --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter11/RichControls.sln @@ -0,0 +1,35 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio Codename Orcas +Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "RichControls", "RichControls\", "{D1F42A98-F788-4319-B1A3-B3EF8E8FB4CF}" + ProjectSection(WebsiteProperties) = preProject + TargetFramework = "3.5" + Debug.AspNetCompiler.VirtualPath = "/RichControls" + Debug.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 2.0\Chapter11\RichControls\" + Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\RichControls\" + Debug.AspNetCompiler.Updateable = "true" + Debug.AspNetCompiler.ForceOverwrite = "true" + Debug.AspNetCompiler.FixedNames = "false" + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.VirtualPath = "/RichControls" + Release.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 2.0\Chapter11\RichControls\" + Release.AspNetCompiler.TargetPath = "PrecompiledWeb\RichControls\" + Release.AspNetCompiler.Updateable = "true" + Release.AspNetCompiler.ForceOverwrite = "true" + Release.AspNetCompiler.FixedNames = "false" + Release.AspNetCompiler.Debug = "False" + VWDPort = "57836" + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|.NET = Debug|.NET + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D1F42A98-F788-4319-B1A3-B3EF8E8FB4CF}.Debug|.NET.ActiveCfg = Debug|.NET + {D1F42A98-F788-4319-B1A3-B3EF8E8FB4CF}.Debug|.NET.Build.0 = Debug|.NET + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Beginning ASP.NET 3.5/Chapter11/RichControls.suo b/Beginning ASP.NET 3.5/Chapter11/RichControls.suo new file mode 100644 index 0000000..93cd3ed Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter11/RichControls.suo differ diff --git a/Beginning ASP.NET 3.5/Chapter11/RichControls/AdRotatorTest.aspx b/Beginning ASP.NET 3.5/Chapter11/RichControls/AdRotatorTest.aspx new file mode 100644 index 0000000..c1ea81e --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter11/RichControls/AdRotatorTest.aspx @@ -0,0 +1,20 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AdRotatorTest.aspx.cs" Inherits="AdRotatorTest" %> + + + + + + Untitled Page + + +
+
+ +
+
+
+ HyperLink
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter11/RichControls/AdRotatorTest.aspx.cs b/Beginning ASP.NET 3.5/Chapter11/RichControls/AdRotatorTest.aspx.cs new file mode 100644 index 0000000..aa62113 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter11/RichControls/AdRotatorTest.aspx.cs @@ -0,0 +1,28 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class AdRotatorTest : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } + protected void Ads_AdCreated(object sender, AdCreatedEventArgs e) + { + // Synchronize the Hyperlink control. + lnkBanner.NavigateUrl = e.NavigateUrl; + + // Syncrhonize the text of the link. + lnkBanner.Text = "Click here for information about our sponsor: "; + lnkBanner.Text += e.AlternateText; + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter11/RichControls/Appointment.aspx b/Beginning ASP.NET 3.5/Chapter11/RichControls/Appointment.aspx new file mode 100644 index 0000000..b45821a --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter11/RichControls/Appointment.aspx @@ -0,0 +1,28 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Appointment.aspx.cs" Inherits="Appointment" %> + + + + + + Untitled Page + + + +
+
+ + + + + +
+ Choose day:
+ + +
+ Choose time:
+
+
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter11/RichControls/Appointment.aspx.cs b/Beginning ASP.NET 3.5/Chapter11/RichControls/Appointment.aspx.cs new file mode 100644 index 0000000..0f0a5bd --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter11/RichControls/Appointment.aspx.cs @@ -0,0 +1,57 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class Appointment : System.Web.UI.Page +{ + + protected void MyCalendar_SelectionChanged(object sender, EventArgs e) + { + lstTimes.Items.Clear(); + + switch (MyCalendar.SelectedDate.DayOfWeek) + { + case DayOfWeek.Monday: + // Apply special Monday schedule. + lstTimes.Items.Add("10:00"); + lstTimes.Items.Add("10:30"); + lstTimes.Items.Add("11:00"); + break; + default: + lstTimes.Items.Add("10:00"); + lstTimes.Items.Add("10:30"); + lstTimes.Items.Add("11:00"); + lstTimes.Items.Add("11:30"); + lstTimes.Items.Add("12:00"); + lstTimes.Items.Add("12:30"); + break; + } + + } + protected void MyCalendar_DayRender(object sender, DayRenderEventArgs e) + { + // Check for May 5 in any year, and format it. + if (e.Day.Date.Day == 5 && e.Day.Date.Month == 5) + { + e.Cell.BackColor = System.Drawing.Color.Yellow; + + // Add some static text to the cell. + Label lbl = new Label(); + lbl.Text = "
My Birthday!"; + e.Cell.Controls.Add(lbl); + } + // Restrict dates after the year 2010, and those on the weekend. + if (e.Day.Date.Year > 2006) + { + e.Day.IsSelectable = false; + } + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter11/RichControls/CalendarTest.aspx b/Beginning ASP.NET 3.5/Chapter11/RichControls/CalendarTest.aspx new file mode 100644 index 0000000..430c1f4 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter11/RichControls/CalendarTest.aspx @@ -0,0 +1,26 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CalendarTest.aspx.cs" Inherits="CalendarTest" %> + + + + + + Untitled Page + + +
+
+ + + + + + + + +
+ +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter11/RichControls/CalendarTest.aspx.cs b/Beginning ASP.NET 3.5/Chapter11/RichControls/CalendarTest.aspx.cs new file mode 100644 index 0000000..f0f6a06 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter11/RichControls/CalendarTest.aspx.cs @@ -0,0 +1,39 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class CalendarTest : System.Web.UI.Page +{ + protected void MyCalendar_SelectionChanged(object sender, EventArgs e) + { + lblDates.Text = "You selected these dates:
"; + + foreach (DateTime dt in MyCalendar.SelectedDates) + { + lblDates.Text += dt.ToLongDateString() + "
"; + } + + } + protected void MyCalendar_DayRender(object sender, DayRenderEventArgs e) + { + // Check for May 5 in any year, and format it. + if (e.Day.Date.Day == 5 && e.Day.Date.Month == 5) + { + e.Cell.BackColor = System.Drawing.Color.Yellow; + + // Add some static text to the cell. + Label lbl = new Label(); + lbl.Text = "
My Birthday!"; + e.Cell.Controls.Add(lbl); + } + + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter11/RichControls/MainAds.xml b/Beginning ASP.NET 3.5/Chapter11/RichControls/MainAds.xml new file mode 100644 index 0000000..b8a89b2 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter11/RichControls/MainAds.xml @@ -0,0 +1,12 @@ + + + + + msasp.gif + http://www.microsoft.com + Microsoft + 1 + + + + diff --git a/Beginning ASP.NET 3.5/Chapter11/RichControls/MultiViewGreetingCardMaker.aspx b/Beginning ASP.NET 3.5/Chapter11/RichControls/MultiViewGreetingCardMaker.aspx new file mode 100644 index 0000000..a101e28 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter11/RichControls/MultiViewGreetingCardMaker.aspx @@ -0,0 +1,83 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MultiViewGreetingCardMaker.aspx.cs" Inherits="MultiViewGreetingCardMaker" %> + + + + + + Untitled Page + + + +
+
+ + + + + +
+ + + Choose a foreground (text) color:
+ +
+
+ Choose a background color:
+ + + +
+ + + +
+ + + Choose a border style:
+ +
+
+ + +
+ + + +
+ + Choose a font name:
+ +
+
+ Specify a font size:
+
+
+ Enter the greeting text below:
+ + +
+ + + +
+
+
+ +
+   + + +
+
+
+ +
+ + diff --git a/Beginning ASP.NET 3.5/Chapter11/RichControls/MultiViewGreetingCardMaker.aspx.cs b/Beginning ASP.NET 3.5/Chapter11/RichControls/MultiViewGreetingCardMaker.aspx.cs new file mode 100644 index 0000000..a63db2a --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter11/RichControls/MultiViewGreetingCardMaker.aspx.cs @@ -0,0 +1,111 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using System.Drawing; +using System.ComponentModel; + +public partial class MultiViewGreetingCardMaker : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + // Get the list of colors. + string[] colorArray = Enum.GetNames(typeof(System.Drawing.KnownColor)); + lstBackColor.DataSource = colorArray; + lstBackColor.DataBind(); + + lstForeColor.DataSource = colorArray; + lstForeColor.DataBind(); + lstForeColor.SelectedIndex = 34; + lstBackColor.SelectedIndex = 163; + + // Get the list of available fonts and add them to the font list. + System.Drawing.Text.InstalledFontCollection fonts; + fonts = new System.Drawing.Text.InstalledFontCollection(); + foreach (FontFamily family in fonts.Families) + { + lstFontName.Items.Add(family.Name); + } + + // Set border style options. + string[] borderStyleArray = Enum.GetNames(typeof(BorderStyle)); + lstBorder.DataSource = borderStyleArray; + lstBorder.DataBind(); + + // Select the first border option. + lstBorder.SelectedIndex = 0; + + // Set the picture. + imgDefault.ImageUrl = "defaultpic.png"; + } + } + + private void Update() + { + // Update the color. + pnlCard.BackColor = Color.FromName(lstBackColor.SelectedItem.Text); + lblGreeting.ForeColor = Color.FromName(lstForeColor.SelectedItem.Text); + + // Update the font. + lblGreeting.Font.Name = lstFontName.SelectedItem.Text; + try + { + if (Int32.Parse(txtFontSize.Text) > 0) + { + lblGreeting.Font.Size = FontUnit.Point(Int32.Parse(txtFontSize.Text)); + } + } + catch + { + // Ignore invalid value. + } + + try + { + if (Int32.Parse(txtFontSize.Text) > 0) + { + lblGreeting.Font.Size = + FontUnit.Point(Int32.Parse(txtFontSize.Text)); + } + } + catch + { + // Ignore invalid value. + } + + // Find the appropriate TypeConverter for the BorderStyle enumeration. + TypeConverter cnvrt = TypeDescriptor.GetConverter(typeof(BorderStyle)); + + // Update the border style using the value from the converter. + pnlCard.BorderStyle = (BorderStyle)cnvrt.ConvertFromString( + lstBorder.SelectedItem.Text); + + + // Update the picture. + if (chkPicture.Checked == true) + { + imgDefault.Visible = true; + } + else + { + imgDefault.Visible = false; + } + + // Set the text. + lblGreeting.Text = txtGreeting.Text; + } + + protected void ControlChanged(Object sender, EventArgs e) + { + // Refresh the greeting card. + Update(); + } +} diff --git a/Beginning ASP.NET 3.5/Chapter11/RichControls/StyleSheet.css b/Beginning ASP.NET 3.5/Chapter11/RichControls/StyleSheet.css new file mode 100644 index 0000000..1411f55 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter11/RichControls/StyleSheet.css @@ -0,0 +1,12 @@ +body { + font-family: Verdana; + font-size: 83%; +} + +div.Box +{ + padding: 5px; + border-width: 2px; + border-style: ridge; + background-color: Lime; +} diff --git a/Beginning ASP.NET 3.5/Chapter11/RichControls/Web.config b/Beginning ASP.NET 3.5/Chapter11/RichControls/Web.config new file mode 100644 index 0000000..b3b2e3e --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter11/RichControls/Web.config @@ -0,0 +1,113 @@ + + + + + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter11/RichControls/WizardGreetingCardMaker.aspx b/Beginning ASP.NET 3.5/Chapter11/RichControls/WizardGreetingCardMaker.aspx new file mode 100644 index 0000000..34fd60f --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter11/RichControls/WizardGreetingCardMaker.aspx @@ -0,0 +1,66 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="WizardGreetingCardMaker.aspx.cs" Inherits="WizardGreetingCardMaker" %> + + + + + + Greeting Card Wizard + + + +
+
+ + + + + Choose a foreground (text) color:
+ +
+
+ Choose a background color:
+ + + +
+ + + Choose a border style:
+ +
+
+ + +
+ + + + Choose a font name:
+ +
+
+ Specify a font size:
+
+
+ Enter the greeting text below:
+ + +
+ + +
+   + +
+
+
+
+ +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter11/RichControls/WizardGreetingCardMaker.aspx.cs b/Beginning ASP.NET 3.5/Chapter11/RichControls/WizardGreetingCardMaker.aspx.cs new file mode 100644 index 0000000..b945f01 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter11/RichControls/WizardGreetingCardMaker.aspx.cs @@ -0,0 +1,109 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using System.Drawing; +using System.ComponentModel; + +public partial class WizardGreetingCardMaker : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + // Get the list of colors. + string[] colorArray = Enum.GetNames(typeof(System.Drawing.KnownColor)); + lstBackColor.DataSource = colorArray; + lstBackColor.DataBind(); + + lstForeColor.DataSource = colorArray; + lstForeColor.DataBind(); + lstForeColor.SelectedIndex = 34; + lstBackColor.SelectedIndex = 163; + + // Get the list of available fonts and add them to the font list. + System.Drawing.Text.InstalledFontCollection fonts; + fonts = new System.Drawing.Text.InstalledFontCollection(); + foreach (FontFamily family in fonts.Families) + { + lstFontName.Items.Add(family.Name); + } + + // Set border style options. + string[] borderStyleArray = Enum.GetNames(typeof(BorderStyle)); + lstBorder.DataSource = borderStyleArray; + lstBorder.DataBind(); + + // Select the first border option. + lstBorder.SelectedIndex = 0; + + // Set the picture. + imgDefault.ImageUrl = "defaultpic.png"; + } + } + protected void Wizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e) + { + Update(); + } + + private void Update() + { + // Update the color. + pnlCard.BackColor = Color.FromName(lstBackColor.SelectedItem.Text); + lblGreeting.ForeColor = Color.FromName(lstForeColor.SelectedItem.Text); + + // Update the font. + lblGreeting.Font.Name = lstFontName.SelectedItem.Text; + try + { + if (Int32.Parse(txtFontSize.Text) > 0) + { + lblGreeting.Font.Size = FontUnit.Point(Int32.Parse(txtFontSize.Text)); + } + } + catch + { + // Ignore invalid value. + } + + try + { + if (Int32.Parse(txtFontSize.Text) > 0) + { + lblGreeting.Font.Size = + FontUnit.Point(Int32.Parse(txtFontSize.Text)); + } + } + catch + { + // Ignore invalid value. + } + + // Find the appropriate TypeConverter for the BorderStyle enumeration. + TypeConverter cnvrt = TypeDescriptor.GetConverter(typeof(BorderStyle)); + + // Update the border style using the value from the converter. + pnlCard.BorderStyle = (BorderStyle)cnvrt.ConvertFromString( + lstBorder.SelectedItem.Text); + + + // Update the picture. + if (chkPicture.Checked == true) + { + imgDefault.Visible = true; + } + else + { + imgDefault.Visible = false; + } + + // Set the text. + lblGreeting.Text = txtGreeting.Text; + } +} diff --git a/Beginning ASP.NET 3.5/Chapter11/RichControls/defaultpic.png b/Beginning ASP.NET 3.5/Chapter11/RichControls/defaultpic.png new file mode 100644 index 0000000..92668f1 Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter11/RichControls/defaultpic.png differ diff --git a/Beginning ASP.NET 3.5/Chapter11/RichControls/msasp.gif b/Beginning ASP.NET 3.5/Chapter11/RichControls/msasp.gif new file mode 100644 index 0000000..cbcffd7 Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter11/RichControls/msasp.gif differ diff --git a/Beginning ASP.NET 3.5/Chapter12/CustomDrawing.sln b/Beginning ASP.NET 3.5/Chapter12/CustomDrawing.sln new file mode 100644 index 0000000..1475c09 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/CustomDrawing.sln @@ -0,0 +1,35 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio Codename Orcas +Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "CustomDrawing", "CustomDrawing\", "{1CC050BE-DA17-4A24-8170-8C914FDAA56D}" + ProjectSection(WebsiteProperties) = preProject + TargetFramework = "3.5" + Debug.AspNetCompiler.VirtualPath = "/CustomDrawing" + Debug.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 2.0\Chapter12\CustomDrawing\" + Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\CustomDrawing\" + Debug.AspNetCompiler.Updateable = "true" + Debug.AspNetCompiler.ForceOverwrite = "true" + Debug.AspNetCompiler.FixedNames = "false" + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.VirtualPath = "/CustomDrawing" + Release.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 2.0\Chapter12\CustomDrawing\" + Release.AspNetCompiler.TargetPath = "PrecompiledWeb\CustomDrawing\" + Release.AspNetCompiler.Updateable = "true" + Release.AspNetCompiler.ForceOverwrite = "true" + Release.AspNetCompiler.FixedNames = "false" + Release.AspNetCompiler.Debug = "False" + VWDPort = "57547" + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|.NET = Debug|.NET + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1CC050BE-DA17-4A24-8170-8C914FDAA56D}.Debug|.NET.ActiveCfg = Debug|.NET + {1CC050BE-DA17-4A24-8170-8C914FDAA56D}.Debug|.NET.Build.0 = Debug|.NET + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Beginning ASP.NET 3.5/Chapter12/CustomDrawing.suo b/Beginning ASP.NET 3.5/Chapter12/CustomDrawing.suo new file mode 100644 index 0000000..f6a7ff6 Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter12/CustomDrawing.suo differ diff --git a/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/ContentAndGraphics.aspx b/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/ContentAndGraphics.aspx new file mode 100644 index 0000000..4e3db9c --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/ContentAndGraphics.aspx @@ -0,0 +1,20 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ContentAndGraphics.aspx.cs" Inherits="ContentAndGraphics" %> + + + + + + Untitled Page + + +
+
+ Here is some content. +

+ +

+ Here is some more content. +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/ContentAndGraphics.aspx.cs b/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/ContentAndGraphics.aspx.cs new file mode 100644 index 0000000..a1b72e0 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/ContentAndGraphics.aspx.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class ContentAndGraphics : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/GraphicalText.aspx b/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/GraphicalText.aspx new file mode 100644 index 0000000..99c7e9c --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/GraphicalText.aspx @@ -0,0 +1,16 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GraphicalText.aspx.cs" Inherits="GraphicalText" %> + + + + + + Untitled Page + + +
+
+ +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/GraphicalText.aspx.cs b/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/GraphicalText.aspx.cs new file mode 100644 index 0000000..b69b7ae --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/GraphicalText.aspx.cs @@ -0,0 +1,45 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using System.Drawing; + +public partial class GraphicalText : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + // Create an in-memory bitmap where you will draw the image. + // The Bitmap is 300 pixels wide and 50 pixels high. + Bitmap image = new Bitmap(300, 50); + + // Get the graphics context for the bitmap. + Graphics g = Graphics.FromImage(image); + + // Draw a solid yellow rectangle with a red border. + g.FillRectangle(Brushes.LightYellow, 0, 0, 300, 50); + g.DrawRectangle(Pens.Red, 0, 0, 299, 49); + + // Draw some text using a fancy font. + Font font = new Font("Alba Super", 20, FontStyle.Regular); + g.DrawString("This is a test.", font, Brushes.Blue, 10, 0); + + // Copy a smaller gif into the image from a file. + System.Drawing.Image icon = System.Drawing.Image.FromFile(Server.MapPath("smiley.gif")); + g.DrawImageUnscaled(icon, 240, 0); + + // Render the entire bitmap to the HTML output stream. + image.Save(Response.OutputStream, + System.Drawing.Imaging.ImageFormat.Gif); + + // Clean up. + g.Dispose(); + image.Dispose(); + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/GraphicalText2.aspx b/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/GraphicalText2.aspx new file mode 100644 index 0000000..9d494b9 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/GraphicalText2.aspx @@ -0,0 +1,16 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GraphicalText2.aspx.cs" Inherits="GraphicalText2" %> + + + + + + Untitled Page + + +
+
+ +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/GraphicalText2.aspx.cs b/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/GraphicalText2.aspx.cs new file mode 100644 index 0000000..0776482 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/GraphicalText2.aspx.cs @@ -0,0 +1,49 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using System.Drawing; + +public partial class GraphicalText2 : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + // Get the user name. + if (Request.QueryString["Name"] == null) + { + // No name was supplied. + // Don't display anything. + } + else + { + string name = Request.QueryString["Name"]; + + // Create an in-memory bitmap where you will draw the image. + Bitmap image = new Bitmap(300, 50); + + // Get the graphics context for the bitmap. + Graphics g = Graphics.FromImage(image); + + g.FillRectangle(Brushes.LightYellow, 0, 0, 300, 50); + g.DrawRectangle(Pens.Red, 0, 0, 299, 49); + + // Draw some text based on the query string. + Font font = new Font("Alba Super", 20, FontStyle.Regular); + g.DrawString(name, font, Brushes.Blue, 10, 0); + + // Render the entire bitmap to the HTML output stream. + image.Save(Response.OutputStream, + System.Drawing.Imaging.ImageFormat.Gif); + + g.Dispose(); + image.Dispose(); + } + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/Web.config b/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/Web.config new file mode 100644 index 0000000..b3b2e3e --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/Web.config @@ -0,0 +1,113 @@ + + + + + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/smiley.gif b/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/smiley.gif new file mode 100644 index 0000000..4bc09bc Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter12/CustomDrawing/smiley.gif differ diff --git a/Beginning ASP.NET 3.5/Chapter12/UserControls.sln b/Beginning ASP.NET 3.5/Chapter12/UserControls.sln new file mode 100644 index 0000000..ecbe26b --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/UserControls.sln @@ -0,0 +1,35 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio Codename Orcas +Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "UserControls", "UserControls\", "{565BF17E-D93C-464B-ADAE-10DF67B2095D}" + ProjectSection(WebsiteProperties) = preProject + TargetFramework = "3.5" + Debug.AspNetCompiler.VirtualPath = "/UserControls" + Debug.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 2.0\Chapter12\UserControls\" + Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\UserControls\" + Debug.AspNetCompiler.Updateable = "true" + Debug.AspNetCompiler.ForceOverwrite = "true" + Debug.AspNetCompiler.FixedNames = "false" + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.VirtualPath = "/UserControls" + Release.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 2.0\Chapter12\UserControls\" + Release.AspNetCompiler.TargetPath = "PrecompiledWeb\UserControls\" + Release.AspNetCompiler.Updateable = "true" + Release.AspNetCompiler.ForceOverwrite = "true" + Release.AspNetCompiler.FixedNames = "false" + Release.AspNetCompiler.Debug = "False" + VWDPort = "57534" + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|.NET = Debug|.NET + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {565BF17E-D93C-464B-ADAE-10DF67B2095D}.Debug|.NET.ActiveCfg = Debug|.NET + {565BF17E-D93C-464B-ADAE-10DF67B2095D}.Debug|.NET.Build.0 = Debug|.NET + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Beginning ASP.NET 3.5/Chapter12/UserControls.suo b/Beginning ASP.NET 3.5/Chapter12/UserControls.suo new file mode 100644 index 0000000..2111c67 Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter12/UserControls.suo differ diff --git a/Beginning ASP.NET 3.5/Chapter12/UserControls/App_Code/LinkClickedEventArgs.cs b/Beginning ASP.NET 3.5/Chapter12/UserControls/App_Code/LinkClickedEventArgs.cs new file mode 100644 index 0000000..247c4d9 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/UserControls/App_Code/LinkClickedEventArgs.cs @@ -0,0 +1,34 @@ +using System; +using System.Data; +using System.Configuration; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public class LinkClickedEventArgs : EventArgs +{ + private string url; + public string Url + { + get { return url; } + set { url = value; } + } + + private bool cancel = false; + public bool Cancel + { + get { return cancel; } + set { cancel = value; } + } + + public LinkClickedEventArgs(string url) + { + Url = url; + } +} +public delegate void LinkClickedEventHandler(object sender, + LinkClickedEventArgs e); + diff --git a/Beginning ASP.NET 3.5/Chapter12/UserControls/App_Code/NameTextBox.cs b/Beginning ASP.NET 3.5/Chapter12/UserControls/App_Code/NameTextBox.cs new file mode 100644 index 0000000..6f5c683 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/UserControls/App_Code/NameTextBox.cs @@ -0,0 +1,53 @@ +using System; +using System.Data; +using System.Configuration; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public class NameTextBox : TextBox +{ + private string firstName; + private string lastName; + + public string GetFirstName() + { + UpdateNames(); + return firstName; + } + + public string GetLastName() + { + UpdateNames(); + return lastName; + } + + private void UpdateNames() + { + int commaPos = this.Text.IndexOf(','); + int spacePos = this.Text.IndexOf(' '); + + string[] nameArray; + if (commaPos != -1) + { + nameArray = this.Text.Split(','); + firstName = nameArray[1]; + lastName = nameArray[0]; + } + else if (spacePos != -1) + { + nameArray = this.Text.Split(' '); + firstName = nameArray[0]; + lastName = nameArray[1]; + } + else + { + // The text has no comma or space. + // It cannot be converted to a name. + throw new InvalidOperationException(); + } + } +} diff --git a/Beginning ASP.NET 3.5/Chapter12/UserControls/Footer.ascx b/Beginning ASP.NET 3.5/Chapter12/UserControls/Footer.ascx new file mode 100644 index 0000000..a8c7a1c --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/UserControls/Footer.ascx @@ -0,0 +1,2 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Footer.ascx.cs" Inherits="Footer" %> + \ No newline at end of file diff --git a/Beginning ASP.NET 3.5/Chapter12/UserControls/Footer.ascx.cs b/Beginning ASP.NET 3.5/Chapter12/UserControls/Footer.ascx.cs new file mode 100644 index 0000000..60010df --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/UserControls/Footer.ascx.cs @@ -0,0 +1,37 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class Footer : System.Web.UI.UserControl +{ + protected void Page_Load(object sender, EventArgs e) + { + lblFooter.Text = "This page was served at "; + + if (format == FooterFormat.LongDate) + { + lblFooter.Text += DateTime.Now.ToLongDateString(); + } + else if (format == FooterFormat.ShortTime) + { + lblFooter.Text += DateTime.Now.ToShortTimeString(); + } + } + + public enum FooterFormat + { LongDate, ShortTime } + + private FooterFormat format = FooterFormat.LongDate; + public FooterFormat Format + { + get { return format; } + set { format = value; } + } +} diff --git a/Beginning ASP.NET 3.5/Chapter12/UserControls/FooterHost.aspx b/Beginning ASP.NET 3.5/Chapter12/UserControls/FooterHost.aspx new file mode 100644 index 0000000..950a204 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/UserControls/FooterHost.aspx @@ -0,0 +1,30 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FooterHost.aspx.cs" Inherits="FooterHost" %> +<%@ Register TagPrefix="apress" TagName="Footer" Src="Footer.ascx" %> + + + + + + Footer Host + + + +
+
+

A Page With a Configurable Footer

+


+
+ + +
+ +

+ +
+
+ + +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter12/UserControls/FooterHost.aspx.cs b/Beginning ASP.NET 3.5/Chapter12/UserControls/FooterHost.aspx.cs new file mode 100644 index 0000000..213b7c4 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/UserControls/FooterHost.aspx.cs @@ -0,0 +1,30 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class FooterHost : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + if (optLong.Checked) + { + Footer1.Format = Footer.FooterFormat.LongDate; + } + else if (optShort.Checked) + { + Footer1.Format = Footer.FooterFormat.ShortTime; + } + else + { + // The default value in the Footer class will apply. + } + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter12/UserControls/LinkMenu.ascx b/Beginning ASP.NET 3.5/Chapter12/UserControls/LinkMenu.ascx new file mode 100644 index 0000000..201c146 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/UserControls/LinkMenu.ascx @@ -0,0 +1,16 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeFile="LinkMenu.ascx.cs" Inherits="LinkMenu" %> +
+ Products: + Books +
+ Toys +
+ Sports +
+ Furniture + +
diff --git a/Beginning ASP.NET 3.5/Chapter12/UserControls/LinkMenu.ascx.cs b/Beginning ASP.NET 3.5/Chapter12/UserControls/LinkMenu.ascx.cs new file mode 100644 index 0000000..065398f --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/UserControls/LinkMenu.ascx.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class LinkMenu : System.Web.UI.UserControl +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter12/UserControls/LinkMenu2.ascx b/Beginning ASP.NET 3.5/Chapter12/UserControls/LinkMenu2.ascx new file mode 100644 index 0000000..e3ef79b --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/UserControls/LinkMenu2.ascx @@ -0,0 +1,15 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeFile="LinkMenu2.ascx.cs" Inherits="LinkMenu2" %> +
+ Products: + Books +
+ Toys +
+ Sports +
+ Furniture + +
diff --git a/Beginning ASP.NET 3.5/Chapter12/UserControls/LinkMenu2.ascx.cs b/Beginning ASP.NET 3.5/Chapter12/UserControls/LinkMenu2.ascx.cs new file mode 100644 index 0000000..7fa2752 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/UserControls/LinkMenu2.ascx.cs @@ -0,0 +1,37 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class LinkMenu2 : System.Web.UI.UserControl +{ + public event LinkClickedEventHandler LinkClicked; + + protected void lnk_Command(object sender, CommandEventArgs e) + { + // One of the LinkButton controls has been clicked. + // Raise an event to the page. + if (LinkClicked != null) + { + // Pass along the link information. + LinkClickedEventArgs args = new LinkClickedEventArgs((string)e.CommandArgument); + LinkClicked(this, args); + + // Perform the redirect. + if (!args.Cancel) + { + // Notice we use the Url from the LinkClickedEventArgs + // object, not the original link. That means the web page + // can change the link if desired before the redirect. + Response.Redirect(args.Url); + } + } + } +} + diff --git a/Beginning ASP.NET 3.5/Chapter12/UserControls/Menu2Host.aspx b/Beginning ASP.NET 3.5/Chapter12/UserControls/Menu2Host.aspx new file mode 100644 index 0000000..478c367 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/UserControls/Menu2Host.aspx @@ -0,0 +1,31 @@ +<%@ Page Language="C#" AutoEventWireup="true" + CodeFile="Menu2Host.aspx.cs" Inherits="Menu2Host"%> +<%@ Register TagPrefix="apress" TagName="LinkMenu2" Src="LinkMenu2.ascx" %> + + + + + + Menu Host + + + +
+
+ + + + + +
+ + +   
+    +
+
+   +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter12/UserControls/Menu2Host.aspx.cs b/Beginning ASP.NET 3.5/Chapter12/UserControls/Menu2Host.aspx.cs new file mode 100644 index 0000000..2ea5b0a --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/UserControls/Menu2Host.aspx.cs @@ -0,0 +1,40 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class Menu2Host : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + if (Request.Params["product"] != null) + { + lblSelection.Text = "You chose: "; + lblSelection.Text += Request.Params["product"]; + } + } + } + + protected void LinkClicked(object sender, LinkClickedEventArgs e) + { + if (e.Url == "Menu2Host.aspx?product=Furniture") + { + lblClick.Text = "This link is not allowed."; + e.Cancel = true; + } + else + { + // Allow the redirect, and don't make any changes to the URL. + } + } + +} + diff --git a/Beginning ASP.NET 3.5/Chapter12/UserControls/MenuHost.aspx b/Beginning ASP.NET 3.5/Chapter12/UserControls/MenuHost.aspx new file mode 100644 index 0000000..13071d8 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/UserControls/MenuHost.aspx @@ -0,0 +1,28 @@ +<%@ Page Language="C#" AutoEventWireup="true" + CodeFile="MenuHost.aspx.cs" Inherits="MenuHost"%> +<%@ Register TagPrefix="apress" TagName="LinkMenu" Src="LinkMenu.ascx" %> + + + + + + Menu Host + + + +
+
+ + + + + +
+ + +    +
+
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter12/UserControls/MenuHost.aspx.cs b/Beginning ASP.NET 3.5/Chapter12/UserControls/MenuHost.aspx.cs new file mode 100644 index 0000000..d69d41d --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/UserControls/MenuHost.aspx.cs @@ -0,0 +1,23 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class MenuHost : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + if (Request.Params["product"] != null) + { + lblSelection.Text = "You chose: "; + lblSelection.Text += Request.Params["product"]; + } + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter12/UserControls/StyleSheet.css b/Beginning ASP.NET 3.5/Chapter12/UserControls/StyleSheet.css new file mode 100644 index 0000000..dca6735 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/UserControls/StyleSheet.css @@ -0,0 +1,11 @@ +body { + font-family: Verdana; + } + +div.Box +{ + padding: 5px; + border-width: 2px; + border-style: ridge; + background-color: Lime; +} diff --git a/Beginning ASP.NET 3.5/Chapter12/UserControls/Web.config b/Beginning ASP.NET 3.5/Chapter12/UserControls/Web.config new file mode 100644 index 0000000..b3b2e3e --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter12/UserControls/Web.config @@ -0,0 +1,113 @@ + + + + + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter13/MasterPages.sln b/Beginning ASP.NET 3.5/Chapter13/MasterPages.sln new file mode 100644 index 0000000..f440d8d --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/MasterPages.sln @@ -0,0 +1,35 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "MasterPages", "MasterPages\", "{B3B185BA-F168-47F2-B436-059BA9DFEE7E}" + ProjectSection(WebsiteProperties) = preProject + TargetFramework = "3.5" + Debug.AspNetCompiler.VirtualPath = "/MasterPages" + Debug.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 3.5\Chapter13\MasterPages\" + Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\MasterPages\" + Debug.AspNetCompiler.Updateable = "true" + Debug.AspNetCompiler.ForceOverwrite = "true" + Debug.AspNetCompiler.FixedNames = "false" + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.VirtualPath = "/MasterPages" + Release.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 3.5\Chapter13\MasterPages\" + Release.AspNetCompiler.TargetPath = "PrecompiledWeb\MasterPages\" + Release.AspNetCompiler.Updateable = "true" + Release.AspNetCompiler.ForceOverwrite = "true" + Release.AspNetCompiler.FixedNames = "false" + Release.AspNetCompiler.Debug = "False" + VWDPort = "64654" + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|.NET = Debug|.NET + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B3B185BA-F168-47F2-B436-059BA9DFEE7E}.Debug|.NET.ActiveCfg = Debug|.NET + {B3B185BA-F168-47F2-B436-059BA9DFEE7E}.Debug|.NET.Build.0 = Debug|.NET + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Beginning ASP.NET 3.5/Chapter13/MasterPages.suo b/Beginning ASP.NET 3.5/Chapter13/MasterPages.suo new file mode 100644 index 0000000..80cddca Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter13/MasterPages.suo differ diff --git a/Beginning ASP.NET 3.5/Chapter13/MasterPages/DefaultContent.master b/Beginning ASP.NET 3.5/Chapter13/MasterPages/DefaultContent.master new file mode 100644 index 0000000..17df248 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/MasterPages/DefaultContent.master @@ -0,0 +1,20 @@ +<%@ Master Language="C#" AutoEventWireup="true" CodeFile="DefaultContent.master.cs" Inherits="DefaultContent" %> + + + + + + Untitled Page + + +
+
+ Apress
+ + This is default content.
+
+ This is a simple footer. +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter13/MasterPages/DefaultContent.master.cs b/Beginning ASP.NET 3.5/Chapter13/MasterPages/DefaultContent.master.cs new file mode 100644 index 0000000..5bb1d3f --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/MasterPages/DefaultContent.master.cs @@ -0,0 +1,16 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class DefaultContent : System.Web.UI.MasterPage +{ + + +} diff --git a/Beginning ASP.NET 3.5/Chapter13/MasterPages/DefaultContentPage.aspx b/Beginning ASP.NET 3.5/Chapter13/MasterPages/DefaultContentPage.aspx new file mode 100644 index 0000000..a5764b8 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/MasterPages/DefaultContentPage.aspx @@ -0,0 +1,3 @@ +<%@ Page Language="C#" MasterPageFile="~/DefaultContent.master" AutoEventWireup="true" CodeFile="DefaultContentPage.aspx.cs" Inherits="DefaultContentPage_aspx" Title="Untitled Page" %> + + diff --git a/Beginning ASP.NET 3.5/Chapter13/MasterPages/DefaultContentPage.aspx.cs b/Beginning ASP.NET 3.5/Chapter13/MasterPages/DefaultContentPage.aspx.cs new file mode 100644 index 0000000..fe188a2 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/MasterPages/DefaultContentPage.aspx.cs @@ -0,0 +1,19 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class DefaultContentPage_aspx : System.Web.UI.Page +{ + + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter13/MasterPages/DynamicContentPage.aspx b/Beginning ASP.NET 3.5/Chapter13/MasterPages/DynamicContentPage.aspx new file mode 100644 index 0000000..43cca52 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/MasterPages/DynamicContentPage.aspx @@ -0,0 +1,3 @@ +<%@ Page Language="C#" MasterPageFile="~/SiteTemplate.master" AutoEventWireup="true" CodeFile="DynamicContentPage.aspx.cs" Inherits="DynamicContentPage_aspx" Title="Untitled Page" %> +Sample content + diff --git a/Beginning ASP.NET 3.5/Chapter13/MasterPages/DynamicContentPage.aspx.cs b/Beginning ASP.NET 3.5/Chapter13/MasterPages/DynamicContentPage.aspx.cs new file mode 100644 index 0000000..66ee9b2 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/MasterPages/DynamicContentPage.aspx.cs @@ -0,0 +1,23 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class DynamicContentPage_aspx : System.Web.UI.Page +{ + protected void Page_PreInit(object sender, EventArgs e) + { + this.MasterPageFile = "TableMaster.master"; + + } + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter13/MasterPages/MultipleContent.master b/Beginning ASP.NET 3.5/Chapter13/MasterPages/MultipleContent.master new file mode 100644 index 0000000..0ea74c5 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/MasterPages/MultipleContent.master @@ -0,0 +1,31 @@ +<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MultipleContent.master.cs" Inherits="MultipleContent" %> + + + + + + Untitled Page + + +
+
+ Apress

+ + + +
+ + OTHER LINKS
+
+ + +
+ This is a simple footer. +
+
+ + + diff --git a/Beginning ASP.NET 3.5/Chapter13/MasterPages/MultipleContent.master.cs b/Beginning ASP.NET 3.5/Chapter13/MasterPages/MultipleContent.master.cs new file mode 100644 index 0000000..f5f057f --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/MasterPages/MultipleContent.master.cs @@ -0,0 +1,19 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class MultipleContent : System.Web.UI.MasterPage +{ + protected void Page_Load(object sender, EventArgs e) + { + + } + +} diff --git a/Beginning ASP.NET 3.5/Chapter13/MasterPages/MultipleContentPage.aspx b/Beginning ASP.NET 3.5/Chapter13/MasterPages/MultipleContentPage.aspx new file mode 100644 index 0000000..e642c1d --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/MasterPages/MultipleContentPage.aspx @@ -0,0 +1,19 @@ +<%@ Page Language="C#" MasterPageFile="~/MultipleContent.master" AutoEventWireup="true" CodeFile="MultipleContentPage.aspx.cs" Inherits="MultipleContentPage_aspx" Title="Untitled Page" %> + + This is the generic content for this page. Here you might provide some site specific + text. This is the generic content for this page. Here you might provide some site + specific text. This is the generic content for this page. Here you might provide + some site specific text. This is the generic content for this page. Here you might + provide some site specific text.
+
+ This is the generic content for this page. Here you might provide some site specific + text. This is the generic content for this page. Here you might provide some site + specific text.This is the generic content for this page. Here you might provide + some site specific text.
+ + Here's a link. +
+ Here's a link.
+ Here's a link.
+ Here's a link.
+ diff --git a/Beginning ASP.NET 3.5/Chapter13/MasterPages/MultipleContentPage.aspx.cs b/Beginning ASP.NET 3.5/Chapter13/MasterPages/MultipleContentPage.aspx.cs new file mode 100644 index 0000000..14948e5 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/MasterPages/MultipleContentPage.aspx.cs @@ -0,0 +1,19 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class MultipleContentPage_aspx : System.Web.UI.Page +{ + + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter13/MasterPages/SimpleContentPage.aspx b/Beginning ASP.NET 3.5/Chapter13/MasterPages/SimpleContentPage.aspx new file mode 100644 index 0000000..1e6af0a --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/MasterPages/SimpleContentPage.aspx @@ -0,0 +1,6 @@ +<%@ Page Language="C#" MasterPageFile="~/SiteTemplate.master" AutoEventWireup="true" CodeFile="SimpleContentPage.aspx.cs" Inherits="SimpleContentPage_aspx" Title="Content Page" %> + +
+      Here's some new content!
+
+ diff --git a/Beginning ASP.NET 3.5/Chapter13/MasterPages/SimpleContentPage.aspx.cs b/Beginning ASP.NET 3.5/Chapter13/MasterPages/SimpleContentPage.aspx.cs new file mode 100644 index 0000000..9fd3914 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/MasterPages/SimpleContentPage.aspx.cs @@ -0,0 +1,19 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class SimpleContentPage_aspx : System.Web.UI.Page +{ + + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter13/MasterPages/SiteTemplate.master b/Beginning ASP.NET 3.5/Chapter13/MasterPages/SiteTemplate.master new file mode 100644 index 0000000..9b4d588 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/MasterPages/SiteTemplate.master @@ -0,0 +1,18 @@ +<%@ Master Language="C#" AutoEventWireup="true" CodeFile="SiteTemplate.master.cs" Inherits="SiteTemplate" %> + + + + + + Untitled Page + + +
+
+ Logo
+ + + This is a simple footer.
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter13/MasterPages/SiteTemplate.master.cs b/Beginning ASP.NET 3.5/Chapter13/MasterPages/SiteTemplate.master.cs new file mode 100644 index 0000000..f90767e --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/MasterPages/SiteTemplate.master.cs @@ -0,0 +1,19 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class SiteTemplate : System.Web.UI.MasterPage +{ + protected void Page_Load(object sender, EventArgs e) + { + + } + +} diff --git a/Beginning ASP.NET 3.5/Chapter13/MasterPages/TableContentPage.aspx b/Beginning ASP.NET 3.5/Chapter13/MasterPages/TableContentPage.aspx new file mode 100644 index 0000000..8f8ddcd --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/MasterPages/TableContentPage.aspx @@ -0,0 +1,8 @@ +<%@ Page Language="C#" MasterPageFile="~/TableMaster.master" AutoEventWireup="true" CodeFile="TableContentPage.aspx.cs" Inherits="TableContentPage_aspx" Title="Untitled Page" %> + + Your content goes in this cell.
+
+ + +
+ diff --git a/Beginning ASP.NET 3.5/Chapter13/MasterPages/TableContentPage.aspx.cs b/Beginning ASP.NET 3.5/Chapter13/MasterPages/TableContentPage.aspx.cs new file mode 100644 index 0000000..d9c62a7 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/MasterPages/TableContentPage.aspx.cs @@ -0,0 +1,27 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class TableContentPage_aspx : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + } + protected void cmdHide_Click(object sender, EventArgs e) + { + TableMaster master = (TableMaster)this.Master; + master.ShowNavigationControls = false; + } + protected void cmdShow_Click(object sender, EventArgs e) + { + TableMaster master = (TableMaster)this.Master; + master.ShowNavigationControls = true; + } +} diff --git a/Beginning ASP.NET 3.5/Chapter13/MasterPages/TableMaster.master b/Beginning ASP.NET 3.5/Chapter13/MasterPages/TableMaster.master new file mode 100644 index 0000000..e9048c7 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/MasterPages/TableMaster.master @@ -0,0 +1,41 @@ +<%@ Master Language="C#" AutoEventWireup="true" CodeFile="TableMaster.master.cs" Inherits="TableMaster" %> + + + + + + Untitled Page + + +
+ + + + + + + + + + + +
+

My Header

+
+ + + + + + + + + + + +
+ My Footer +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter13/MasterPages/TableMaster.master.cs b/Beginning ASP.NET 3.5/Chapter13/MasterPages/TableMaster.master.cs new file mode 100644 index 0000000..d8efe1c --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/MasterPages/TableMaster.master.cs @@ -0,0 +1,25 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class TableMaster : System.Web.UI.MasterPage +{ + protected void Page_Load(object sender, EventArgs e) + { + + } + + public bool ShowNavigationControls + { + set { Treeview1.Visible = value; } + get { return Treeview1.Visible; } + } + +} diff --git a/Beginning ASP.NET 3.5/Chapter13/MasterPages/Web.config b/Beginning ASP.NET 3.5/Chapter13/MasterPages/Web.config new file mode 100644 index 0000000..b3b2e3e --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/MasterPages/Web.config @@ -0,0 +1,113 @@ + + + + + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter13/MasterPages/apress.JPG b/Beginning ASP.NET 3.5/Chapter13/MasterPages/apress.JPG new file mode 100644 index 0000000..294e229 Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter13/MasterPages/apress.JPG differ diff --git a/Beginning ASP.NET 3.5/Chapter13/Themes.sln b/Beginning ASP.NET 3.5/Chapter13/Themes.sln new file mode 100644 index 0000000..f2b9d3a --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/Themes.sln @@ -0,0 +1,35 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Themes", "D:\Code\Beginning ASP.NET 3.5\Chapter13\Themes\", "{4EA83B59-8B97-40BE-832B-D3A03B4AD5BF}" + ProjectSection(WebsiteProperties) = preProject + TargetFramework = "3.5" + Debug.AspNetCompiler.VirtualPath = "/Themes" + Debug.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 3.5\Chapter13\Themes\" + Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\Themes\" + Debug.AspNetCompiler.Updateable = "true" + Debug.AspNetCompiler.ForceOverwrite = "true" + Debug.AspNetCompiler.FixedNames = "false" + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.VirtualPath = "/Themes" + Release.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 3.5\Chapter13\Themes\" + Release.AspNetCompiler.TargetPath = "PrecompiledWeb\Themes\" + Release.AspNetCompiler.Updateable = "true" + Release.AspNetCompiler.ForceOverwrite = "true" + Release.AspNetCompiler.FixedNames = "false" + Release.AspNetCompiler.Debug = "False" + VWDPort = "54707" + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|.NET = Debug|.NET + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4EA83B59-8B97-40BE-832B-D3A03B4AD5BF}.Debug|.NET.ActiveCfg = Debug|.NET + {4EA83B59-8B97-40BE-832B-D3A03B4AD5BF}.Debug|.NET.Build.0 = Debug|.NET + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Beginning ASP.NET 3.5/Chapter13/Themes.suo b/Beginning ASP.NET 3.5/Chapter13/Themes.suo new file mode 100644 index 0000000..c701037 Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter13/Themes.suo differ diff --git a/Beginning ASP.NET 3.5/Chapter13/Themes/App_Themes/FunkyTheme/ButtonImages/buttonCancel.jpg b/Beginning ASP.NET 3.5/Chapter13/Themes/App_Themes/FunkyTheme/ButtonImages/buttonCancel.jpg new file mode 100644 index 0000000..80453dc Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter13/Themes/App_Themes/FunkyTheme/ButtonImages/buttonCancel.jpg differ diff --git a/Beginning ASP.NET 3.5/Chapter13/Themes/App_Themes/FunkyTheme/ButtonImages/buttonOK.jpg b/Beginning ASP.NET 3.5/Chapter13/Themes/App_Themes/FunkyTheme/ButtonImages/buttonOK.jpg new file mode 100644 index 0000000..ce8ecbd Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter13/Themes/App_Themes/FunkyTheme/ButtonImages/buttonOK.jpg differ diff --git a/Beginning ASP.NET 3.5/Chapter13/Themes/App_Themes/FunkyTheme/Buttons.skin b/Beginning ASP.NET 3.5/Chapter13/Themes/App_Themes/FunkyTheme/Buttons.skin new file mode 100644 index 0000000..b1bc432 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/Themes/App_Themes/FunkyTheme/Buttons.skin @@ -0,0 +1,8 @@ + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter13/Themes/App_Themes/FunkyTheme/Calendar.skin b/Beginning ASP.NET 3.5/Chapter13/Themes/App_Themes/FunkyTheme/Calendar.skin new file mode 100644 index 0000000..379d40e --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/Themes/App_Themes/FunkyTheme/Calendar.skin @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/Beginning ASP.NET 3.5/Chapter13/Themes/App_Themes/FunkyTheme/FunkyTheme.skin b/Beginning ASP.NET 3.5/Chapter13/Themes/App_Themes/FunkyTheme/FunkyTheme.skin new file mode 100644 index 0000000..b06cb92 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/Themes/App_Themes/FunkyTheme/FunkyTheme.skin @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter13/Themes/App_Themes/FunkyTheme/StyleSheet.css b/Beginning ASP.NET 3.5/Chapter13/Themes/App_Themes/FunkyTheme/StyleSheet.css new file mode 100644 index 0000000..850d975 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/Themes/App_Themes/FunkyTheme/StyleSheet.css @@ -0,0 +1,12 @@ +body +{ + font-family: Verdana, Arial, Sans-Serif; + font-size: small; +} + +.heading1 +{ + font-weight: bold; + font-size: large; + color: orange; +} diff --git a/Beginning ASP.NET 3.5/Chapter13/Themes/App_Themes/ProTheme/ProTheme.skin b/Beginning ASP.NET 3.5/Chapter13/Themes/App_Themes/ProTheme/ProTheme.skin new file mode 100644 index 0000000..1602324 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/Themes/App_Themes/ProTheme/ProTheme.skin @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter13/Themes/CSSStyles.aspx b/Beginning ASP.NET 3.5/Chapter13/Themes/CSSStyles.aspx new file mode 100644 index 0000000..8cc695a --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/Themes/CSSStyles.aspx @@ -0,0 +1,28 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CSSStyles.aspx.cs" Inherits="CSSStyles" %> + + + + + + Untitled Page + + + +
+
+ +
+ This is sample unformatted text.
+  
+ +
+ Here's more unformatted text.
+
+  
+ This control uses the blockText style. This control uses the blockText style. This + control uses the blockText style. This control uses the blockText style. +
+
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter13/Themes/CSSStyles.aspx.cs b/Beginning ASP.NET 3.5/Chapter13/Themes/CSSStyles.aspx.cs new file mode 100644 index 0000000..e99b1d4 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/Themes/CSSStyles.aspx.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class CSSStyles : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter13/Themes/Calendar.aspx b/Beginning ASP.NET 3.5/Chapter13/Themes/Calendar.aspx new file mode 100644 index 0000000..82ea303 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/Themes/Calendar.aspx @@ -0,0 +1,16 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Calendar.aspx.cs" Inherits="Calendar" Theme="FunkyTheme" %> + + + + + + Untitled Page + + +
+
+ +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter13/Themes/Calendar.aspx.cs b/Beginning ASP.NET 3.5/Chapter13/Themes/Calendar.aspx.cs new file mode 100644 index 0000000..9e493bc --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/Themes/Calendar.aspx.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class Calendar : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter13/Themes/DynamicThemes.aspx b/Beginning ASP.NET 3.5/Chapter13/Themes/DynamicThemes.aspx new file mode 100644 index 0000000..ea6cbb5 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/Themes/DynamicThemes.aspx @@ -0,0 +1,19 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DynamicThemes.aspx.cs" Inherits="DynamicThemes" Theme="ProTheme" %> + + + + + + Untitled Page + + +
+
+
+
+ + +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter13/Themes/DynamicThemes.aspx.cs b/Beginning ASP.NET 3.5/Chapter13/Themes/DynamicThemes.aspx.cs new file mode 100644 index 0000000..b70a709 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/Themes/DynamicThemes.aspx.cs @@ -0,0 +1,61 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using System.IO; + +public partial class DynamicThemes : System.Web.UI.Page +{ + + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + // Fill the list box with available themes + // by reading the folders in the App_Themes folder. + DirectoryInfo themeDir = new DirectoryInfo(Server.MapPath("App_Themes")); + lstThemes.DataTextField = "Name"; + lstThemes.DataSource = themeDir.GetDirectories(); + lstThemes.DataBind(); + } + } + + protected void Page_PreInit(object sender, EventArgs e) + { + if (Session["Theme"] == null) + { + // No theme has been chosen. Choose a default + // (or set a blank string to make sure no theme + // is used). + Page.Theme = ""; + } + else + { + Page.Theme = (string)Session["Theme"]; + } + } + + protected void cmdApply_Click(object sender, EventArgs e) + { + // Set the chosen theme. + Session["Theme"] = lstThemes.SelectedValue; + + // Refresh the page. + Server.Transfer(Request.FilePath); + + } + protected void cmdClear_Click(object sender, EventArgs e) + { + // Set the chosen theme. + Session["Theme"] = ""; + + // Refresh the page. + Server.Transfer(Request.FilePath); + } +} diff --git a/Beginning ASP.NET 3.5/Chapter13/Themes/ImageInTheme.aspx b/Beginning ASP.NET 3.5/Chapter13/Themes/ImageInTheme.aspx new file mode 100644 index 0000000..663c001 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/Themes/ImageInTheme.aspx @@ -0,0 +1,17 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ImageInTheme.aspx.cs" Inherits="ImageInTheme" Theme="FunkyTheme" %> + + + + + + Untitled Page + + +
+
+ + +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter13/Themes/ImageInTheme.aspx.cs b/Beginning ASP.NET 3.5/Chapter13/Themes/ImageInTheme.aspx.cs new file mode 100644 index 0000000..3ea2cf4 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/Themes/ImageInTheme.aspx.cs @@ -0,0 +1,19 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class ImageInTheme : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } + +} diff --git a/Beginning ASP.NET 3.5/Chapter13/Themes/StyleSheet.css b/Beginning ASP.NET 3.5/Chapter13/Themes/StyleSheet.css new file mode 100644 index 0000000..40da053 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/Themes/StyleSheet.css @@ -0,0 +1,26 @@ +body +{ + font-family: Verdana, Arial, Sans-Serif; + font-size: small; +} + +.heading1 +{ + font-weight: bold; + font-size: large; + color: lime; +} +.heading2 +{ + font-weight: bold; + font-size: medium; + font-style: italic; + color: #C0BA72; +} +.blockText +{ + padding: 10px; + background-color: #FFFFD9; + border-style: solid; + border-width: thin; +} diff --git a/Beginning ASP.NET 3.5/Chapter13/Themes/Themes.aspx b/Beginning ASP.NET 3.5/Chapter13/Themes/Themes.aspx new file mode 100644 index 0000000..64b9b82 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/Themes/Themes.aspx @@ -0,0 +1,27 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Themes.aspx.cs" Inherits="Themes" StylesheetTheme="FunkyTheme" %> + + + + + + Untitled Page + + +
+
+ Test  
+
+ + Test + +
+
+
+ +
+
+ +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter13/Themes/Themes.aspx.cs b/Beginning ASP.NET 3.5/Chapter13/Themes/Themes.aspx.cs new file mode 100644 index 0000000..d68128a --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/Themes/Themes.aspx.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class Themes : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter13/Themes/ThemesWithCSS.aspx b/Beginning ASP.NET 3.5/Chapter13/Themes/ThemesWithCSS.aspx new file mode 100644 index 0000000..1d81833 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/Themes/ThemesWithCSS.aspx @@ -0,0 +1,25 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ThemesWithCSS.aspx.cs" Inherits="ThemesWithCSS" Theme="FunkyTheme" %> + + + + + + Untitled Page + + + +
+
+ +
+
+ Test  
+
+ + Test + +
+
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter13/Themes/ThemesWithCSS.aspx.cs b/Beginning ASP.NET 3.5/Chapter13/Themes/ThemesWithCSS.aspx.cs new file mode 100644 index 0000000..5344970 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/Themes/ThemesWithCSS.aspx.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class ThemesWithCSS : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter13/Themes/Web.config b/Beginning ASP.NET 3.5/Chapter13/Themes/Web.config new file mode 100644 index 0000000..b3b2e3e --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter13/Themes/Web.config @@ -0,0 +1,113 @@ + + + + + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap.sln b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap.sln new file mode 100644 index 0000000..117b706 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap.sln @@ -0,0 +1,35 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "MenuSiteMap", "MenuSiteMap\", "{77A6C9A3-071F-4E3B-9156-46B87B120D45}" + ProjectSection(WebsiteProperties) = preProject + TargetFramework = "3.5" + Debug.AspNetCompiler.VirtualPath = "/MenuSiteMap" + Debug.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 3.5\Chapter14\MenuSiteMap\" + Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\MenuSiteMap\" + Debug.AspNetCompiler.Updateable = "true" + Debug.AspNetCompiler.ForceOverwrite = "true" + Debug.AspNetCompiler.FixedNames = "false" + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.VirtualPath = "/MenuSiteMap" + Release.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 3.5\Chapter14\MenuSiteMap\" + Release.AspNetCompiler.TargetPath = "PrecompiledWeb\MenuSiteMap\" + Release.AspNetCompiler.Updateable = "true" + Release.AspNetCompiler.ForceOverwrite = "true" + Release.AspNetCompiler.FixedNames = "false" + Release.AspNetCompiler.Debug = "False" + VWDPort = "55454" + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|.NET = Debug|.NET + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {77A6C9A3-071F-4E3B-9156-46B87B120D45}.Debug|.NET.ActiveCfg = Debug|.NET + {77A6C9A3-071F-4E3B-9156-46B87B120D45}.Debug|.NET.Build.0 = Debug|.NET + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap.suo b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap.suo new file mode 100644 index 0000000..215aaba Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap.suo differ diff --git a/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/MasterPage.master b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/MasterPage.master new file mode 100644 index 0000000..96baa87 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/MasterPage.master @@ -0,0 +1,48 @@ +<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %> + + + + + + Navigation Test + + + +
+ + + + + +
+ + + + + + + + + + + + <%# Eval("Text") %>
+ + <%# GetDescriptionFromTitle(((MenuItem)Container.DataItem).Text) %> + +
+ + <%# Eval("Text") %>
+ + <%# GetDescriptionFromTitle(((MenuItem)Container.DataItem).Text) %> + +
+
+
+ +
+ + + + \ No newline at end of file diff --git a/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/MasterPage.master.cs b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/MasterPage.master.cs new file mode 100644 index 0000000..6560318 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/MasterPage.master.cs @@ -0,0 +1,55 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class MasterPage : System.Web.UI.MasterPage +{ + protected void Page_Load(object sender, EventArgs e) + { + } + + protected string GetDescriptionFromTitle(string title) + { + // This assumes there's only one node with this title. + SiteMapNode startingNode = SiteMap.RootNode; + SiteMapNode matchNode = SearchNodes(startingNode, title); + if (matchNode == null) + { + return null; + } + else + { + return matchNode.Description; + } + } + + private SiteMapNode SearchNodes(SiteMapNode node, string title) + { + if (node.Title == title) + { + return node; + } + else + { + // Perform recursive search. + foreach (SiteMapNode child in node.ChildNodes) + { + SiteMapNode matchNode = SearchNodes(child, title); + // Was a match found? + // If so, return it. + if (matchNode != null) return matchNode; + } + // All the nodes were examined, but no match was found. + return null; + } + } + + +} diff --git a/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/StyleSheet.css b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/StyleSheet.css new file mode 100644 index 0000000..1411f55 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/StyleSheet.css @@ -0,0 +1,12 @@ +body { + font-family: Verdana; + font-size: 83%; +} + +div.Box +{ + padding: 5px; + border-width: 2px; + border-style: ridge; + background-color: Lime; +} diff --git a/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/Web.config b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/Web.config new file mode 100644 index 0000000..b3b2e3e --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/Web.config @@ -0,0 +1,113 @@ + + + + + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/Web.sitemap b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/Web.sitemap new file mode 100644 index 0000000..0430eee --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/Web.sitemap @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/aboutus.aspx b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/aboutus.aspx new file mode 100644 index 0000000..b5c1459 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/aboutus.aspx @@ -0,0 +1,5 @@ +<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="aboutus.aspx.cs" Inherits="aboutus" Title="Untitled Page" %> + + About Us + + diff --git a/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/aboutus.aspx.cs b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/aboutus.aspx.cs new file mode 100644 index 0000000..809706c --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/aboutus.aspx.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class aboutus : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/arrowright.gif b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/arrowright.gif new file mode 100644 index 0000000..6c19eb4 Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/arrowright.gif differ diff --git a/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/default.aspx b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/default.aspx new file mode 100644 index 0000000..bcf976e --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/default.aspx @@ -0,0 +1,11 @@ +<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="_default" Title="Untitled Page" %> + +
+
+
+
+ You are currently on the default.aspx page (home). +
+ + diff --git a/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/default.aspx.cs b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/default.aspx.cs new file mode 100644 index 0000000..87b8c45 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/default.aspx.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class _default : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/financial.aspx b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/financial.aspx new file mode 100644 index 0000000..b60ef60 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/financial.aspx @@ -0,0 +1,5 @@ +<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="financial.aspx.cs" Inherits="financial" Title="Untitled Page" %> + + Investing + + diff --git a/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/financial.aspx.cs b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/financial.aspx.cs new file mode 100644 index 0000000..901320c --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/financial.aspx.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class financial : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/product1.aspx b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/product1.aspx new file mode 100644 index 0000000..98422bd --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/product1.aspx @@ -0,0 +1,11 @@ +<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="product1.aspx.cs" Inherits="product1" Title="Untitled Page" %> + +
+
+ You are currently on the product1.aspx page (RevoStock).
+
+ Next +
+ + diff --git a/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/product1.aspx.cs b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/product1.aspx.cs new file mode 100644 index 0000000..702fe79 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/product1.aspx.cs @@ -0,0 +1,26 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class product1 : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + if (SiteMap.CurrentNode.NextSibling != null) + { + lnkNext.NavigateUrl = SiteMap.CurrentNode.NextSibling.Url; + lnkNext.Visible = true; + } + else + { + lnkNext.Visible = false; + } + } +} diff --git a/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/product2.aspx b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/product2.aspx new file mode 100644 index 0000000..9165ad6 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/product2.aspx @@ -0,0 +1,6 @@ +<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="product2.aspx.cs" Inherits="product2" Title="Untitled Page" %> + +
+ You are currently on the product2.aspx page (RevoAnalyze).
+
+ diff --git a/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/product2.aspx.cs b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/product2.aspx.cs new file mode 100644 index 0000000..37d790a --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/product2.aspx.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class product2 : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/products.aspx b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/products.aspx new file mode 100644 index 0000000..8e62e19 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/products.aspx @@ -0,0 +1,8 @@ +<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="products.aspx.cs" Inherits="products" Title="Untitled Page" %> + +
+
+ You are currently on the products.aspx page (Products). +
+ diff --git a/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/products.aspx.cs b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/products.aspx.cs new file mode 100644 index 0000000..dd889d6 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/MenuSiteMap/products.aspx.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class products : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps.sln b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps.sln new file mode 100644 index 0000000..08d4b87 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps.sln @@ -0,0 +1,35 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "PartialSiteMaps", "PartialSiteMaps\", "{00413EFF-3CEA-4175-8C4C-4DD3841FABD5}" + ProjectSection(WebsiteProperties) = preProject + TargetFramework = "3.5" + Debug.AspNetCompiler.VirtualPath = "/PartialSiteMaps" + Debug.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 3.5\Chapter14\PartialSiteMaps\" + Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\PartialSiteMaps\" + Debug.AspNetCompiler.Updateable = "true" + Debug.AspNetCompiler.ForceOverwrite = "true" + Debug.AspNetCompiler.FixedNames = "false" + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.VirtualPath = "/PartialSiteMaps" + Release.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 3.5\Chapter14\PartialSiteMaps\" + Release.AspNetCompiler.TargetPath = "PrecompiledWeb\PartialSiteMaps\" + Release.AspNetCompiler.Updateable = "true" + Release.AspNetCompiler.ForceOverwrite = "true" + Release.AspNetCompiler.FixedNames = "false" + Release.AspNetCompiler.Debug = "False" + VWDPort = "55585" + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|.NET = Debug|.NET + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {00413EFF-3CEA-4175-8C4C-4DD3841FABD5}.Debug|.NET.ActiveCfg = Debug|.NET + {00413EFF-3CEA-4175-8C4C-4DD3841FABD5}.Debug|.NET.Build.0 = Debug|.NET + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps.suo b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps.suo new file mode 100644 index 0000000..9aceeb8 Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps.suo differ diff --git a/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/MasterPage.master b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/MasterPage.master new file mode 100644 index 0000000..a6b052e --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/MasterPage.master @@ -0,0 +1,36 @@ +<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %> + + + + + + Navigation Test + + + +
+ + + + + +
+ Home
+
+ Pages under the current page:
+ +
+ The Information group of pages:
+ +
+ +
+ + + + + \ No newline at end of file diff --git a/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/MasterPage.master.cs b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/MasterPage.master.cs new file mode 100644 index 0000000..f915754 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/MasterPage.master.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class MasterPage : System.Web.UI.MasterPage +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/StyleSheet.css b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/StyleSheet.css new file mode 100644 index 0000000..2b2dc92 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/StyleSheet.css @@ -0,0 +1,11 @@ +body { + font-family: Verdana; +} + +div.Box +{ + padding: 5px; + border-width: 2px; + border-style: ridge; + background-color: Lime; +} diff --git a/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/Web.Config b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/Web.Config new file mode 100644 index 0000000..69fe771 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/Web.Config @@ -0,0 +1,86 @@ + + + + + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/Web.sitemap b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/Web.sitemap new file mode 100644 index 0000000..843b796 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/Web.sitemap @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/aboutus.aspx b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/aboutus.aspx new file mode 100644 index 0000000..b5c1459 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/aboutus.aspx @@ -0,0 +1,5 @@ +<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="aboutus.aspx.cs" Inherits="aboutus" Title="Untitled Page" %> + + About Us + + diff --git a/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/aboutus.aspx.cs b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/aboutus.aspx.cs new file mode 100644 index 0000000..809706c --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/aboutus.aspx.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class aboutus : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/arrowright.gif b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/arrowright.gif new file mode 100644 index 0000000..6c19eb4 Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/arrowright.gif differ diff --git a/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/default.aspx b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/default.aspx new file mode 100644 index 0000000..0085acf --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/default.aspx @@ -0,0 +1,9 @@ +<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="_default" Title="Untitled Page" %> + +
+
+ You are currently on the default.aspx page (home). +
+ + diff --git a/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/default.aspx.cs b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/default.aspx.cs new file mode 100644 index 0000000..87b8c45 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/default.aspx.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class _default : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/financial.aspx b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/financial.aspx new file mode 100644 index 0000000..b60ef60 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/financial.aspx @@ -0,0 +1,5 @@ +<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="financial.aspx.cs" Inherits="financial" Title="Untitled Page" %> + + Investing + + diff --git a/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/financial.aspx.cs b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/financial.aspx.cs new file mode 100644 index 0000000..901320c --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/financial.aspx.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class financial : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/information.aspx b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/information.aspx new file mode 100644 index 0000000..b2944a2 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/information.aspx @@ -0,0 +1,8 @@ +<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="information.aspx.cs" Inherits="information" Title="Untitled Page" %> + +
+
+ You are currently on the information.aspx page. +
+ diff --git a/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/information.aspx.cs b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/information.aspx.cs new file mode 100644 index 0000000..c25e28e --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/information.aspx.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class information : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/product1.aspx b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/product1.aspx new file mode 100644 index 0000000..572bda9 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/product1.aspx @@ -0,0 +1,9 @@ +<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="product1.aspx.cs" Inherits="product1" Title="Untitled Page" %> + +
+
+ You are currently on the product1.aspx page (RevoStock). +
+ + diff --git a/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/product1.aspx.cs b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/product1.aspx.cs new file mode 100644 index 0000000..850d8d1 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/product1.aspx.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class product1 : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/product2.aspx b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/product2.aspx new file mode 100644 index 0000000..93da425 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/product2.aspx @@ -0,0 +1,4 @@ +<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="product2.aspx.cs" Inherits="product2" Title="Untitled Page" %> + + + diff --git a/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/product2.aspx.cs b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/product2.aspx.cs new file mode 100644 index 0000000..37d790a --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/product2.aspx.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class product2 : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/products.aspx b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/products.aspx new file mode 100644 index 0000000..8e62e19 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/products.aspx @@ -0,0 +1,8 @@ +<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="products.aspx.cs" Inherits="products" Title="Untitled Page" %> + +
+
+ You are currently on the products.aspx page (Products). +
+ diff --git a/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/products.aspx.cs b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/products.aspx.cs new file mode 100644 index 0000000..dd889d6 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/PartialSiteMaps/products.aspx.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class products : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap.sln b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap.sln new file mode 100644 index 0000000..c8eab2f --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap.sln @@ -0,0 +1,35 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "SimpleSiteMap", "SimpleSiteMap\", "{8058E58D-EE49-408D-858F-B5819AB61790}" + ProjectSection(WebsiteProperties) = preProject + TargetFramework = "3.5" + Debug.AspNetCompiler.VirtualPath = "/SimpleSiteMap" + Debug.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 3.5\Chapter14\SimpleSiteMap\" + Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\SimpleSiteMap\" + Debug.AspNetCompiler.Updateable = "true" + Debug.AspNetCompiler.ForceOverwrite = "true" + Debug.AspNetCompiler.FixedNames = "false" + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.VirtualPath = "/SimpleSiteMap" + Release.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 3.5\Chapter14\SimpleSiteMap\" + Release.AspNetCompiler.TargetPath = "PrecompiledWeb\SimpleSiteMap\" + Release.AspNetCompiler.Updateable = "true" + Release.AspNetCompiler.ForceOverwrite = "true" + Release.AspNetCompiler.FixedNames = "false" + Release.AspNetCompiler.Debug = "False" + VWDPort = "55519" + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|.NET = Debug|.NET + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8058E58D-EE49-408D-858F-B5819AB61790}.Debug|.NET.ActiveCfg = Debug|.NET + {8058E58D-EE49-408D-858F-B5819AB61790}.Debug|.NET.Build.0 = Debug|.NET + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap.suo b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap.suo new file mode 100644 index 0000000..2148a5b Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap.suo differ diff --git a/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/MasterPage.master b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/MasterPage.master new file mode 100644 index 0000000..2a052ea --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/MasterPage.master @@ -0,0 +1,46 @@ +<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %> + + + + + + Navigation Test + + + +
+ + + + + +
+ + + + + + Root + + + <%# Eval("title") %>
 <%# Eval("description") %> +
+
+
+ + + + + + + + +
+ +
+ + + + \ No newline at end of file diff --git a/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/MasterPage.master.cs b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/MasterPage.master.cs new file mode 100644 index 0000000..f915754 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/MasterPage.master.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class MasterPage : System.Web.UI.MasterPage +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/StyleSheet.css b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/StyleSheet.css new file mode 100644 index 0000000..1411f55 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/StyleSheet.css @@ -0,0 +1,12 @@ +body { + font-family: Verdana; + font-size: 83%; +} + +div.Box +{ + padding: 5px; + border-width: 2px; + border-style: ridge; + background-color: Lime; +} diff --git a/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/Web.config b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/Web.config new file mode 100644 index 0000000..b3b2e3e --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/Web.config @@ -0,0 +1,113 @@ + + + + + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/Web.sitemap b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/Web.sitemap new file mode 100644 index 0000000..0430eee --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/Web.sitemap @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/aboutus.aspx b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/aboutus.aspx new file mode 100644 index 0000000..b5c1459 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/aboutus.aspx @@ -0,0 +1,5 @@ +<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="aboutus.aspx.cs" Inherits="aboutus" Title="Untitled Page" %> + + About Us + + diff --git a/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/aboutus.aspx.cs b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/aboutus.aspx.cs new file mode 100644 index 0000000..809706c --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/aboutus.aspx.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class aboutus : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/arrowright.gif b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/arrowright.gif new file mode 100644 index 0000000..6c19eb4 Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/arrowright.gif differ diff --git a/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/default.aspx b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/default.aspx new file mode 100644 index 0000000..0085acf --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/default.aspx @@ -0,0 +1,9 @@ +<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="_default" Title="Untitled Page" %> + +
+
+ You are currently on the default.aspx page (home). +
+ + diff --git a/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/default.aspx.cs b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/default.aspx.cs new file mode 100644 index 0000000..87b8c45 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/default.aspx.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class _default : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/financial.aspx b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/financial.aspx new file mode 100644 index 0000000..b60ef60 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/financial.aspx @@ -0,0 +1,5 @@ +<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="financial.aspx.cs" Inherits="financial" Title="Untitled Page" %> + + Investing + + diff --git a/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/financial.aspx.cs b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/financial.aspx.cs new file mode 100644 index 0000000..901320c --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/financial.aspx.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class financial : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/product1.aspx b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/product1.aspx new file mode 100644 index 0000000..98422bd --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/product1.aspx @@ -0,0 +1,11 @@ +<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="product1.aspx.cs" Inherits="product1" Title="Untitled Page" %> + +
+
+ You are currently on the product1.aspx page (RevoStock).
+
+ Next +
+ + diff --git a/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/product1.aspx.cs b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/product1.aspx.cs new file mode 100644 index 0000000..702fe79 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/product1.aspx.cs @@ -0,0 +1,26 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class product1 : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + if (SiteMap.CurrentNode.NextSibling != null) + { + lnkNext.NavigateUrl = SiteMap.CurrentNode.NextSibling.Url; + lnkNext.Visible = true; + } + else + { + lnkNext.Visible = false; + } + } +} diff --git a/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/product2.aspx b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/product2.aspx new file mode 100644 index 0000000..9165ad6 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/product2.aspx @@ -0,0 +1,6 @@ +<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="product2.aspx.cs" Inherits="product2" Title="Untitled Page" %> + +
+ You are currently on the product2.aspx page (RevoAnalyze).
+
+ diff --git a/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/product2.aspx.cs b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/product2.aspx.cs new file mode 100644 index 0000000..37d790a --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/product2.aspx.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class product2 : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/products.aspx b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/products.aspx new file mode 100644 index 0000000..8e62e19 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/products.aspx @@ -0,0 +1,8 @@ +<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="products.aspx.cs" Inherits="products" Title="Untitled Page" %> + +
+
+ You are currently on the products.aspx page (Products). +
+ diff --git a/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/products.aspx.cs b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/products.aspx.cs new file mode 100644 index 0000000..dd889d6 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter14/SimpleSiteMap/products.aspx.cs @@ -0,0 +1,18 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class products : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter15/ADO.NET.sln b/Beginning ASP.NET 3.5/Chapter15/ADO.NET.sln new file mode 100644 index 0000000..2210248 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter15/ADO.NET.sln @@ -0,0 +1,35 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio Codename Orcas +Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "ADO.NET", "ADO.NET\", "{C18347BE-FCE9-4786-8211-5163C081E5F7}" + ProjectSection(WebsiteProperties) = preProject + TargetFramework = "3.5" + Debug.AspNetCompiler.VirtualPath = "/ADO.NET" + Debug.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 2.0\Chapter13\ADO.NET\" + Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\ADO.NET\" + Debug.AspNetCompiler.Updateable = "true" + Debug.AspNetCompiler.ForceOverwrite = "true" + Debug.AspNetCompiler.FixedNames = "false" + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.VirtualPath = "/ADO.NET" + Release.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 2.0\Chapter13\ADO.NET\" + Release.AspNetCompiler.TargetPath = "PrecompiledWeb\ADO.NET\" + Release.AspNetCompiler.Updateable = "true" + Release.AspNetCompiler.ForceOverwrite = "true" + Release.AspNetCompiler.FixedNames = "false" + Release.AspNetCompiler.Debug = "False" + VWDPort = "54435" + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|.NET = Debug|.NET + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C18347BE-FCE9-4786-8211-5163C081E5F7}.Debug|.NET.ActiveCfg = Debug|.NET + {C18347BE-FCE9-4786-8211-5163C081E5F7}.Debug|.NET.Build.0 = Debug|.NET + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Beginning ASP.NET 3.5/Chapter15/ADO.NET.suo b/Beginning ASP.NET 3.5/Chapter15/ADO.NET.suo new file mode 100644 index 0000000..0b91eb5 Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter15/ADO.NET.suo differ diff --git a/Beginning ASP.NET 3.5/Chapter15/ADO.NET/AuthorBrowser.aspx b/Beginning ASP.NET 3.5/Chapter15/ADO.NET/AuthorBrowser.aspx new file mode 100644 index 0000000..75da63a --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter15/ADO.NET/AuthorBrowser.aspx @@ -0,0 +1,25 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AuthorBrowser.aspx.cs" Inherits="AuthorBrowser" %> + + + + + + Untitled Page + + + +
+
+ Select Author:  + + +
+
+
+ + +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter15/ADO.NET/AuthorBrowser.aspx.cs b/Beginning ASP.NET 3.5/Chapter15/ADO.NET/AuthorBrowser.aspx.cs new file mode 100644 index 0000000..9f564a4 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter15/ADO.NET/AuthorBrowser.aspx.cs @@ -0,0 +1,124 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using System.Web.Configuration; +using System.Data.SqlClient; +using System.Text; + +public partial class AuthorBrowser : System.Web.UI.Page +{ + private string connectionString = + WebConfigurationManager.ConnectionStrings["Pubs"].ConnectionString; + + + protected void Page_Load(object sender, EventArgs e) + { + if (!this.IsPostBack) + { + FillAuthorList(); + } + } + + private void FillAuthorList() + { + lstAuthor.Items.Clear(); + + // Define the Select statement. + // Three pieces of information are needed: the unique id, + // and the first and last name. + string selectSQL = "SELECT au_lname, au_fname, au_id FROM Authors"; + + // Define the ADO.NET objects. + SqlConnection con = new SqlConnection(connectionString); + SqlCommand cmd = new SqlCommand(selectSQL, con); + SqlDataReader reader; + + // Try to open database and read information. + try + { + con.Open(); + reader = cmd.ExecuteReader(); + + // For each item, add the author name to the displayed + // list box text, and store the unique ID in the Value property. + while (reader.Read()) + { + ListItem newItem = new ListItem(); + newItem.Text = reader["au_lname"] + ", " + reader["au_fname"]; + newItem.Value = reader["au_id"].ToString(); + lstAuthor.Items.Add(newItem); + } + reader.Close(); + } + catch (Exception err) + { + lblResults.Text = "Error reading list of names. "; + lblResults.Text += err.Message; + } + finally + { + con.Close(); + } + } + + protected void lstAuthor_SelectedIndexChanged(object sender, EventArgs e) + { + // Create a Select statement that searches for a record + // matching the specific author id from the Value property. + string selectSQL; + selectSQL = "SELECT * FROM Authors "; + selectSQL += "WHERE au_id='" + lstAuthor.SelectedItem.Value + "'"; + + // Define the ADO.NET objects. + SqlConnection con = new SqlConnection(connectionString); + SqlCommand cmd = new SqlCommand(selectSQL, con); + SqlDataReader reader; + + // Try to open database and read information. + try + { + con.Open(); + reader = cmd.ExecuteReader(); + reader.Read(); + + StringBuilder sb = new StringBuilder(); + sb.Append(""); + sb.Append(reader["au_lname"]); + sb.Append(", "); + sb.Append(reader["au_fname"]); + sb.Append("
"); + sb.Append("Phone: "); + sb.Append(reader["phone"]); + sb.Append("
"); + sb.Append("Address: "); + sb.Append(reader["address"]); + sb.Append("
"); + sb.Append("City: "); + sb.Append(reader["city"]); + sb.Append("
"); + sb.Append("State: "); + sb.Append(reader["state"]); + sb.Append("
"); + lblResults.Text = sb.ToString(); + + reader.Close(); + } + catch (Exception err) + { + lblResults.Text = "Error getting author. "; + lblResults.Text += err.Message; + } + finally + { + con.Close(); + } + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter15/ADO.NET/AuthorManager.aspx b/Beginning ASP.NET 3.5/Chapter15/ADO.NET/AuthorManager.aspx new file mode 100644 index 0000000..01826ed --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter15/ADO.NET/AuthorManager.aspx @@ -0,0 +1,63 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AuthorManager.aspx.cs" Inherits="AuthorManager" %> + + + + + + Untitled Page + + + +
+
+
+
+ Select Author: +     +   + +
+ Or: +   + +
+
+
+ + Unique ID: +   + (required: ###-##-#### form)
+ + First Name: +
+ + Last Name: +
+ + Phone: +
+ + Address: +
+ + City: +
+ + State: +
+ + Zip Code: +   + (required: any five digits)
+
+ + Contract:  +
+
+ + +
+
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter15/ADO.NET/AuthorManager.aspx.cs b/Beginning ASP.NET 3.5/Chapter15/ADO.NET/AuthorManager.aspx.cs new file mode 100644 index 0000000..57c85ef --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter15/ADO.NET/AuthorManager.aspx.cs @@ -0,0 +1,269 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using System.Web.Configuration; +using System.Data.SqlClient; + +public partial class AuthorManager : System.Web.UI.Page +{ + private string connectionString = + WebConfigurationManager.ConnectionStrings["Pubs"].ConnectionString; + + + protected void Page_Load(object sender, EventArgs e) + { + if (!this.IsPostBack) + { + FillAuthorList(); + } + } + + private void FillAuthorList() + { + lstAuthor.Items.Clear(); + + // Define the Select statement. + // Three pieces of information are needed: the unique id, + // and the first and last name. + string selectSQL = "SELECT au_lname, au_fname, au_id FROM Authors"; + + // Define the ADO.NET objects. + SqlConnection con = new SqlConnection(connectionString); + SqlCommand cmd = new SqlCommand(selectSQL, con); + SqlDataReader reader; + + // Try to open database and read information. + try + { + con.Open(); + reader = cmd.ExecuteReader(); + + // For each item, add the author name to the displayed + // list box text, and store the unique ID in the Value property. + while (reader.Read()) + { + ListItem newItem = new ListItem(); + newItem.Text = reader["au_lname"] + ", " + reader["au_fname"]; + newItem.Value = reader["au_id"].ToString(); + lstAuthor.Items.Add(newItem); + } + reader.Close(); + } + catch (Exception err) + { + lblResults.Text = "Error reading list of names. "; + lblResults.Text += err.Message; + } + finally + { + con.Close(); + } + } + + protected void lstAuthor_SelectedIndexChanged(object sender, EventArgs e) + { + // Define ADO.NET objects. + string selectSQL; + selectSQL = "SELECT * FROM Authors "; + selectSQL += "WHERE au_id='" + lstAuthor.SelectedItem.Value + "'"; + SqlConnection con = new SqlConnection(connectionString); + SqlCommand cmd = new SqlCommand(selectSQL, con); + SqlDataReader reader; + + // Try to open database and read information. + try + { + con.Open(); + reader = cmd.ExecuteReader(); + reader.Read(); + + // Fill the controls. + txtID.Text = reader["au_id"].ToString(); + txtFirstName.Text = reader["au_fname"].ToString(); + txtLastName.Text = reader["au_lname"].ToString(); + txtPhone.Text = reader["phone"].ToString(); + txtAddress.Text = reader["address"].ToString(); + txtCity.Text = reader["city"].ToString(); + txtState.Text = reader["state"].ToString(); + txtZip.Text = reader["zip"].ToString(); + chkContract.Checked = (bool)reader["contract"]; + reader.Close(); + lblResults.Text = ""; + } + catch (Exception err) + { + lblResults.Text = "Error getting author. "; + lblResults.Text += err.Message; + } + finally + { + con.Close(); + } + + } + protected void cmdNew_Click(object sender, EventArgs e) + { + txtID.Text = ""; + txtFirstName.Text = ""; + txtLastName.Text = ""; + txtPhone.Text = ""; + txtAddress.Text = ""; + txtCity.Text = ""; + txtState.Text = ""; + txtZip.Text = ""; + chkContract.Checked = false; + + lblResults.Text = "Click Insert New to add the completed record."; + + + } + protected void cmdInsert_Click(object sender, EventArgs e) + { + // Perform user-defined checks. + if (txtID.Text == "" || txtFirstName.Text == "" || txtLastName.Text == "") + { + lblResults.Text = "Records require an ID, first name, and last name."; + return; + } + + // Define ADO.NET objects. + string insertSQL; + insertSQL = "INSERT INTO Authors ("; + insertSQL += "au_id, au_fname, au_lname, "; + insertSQL += "phone, address, city, state, zip, contract) "; + insertSQL += "VALUES ("; + insertSQL += "@au_id, @au_fname, @au_lname, "; + insertSQL += "@phone, @address, @city, @state, @zip, @contract)"; + + SqlConnection con = new SqlConnection(connectionString); + SqlCommand cmd = new SqlCommand(insertSQL, con); + + // Add the parameters. + cmd.Parameters.AddWithValue("@au_id", txtID.Text); + cmd.Parameters.AddWithValue("@au_fname", txtFirstName.Text); + cmd.Parameters.AddWithValue("@au_Lname", txtLastName.Text); + cmd.Parameters.AddWithValue("@phone", txtPhone.Text); + cmd.Parameters.AddWithValue("@address", txtAddress.Text); + cmd.Parameters.AddWithValue("@city", txtCity.Text); + cmd.Parameters.AddWithValue("@state", txtState.Text); + cmd.Parameters.AddWithValue("@zip", txtZip.Text); + cmd.Parameters.AddWithValue("@contract", Convert.ToInt16(chkContract.Checked)); + + // Try to open the database and execute the update. + int added = 0; + try + { + con.Open(); + added = cmd.ExecuteNonQuery(); + lblResults.Text = added.ToString() + " record inserted."; + } + catch (Exception err) + { + lblResults.Text = "Error inserting record. "; + lblResults.Text += err.Message; + } + finally + { + con.Close(); + } + + // If the insert succeeded, refresh the author list. + if (added > 0) + { + FillAuthorList(); + } + } + + protected void cmdUpdate_Click(object sender, EventArgs e) + { + // Define ADO.NET objects. + string updateSQL; + updateSQL = "UPDATE Authors SET "; + updateSQL += "au_fname=@au_fname, au_lname=@au_lname, "; + updateSQL += "phone=@phone, address=@address, city=@city, state=@state, "; + updateSQL += "zip=@zip, contract=@contract "; + updateSQL += "WHERE au_id=@au_id_original"; + + SqlConnection con = new SqlConnection(connectionString); + SqlCommand cmd = new SqlCommand(updateSQL, con); + + // Add the parameters. + cmd.Parameters.AddWithValue("@au_fname", txtFirstName.Text); + cmd.Parameters.AddWithValue("@au_Lname", txtLastName.Text); + cmd.Parameters.AddWithValue("@phone", txtPhone.Text); + cmd.Parameters.AddWithValue("@address", txtAddress.Text); + cmd.Parameters.AddWithValue("@city", txtCity.Text); + cmd.Parameters.AddWithValue("@state", txtState.Text); + cmd.Parameters.AddWithValue("@zip", txtZip.Text); + cmd.Parameters.AddWithValue("@contract", Convert.ToInt16(chkContract.Checked)); + cmd.Parameters.AddWithValue("@au_id_original", lstAuthor.SelectedItem.Value); + + // Try to open database and execute the update. + int updated = 0; + try + { + con.Open(); + updated = cmd.ExecuteNonQuery(); + lblResults.Text = updated.ToString() + " record updated."; + } + catch (Exception err) + { + lblResults.Text = "Error updating author. "; + lblResults.Text += err.Message; + } + finally + { + con.Close(); + } + + // If the updated succeeded, refresh the author list. + if (updated > 0) + { + FillAuthorList(); + } + + } + protected void cmdDelete_Click(object sender, EventArgs e) + { + // Define ADO.NET objects. + string deleteSQL; + deleteSQL = "DELETE FROM Authors "; + deleteSQL += "WHERE au_id=@au_id"; + + SqlConnection con = new SqlConnection(connectionString); + SqlCommand cmd = new SqlCommand(deleteSQL, con); + cmd.Parameters.AddWithValue("@au_id ", lstAuthor.SelectedItem.Value); + + // Try to open the database and delete the record. + int deleted = 0; + try + { + con.Open(); + deleted = cmd.ExecuteNonQuery(); + lblResults.Text = "Record deleted."; + } + catch (Exception err) + { + lblResults.Text = "Error deleting author. "; + lblResults.Text += err.Message; + } + finally + { + con.Close(); + } + + // If the delete succeeded, refresh the author list. + if (deleted > 0) + { + FillAuthorList(); + } + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter15/ADO.NET/ConnectionTester.aspx b/Beginning ASP.NET 3.5/Chapter15/ADO.NET/ConnectionTester.aspx new file mode 100644 index 0000000..da5a5fc --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter15/ADO.NET/ConnectionTester.aspx @@ -0,0 +1,24 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ConnectionTester.aspx.cs" Inherits="ConnectionTester" %> + + + + + + Untitled Page + + +
+
+ +
+ +
+
+ +
+
+ +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter15/ADO.NET/ConnectionTester.aspx.cs b/Beginning ASP.NET 3.5/Chapter15/ADO.NET/ConnectionTester.aspx.cs new file mode 100644 index 0000000..4318804 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter15/ADO.NET/ConnectionTester.aspx.cs @@ -0,0 +1,59 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using System.Web.Configuration; +using System.Data.SqlClient; + +public partial class ConnectionTester : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } + protected void cmdConnect_Click(object sender, EventArgs e) + { + // Define the connection string. + string connectionString = "Data Source=localhost\\SQLEXPRESS;Initial Catalog=Pubs;"; + + if (optWindows.Checked) + { + connectionString += "Integrated Security=SSPI"; + } + else + { + connectionString += "User ID=sa"; + } + // Define the ADO.NET Connection object. + SqlConnection myConnection = new SqlConnection(connectionString); + + try + { + // Try to open the connection. + myConnection.Open(); + lblInfo.Text = "Server Version: " + myConnection.ServerVersion; + lblInfo.Text += "
Connection Is: " + myConnection.State.ToString(); + } + catch (Exception err) + { + // Handle an error by displaying the information. + lblInfo.Text = "Error reading the database. "; + lblInfo.Text += err.Message; + } + finally + { + // Either way, make sure the connection is properly closed. + // (Even if the connection wasn't opened successfully, + // calling Close() won't cause an error.) + myConnection.Close(); + lblInfo.Text += "
Now Connection Is: "; + lblInfo.Text += myConnection.State.ToString(); + } + } +} diff --git a/Beginning ASP.NET 3.5/Chapter15/ADO.NET/StyleSheet.css b/Beginning ASP.NET 3.5/Chapter15/ADO.NET/StyleSheet.css new file mode 100644 index 0000000..1411f55 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter15/ADO.NET/StyleSheet.css @@ -0,0 +1,12 @@ +body { + font-family: Verdana; + font-size: 83%; +} + +div.Box +{ + padding: 5px; + border-width: 2px; + border-style: ridge; + background-color: Lime; +} diff --git a/Beginning ASP.NET 3.5/Chapter15/ADO.NET/TableRelationships.aspx b/Beginning ASP.NET 3.5/Chapter15/ADO.NET/TableRelationships.aspx new file mode 100644 index 0000000..9e1db02 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter15/ADO.NET/TableRelationships.aspx @@ -0,0 +1,17 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TableRelationships.aspx.cs" Inherits="TableRelationships" %> + + + + + + Untitled Page + + + +
+
+ +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter15/ADO.NET/TableRelationships.aspx.cs b/Beginning ASP.NET 3.5/Chapter15/ADO.NET/TableRelationships.aspx.cs new file mode 100644 index 0000000..c82d81b --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter15/ADO.NET/TableRelationships.aspx.cs @@ -0,0 +1,86 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using System.Data.SqlClient; +using System.Web.Configuration; + +public partial class TableRelationships : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + if (!this.IsPostBack) + { + CreateList(); + } + } + + private string connectionString = + WebConfigurationManager.ConnectionStrings["Pubs"].ConnectionString; + + + private void CreateList() + { + // Define ADO.NET objects. + string selectSQL = "SELECT au_lname, au_fname, au_id FROM Authors"; + SqlConnection con = new SqlConnection(connectionString); + SqlCommand cmd = new SqlCommand(selectSQL, con); + SqlDataAdapter adapter = new SqlDataAdapter(cmd); + DataSet dsPubs = new DataSet(); + + try + { + con.Open(); + adapter.Fill(dsPubs, "Authors"); + + // This command is still linked to the data adapter. + cmd.CommandText = "SELECT au_id, title_id FROM TitleAuthor"; + adapter.Fill(dsPubs, "TitleAuthor"); + + // This command is still linked to the data adapter. + cmd.CommandText = "SELECT title_id, title FROM Titles"; + adapter.Fill(dsPubs, "Titles"); + } + catch (Exception err) + { + lblList.Text = "Error reading list of names. "; + lblList.Text += err.Message; + } + finally + { + con.Close(); + } + + DataRelation Titles_TitleAuthor = new DataRelation("Titles_TitleAuthor", + dsPubs.Tables["Titles"].Columns["title_id"], + dsPubs.Tables["TitleAuthor"].Columns["title_id"]); + DataRelation Authors_TitleAuthor = new DataRelation("Authors_TitleAuthor", + dsPubs.Tables["Authors"].Columns["au_id"], + dsPubs.Tables["TitleAuthor"].Columns["au_id"]); + dsPubs.Relations.Add(Titles_TitleAuthor); + dsPubs.Relations.Add(Authors_TitleAuthor); + + foreach (DataRow rowAuthor in dsPubs.Tables["Authors"].Rows) + { + lblList.Text += "
" + rowAuthor["au_fname"]; + lblList.Text += " " + rowAuthor["au_lname"] + "
"; + + foreach (DataRow rowTitleAuthor in + rowAuthor.GetChildRows(Authors_TitleAuthor)) + { + foreach (DataRow rowTitle in + rowTitleAuthor.GetParentRows(Titles_TitleAuthor)) + { + lblList.Text += "  "; + lblList.Text += rowTitle["title"] + "
"; + } + } + } + } +} \ No newline at end of file diff --git a/Beginning ASP.NET 3.5/Chapter15/ADO.NET/Web.config b/Beginning ASP.NET 3.5/Chapter15/ADO.NET/Web.config new file mode 100644 index 0000000..b355a40 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter15/ADO.NET/Web.config @@ -0,0 +1,115 @@ + + + + + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter16/DataBinding.sln b/Beginning ASP.NET 3.5/Chapter16/DataBinding.sln new file mode 100644 index 0000000..c00e243 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter16/DataBinding.sln @@ -0,0 +1,35 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio Codename Orcas +Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "DataBinding", "DataBinding\", "{8806AEBF-006E-485A-AC68-66275CF84A85}" + ProjectSection(WebsiteProperties) = preProject + TargetFramework = "3.5" + Debug.AspNetCompiler.VirtualPath = "/DataBinding" + Debug.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 2.0\Chapter16\DataBinding\" + Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\DataBinding\" + Debug.AspNetCompiler.Updateable = "true" + Debug.AspNetCompiler.ForceOverwrite = "true" + Debug.AspNetCompiler.FixedNames = "false" + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.VirtualPath = "/DataBinding" + Release.AspNetCompiler.PhysicalPath = "D:\Code\Beginning ASP.NET 2.0\Chapter16\DataBinding\" + Release.AspNetCompiler.TargetPath = "PrecompiledWeb\DataBinding\" + Release.AspNetCompiler.Updateable = "true" + Release.AspNetCompiler.ForceOverwrite = "true" + Release.AspNetCompiler.FixedNames = "false" + Release.AspNetCompiler.Debug = "False" + VWDPort = "53420" + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|.NET = Debug|.NET + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8806AEBF-006E-485A-AC68-66275CF84A85}.Debug|.NET.ActiveCfg = Debug|.NET + {8806AEBF-006E-485A-AC68-66275CF84A85}.Debug|.NET.Build.0 = Debug|.NET + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Beginning ASP.NET 3.5/Chapter16/DataBinding.suo b/Beginning ASP.NET 3.5/Chapter16/DataBinding.suo new file mode 100644 index 0000000..ed0e91f Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter16/DataBinding.suo differ diff --git a/Beginning ASP.NET 3.5/Chapter16/DataBinding/CustomParameters.aspx b/Beginning ASP.NET 3.5/Chapter16/DataBinding/CustomParameters.aspx new file mode 100644 index 0000000..7e782d5 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter16/DataBinding/CustomParameters.aspx @@ -0,0 +1,49 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CustomParameters.aspx.cs" Inherits="CustomParameters" %> + + + + + + Custom Parameters + + + +
+
+ + + +
+
+ + + + + + + + + + + + + + + +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter16/DataBinding/CustomParameters.aspx.cs b/Beginning ASP.NET 3.5/Chapter16/DataBinding/CustomParameters.aspx.cs new file mode 100644 index 0000000..1cb70d7 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter16/DataBinding/CustomParameters.aspx.cs @@ -0,0 +1,26 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Linq; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class CustomParameters : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } + + protected void sourceOrders_Selecting(object sender, + SqlDataSourceSelectingEventArgs e) + { + e.Command.Parameters["@EarliestOrderDate"].Value = DateTime.Today.AddYears(-10); + } + +} diff --git a/Beginning ASP.NET 3.5/Chapter16/DataBinding/DataBindingUrl.aspx b/Beginning ASP.NET 3.5/Chapter16/DataBinding/DataBindingUrl.aspx new file mode 100644 index 0000000..5bba595 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter16/DataBinding/DataBindingUrl.aspx @@ -0,0 +1,25 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DataBindingUrl.aspx.cs" Inherits="DataBindingUrl" %> + + + + + + Untitled Page + + + +
+
+ <%# URL %> +

+ +

+ +

+ + +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter16/DataBinding/DataBindingUrl.aspx.cs b/Beginning ASP.NET 3.5/Chapter16/DataBinding/DataBindingUrl.aspx.cs new file mode 100644 index 0000000..6d35854 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter16/DataBinding/DataBindingUrl.aspx.cs @@ -0,0 +1,22 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class DataBindingUrl : System.Web.UI.Page +{ + public string URL; + + protected void Page_Load(Object sender, EventArgs e) + { + URL = "Images/picture.jpg"; + this.DataBind(); + } + +} diff --git a/Beginning ASP.NET 3.5/Chapter16/DataBinding/DataSetBinding.aspx b/Beginning ASP.NET 3.5/Chapter16/DataBinding/DataSetBinding.aspx new file mode 100644 index 0000000..ccb227f --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter16/DataBinding/DataSetBinding.aspx @@ -0,0 +1,16 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DataSetBinding.aspx.cs" Inherits="DataSetBinding" %> + + + + + + Untitled Page + + + +
+
+
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter16/DataBinding/DataSetBinding.aspx.cs b/Beginning ASP.NET 3.5/Chapter16/DataBinding/DataSetBinding.aspx.cs new file mode 100644 index 0000000..550ad49 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter16/DataBinding/DataSetBinding.aspx.cs @@ -0,0 +1,52 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class DataSetBinding : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + // Define a DataSet with a single DataTable. + DataSet dsInternal = new DataSet(); + dsInternal.Tables.Add("Users"); + + // Define two columns for this table. + dsInternal.Tables["Users"].Columns.Add("Name"); + dsInternal.Tables["Users"].Columns.Add("Country"); + + // Add some actual information into the table. + DataRow rowNew = dsInternal.Tables["Users"].NewRow(); + rowNew["Name"] = "John"; + rowNew["Country"] = "Uganda"; + dsInternal.Tables["Users"].Rows.Add(rowNew); + + rowNew = dsInternal.Tables["Users"].NewRow(); + rowNew["Name"] = "Samantha"; + rowNew["Country"] = "Belgium"; + dsInternal.Tables["Users"].Rows.Add(rowNew); + + rowNew = dsInternal.Tables["Users"].NewRow(); + rowNew["Name"] = "Rico"; + rowNew["Country"] = "Japan"; + dsInternal.Tables["Users"].Rows.Add(rowNew); + + // Define the binding. + lstUser.DataSource = dsInternal.Tables["Users"]; + lstUser.DataTextField = "Name"; + + // Define the binding. + lstUser.DataSource = dsInternal; + lstUser.DataMember = "Users"; + lstUser.DataTextField = "Name"; + + this.DataBind(); // Could also use lstItems.DataBind() to bind just the list box. + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter16/DataBinding/DictionaryCollection.aspx b/Beginning ASP.NET 3.5/Chapter16/DataBinding/DictionaryCollection.aspx new file mode 100644 index 0000000..a8a6d4b --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter16/DataBinding/DictionaryCollection.aspx @@ -0,0 +1,20 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DictionaryCollection.aspx.cs" Inherits="DictionaryCollection" %> + + + + + + Untitled Page + + + +
+
+
+
+ +
+
+ + diff --git a/Beginning ASP.NET 3.5/Chapter16/DataBinding/DictionaryCollection.aspx.cs b/Beginning ASP.NET 3.5/Chapter16/DataBinding/DictionaryCollection.aspx.cs new file mode 100644 index 0000000..7e556c1 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter16/DataBinding/DictionaryCollection.aspx.cs @@ -0,0 +1,44 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using System.Collections.Generic; + +public partial class DictionaryCollection : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + if (!this.IsPostBack) + { + Dictionary fruit = new Dictionary(); + fruit.Add(1, "Kiwi"); + fruit.Add(2, "Pear"); + fruit.Add(3, "Mango"); + fruit.Add(4, "Blueberry"); + fruit.Add(5, "Apricot"); + fruit.Add(6, "Banana"); + fruit.Add(7, "Peach"); + fruit.Add(8, "Plum"); + + // Define the binding for the list controls. + MyListBox.DataSource = fruit; + MyListBox.DataTextField = "Value"; + MyListBox.DataValueField = "Key"; + // Activate the binding. + this.DataBind(); + } + + } + protected void MyListBox_SelectedIndexChanged(object sender, EventArgs e) + { + lblMessage.Text = "You picked: " + MyListBox.SelectedItem.Text; + lblMessage.Text += " which has the key: " + MyListBox.SelectedItem.Value; + + } +} diff --git a/Beginning ASP.NET 3.5/Chapter16/DataBinding/Images/picture.jpg b/Beginning ASP.NET 3.5/Chapter16/DataBinding/Images/picture.jpg new file mode 100644 index 0000000..d5ec12d Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter16/DataBinding/Images/picture.jpg differ diff --git a/Beginning ASP.NET 3.5/Chapter16/DataBinding/ListDataBinding.aspx b/Beginning ASP.NET 3.5/Chapter16/DataBinding/ListDataBinding.aspx new file mode 100644 index 0000000..b5ded9f --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter16/DataBinding/ListDataBinding.aspx @@ -0,0 +1,26 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ListDataBinding.aspx.cs" Inherits="ListDataBinding" %> + + + + + + Untitled Page + + + +
+
+ +

+ +
+ + +
+ + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter25/Ajax/WaitIndicator.aspx.cs b/Beginning ASP.NET 3.5/Chapter25/Ajax/WaitIndicator.aspx.cs new file mode 100644 index 0000000..b553111 --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter25/Ajax/WaitIndicator.aspx.cs @@ -0,0 +1,25 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Linq; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class WaitIndicator : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } + + protected void cmdRefreshTime_Click(object sender, EventArgs e) + { + System.Threading.Thread.Sleep(TimeSpan.FromSeconds(10)); + lblTime.Text = DateTime.Now.ToLongTimeString(); + } +} diff --git a/Beginning ASP.NET 3.5/Chapter25/Ajax/Web.config b/Beginning ASP.NET 3.5/Chapter25/Ajax/Web.config new file mode 100644 index 0000000..dfd800f --- /dev/null +++ b/Beginning ASP.NET 3.5/Chapter25/Ajax/Web.config @@ -0,0 +1,115 @@ + + + + + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Beginning ASP.NET 3.5/Chapter25/Ajax/ajax.jpg b/Beginning ASP.NET 3.5/Chapter25/Ajax/ajax.jpg new file mode 100644 index 0000000..76c6654 Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter25/Ajax/ajax.jpg differ diff --git a/Beginning ASP.NET 3.5/Chapter25/Ajax/lava_lamp.gif b/Beginning ASP.NET 3.5/Chapter25/Ajax/lava_lamp.gif new file mode 100644 index 0000000..9649fa6 Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter25/Ajax/lava_lamp.gif differ diff --git a/Beginning ASP.NET 3.5/Chapter25/Ajax/wait.gif b/Beginning ASP.NET 3.5/Chapter25/Ajax/wait.gif new file mode 100644 index 0000000..d04f463 Binary files /dev/null and b/Beginning ASP.NET 3.5/Chapter25/Ajax/wait.gif differ diff --git a/Beginning ASP.NET 3.5/InstAdboard.sql b/Beginning ASP.NET 3.5/InstAdboard.sql new file mode 100644 index 0000000..7ad5ac9 Binary files /dev/null and b/Beginning ASP.NET 3.5/InstAdboard.sql differ diff --git a/Beginning ASP.NET 3.5/InstNwnd.sql b/Beginning ASP.NET 3.5/InstNwnd.sql new file mode 100644 index 0000000..20d8271 Binary files /dev/null and b/Beginning ASP.NET 3.5/InstNwnd.sql differ diff --git a/Beginning ASP.NET 3.5/InstPubs.sql b/Beginning ASP.NET 3.5/InstPubs.sql new file mode 100644 index 0000000..d4a1e96 --- /dev/null +++ b/Beginning ASP.NET 3.5/InstPubs.sql @@ -0,0 +1,2163 @@ +/* */ +/* InstPubs.SQL - Creates the Pubs database */ +/* */ +/* +** Copyright Microsoft, Inc. 1994 - 2000 +** All Rights Reserved. +*/ + +SET NOCOUNT ON +GO + +set nocount on +set dateformat mdy + +USE master + +declare @dttm varchar(55) +select @dttm=convert(varchar,getdate(),113) +raiserror('Beginning InstPubs.SQL at %s ....',1,1,@dttm) with nowait + +GO + +if exists (select * from sysdatabases where name='pubs') +begin + raiserror('Dropping existing pubs database ....',0,1) + DROP database pubs +end +GO + +CHECKPOINT +go + +raiserror('Creating pubs database....',0,1) +go +/* + Use default size with autogrow +*/ + +CREATE DATABASE pubs +GO + +CHECKPOINT + +GO + +USE pubs + +GO + +if db_name() <> 'pubs' + raiserror('Error in InstPubs.SQL, ''USE pubs'' failed! Killing the SPID now.' + ,22,127) with log + +GO + +execute sp_dboption 'pubs' ,'trunc. log on chkpt.' ,'true' +GO + +execute sp_addtype id ,'varchar(11)' ,'NOT NULL' +execute sp_addtype tid ,'varchar(6)' ,'NOT NULL' +execute sp_addtype empid ,'char(9)' ,'NOT NULL' + +raiserror('Now at the create table section ....',0,1) + +GO + +CREATE TABLE authors +( + au_id id + + CHECK (au_id like '[0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9]') + + CONSTRAINT UPKCL_auidind PRIMARY KEY CLUSTERED, + + au_lname varchar(40) NOT NULL, + au_fname varchar(20) NOT NULL, + + phone char(12) NOT NULL + + DEFAULT ('UNKNOWN'), + + address varchar(40) NULL, + city varchar(20) NULL, + state char(2) NULL, + + zip char(5) NULL + + CHECK (zip like '[0-9][0-9][0-9][0-9][0-9]'), + + contract bit NOT NULL +) + +GO + +CREATE TABLE publishers +( + pub_id char(4) NOT NULL + + CONSTRAINT UPKCL_pubind PRIMARY KEY CLUSTERED + + CHECK (pub_id in ('1389', '0736', '0877', '1622', '1756') + OR pub_id like '99[0-9][0-9]'), + + pub_name varchar(40) NULL, + city varchar(20) NULL, + state char(2) NULL, + + country varchar(30) NULL + + DEFAULT('USA') +) + +GO + +CREATE TABLE titles +( + title_id tid + + CONSTRAINT UPKCL_titleidind PRIMARY KEY CLUSTERED, + + title varchar(80) NOT NULL, + + type char(12) NOT NULL + + DEFAULT ('UNDECIDED'), + + pub_id char(4) NULL + + REFERENCES publishers(pub_id), + + price money NULL, + advance money NULL, + royalty int NULL, + ytd_sales int NULL, + notes varchar(200) NULL, + + pubdate datetime NOT NULL + + DEFAULT (getdate()) +) + +GO + +CREATE TABLE titleauthor +( + au_id id + + REFERENCES authors(au_id), + + title_id tid + + REFERENCES titles(title_id), + + au_ord tinyint NULL, + royaltyper int NULL, + + + CONSTRAINT UPKCL_taind PRIMARY KEY CLUSTERED(au_id, title_id) +) + +GO + +CREATE TABLE stores +( + stor_id char(4) NOT NULL + + CONSTRAINT UPK_storeid PRIMARY KEY CLUSTERED, + + stor_name varchar(40) NULL, + stor_address varchar(40) NULL, + city varchar(20) NULL, + state char(2) NULL, + zip char(5) NULL +) + +GO + +CREATE TABLE sales +( + stor_id char(4) NOT NULL + + REFERENCES stores(stor_id), + + ord_num varchar(20) NOT NULL, + ord_date datetime NOT NULL, + qty smallint NOT NULL, + payterms varchar(12) NOT NULL, + + title_id tid + + REFERENCES titles(title_id), + + + CONSTRAINT UPKCL_sales PRIMARY KEY CLUSTERED (stor_id, ord_num, title_id) +) + +GO + +CREATE TABLE roysched +( + title_id tid + + REFERENCES titles(title_id), + + lorange int NULL, + hirange int NULL, + royalty int NULL +) + +GO + +CREATE TABLE discounts +( + discounttype varchar(40) NOT NULL, + + stor_id char(4) NULL + + REFERENCES stores(stor_id), + + lowqty smallint NULL, + highqty smallint NULL, + discount dec(4,2) NOT NULL +) + +GO + +CREATE TABLE jobs +( + job_id smallint IDENTITY(1,1) + + PRIMARY KEY CLUSTERED, + + job_desc varchar(50) NOT NULL + + DEFAULT 'New Position - title not formalized yet', + + min_lvl tinyint NOT NULL + + CHECK (min_lvl >= 10), + + max_lvl tinyint NOT NULL + + CHECK (max_lvl <= 250) +) + +GO + +CREATE TABLE pub_info +( + pub_id char(4) NOT NULL + + REFERENCES publishers(pub_id) + + CONSTRAINT UPKCL_pubinfo PRIMARY KEY CLUSTERED, + + logo image NULL, + pr_info text NULL +) + +GO + +CREATE TABLE employee +( + emp_id empid + + CONSTRAINT PK_emp_id PRIMARY KEY NONCLUSTERED + + CONSTRAINT CK_emp_id CHECK (emp_id LIKE + '[A-Z][A-Z][A-Z][1-9][0-9][0-9][0-9][0-9][FM]' or + emp_id LIKE '[A-Z]-[A-Z][1-9][0-9][0-9][0-9][0-9][FM]'), + + fname varchar(20) NOT NULL, + minit char(1) NULL, + lname varchar(30) NOT NULL, + + job_id smallint NOT NULL + + DEFAULT 1 + + REFERENCES jobs(job_id), + + job_lvl tinyint + + DEFAULT 10, + + pub_id char(4) NOT NULL + + DEFAULT ('9952') + + REFERENCES publishers(pub_id), + + hire_date datetime NOT NULL + + DEFAULT (getdate()) +) + +GO + +raiserror('Now at the create trigger section ...',0,1) + +GO + +CREATE TRIGGER employee_insupd +ON employee +FOR insert, UPDATE +AS +--Get the range of level for this job type from the jobs table. +declare @min_lvl tinyint, + @max_lvl tinyint, + @emp_lvl tinyint, + @job_id smallint +select @min_lvl = min_lvl, + @max_lvl = max_lvl, + @emp_lvl = i.job_lvl, + @job_id = i.job_id +from employee e, jobs j, inserted i +where e.emp_id = i.emp_id AND i.job_id = j.job_id +IF (@job_id = 1) and (@emp_lvl <> 10) +begin + raiserror ('Job id 1 expects the default level of 10.',16,1) + ROLLBACK TRANSACTION +end +ELSE +IF NOT (@emp_lvl BETWEEN @min_lvl AND @max_lvl) +begin + raiserror ('The level for job_id:%d should be between %d and %d.', + 16, 1, @job_id, @min_lvl, @max_lvl) + ROLLBACK TRANSACTION +end + +GO + +raiserror('Now at the inserts to authors ....',0,1) + +GO + +insert authors + values('409-56-7008', 'Bennet', 'Abraham', '415 658-9932', + '6223 Bateman St.', 'Berkeley', 'CA', '94705', 1) +insert authors + values('213-46-8915', 'Green', 'Marjorie', '415 986-7020', + '309 63rd St. #411', 'Oakland', 'CA', '94618', 1) +insert authors + values('238-95-7766', 'Carson', 'Cheryl', '415 548-7723', + '589 Darwin Ln.', 'Berkeley', 'CA', '94705', 1) +insert authors + values('998-72-3567', 'Ringer', 'Albert', '801 826-0752', + '67 Seventh Av.', 'Salt Lake City', 'UT', '84152', 1) +insert authors + values('899-46-2035', 'Ringer', 'Anne', '801 826-0752', + '67 Seventh Av.', 'Salt Lake City', 'UT', '84152', 1) +insert authors + values('722-51-5454', 'DeFrance', 'Michel', '219 547-9982', + '3 Balding Pl.', 'Gary', 'IN', '46403', 1) +insert authors + values('807-91-6654', 'Panteley', 'Sylvia', '301 946-8853', + '1956 Arlington Pl.', 'Rockville', 'MD', '20853', 1) +insert authors + values('893-72-1158', 'McBadden', 'Heather', + '707 448-4982', '301 Putnam', 'Vacaville', 'CA', '95688', 0) +insert authors + values('724-08-9931', 'Stringer', 'Dirk', '415 843-2991', + '5420 Telegraph Av.', 'Oakland', 'CA', '94609', 0) +insert authors + values('274-80-9391', 'Straight', 'Dean', '415 834-2919', + '5420 College Av.', 'Oakland', 'CA', '94609', 1) +insert authors + values('756-30-7391', 'Karsen', 'Livia', '415 534-9219', + '5720 McAuley St.', 'Oakland', 'CA', '94609', 1) +insert authors + values('724-80-9391', 'MacFeather', 'Stearns', '415 354-7128', + '44 Upland Hts.', 'Oakland', 'CA', '94612', 1) +insert authors + values('427-17-2319', 'Dull', 'Ann', '415 836-7128', + '3410 Blonde St.', 'Palo Alto', 'CA', '94301', 1) +insert authors + values('672-71-3249', 'Yokomoto', 'Akiko', '415 935-4228', + '3 Silver Ct.', 'Walnut Creek', 'CA', '94595', 1) +insert authors + values('267-41-2394', 'O''Leary', 'Michael', '408 286-2428', + '22 Cleveland Av. #14', 'San Jose', 'CA', '95128', 1) +insert authors + values('472-27-2349', 'Gringlesby', 'Burt', '707 938-6445', + 'PO Box 792', 'Covelo', 'CA', '95428', 3) +insert authors + values('527-72-3246', 'Greene', 'Morningstar', '615 297-2723', + '22 Graybar House Rd.', 'Nashville', 'TN', '37215', 0) +insert authors + values('172-32-1176', 'White', 'Johnson', '408 496-7223', + '10932 Bigge Rd.', 'Menlo Park', 'CA', '94025', 1) +insert authors + values('712-45-1867', 'del Castillo', 'Innes', '615 996-8275', + '2286 Cram Pl. #86', 'Ann Arbor', 'MI', '48105', 1) +insert authors + values('846-92-7186', 'Hunter', 'Sheryl', '415 836-7128', + '3410 Blonde St.', 'Palo Alto', 'CA', '94301', 1) +insert authors + values('486-29-1786', 'Locksley', 'Charlene', '415 585-4620', + '18 Broadway Av.', 'San Francisco', 'CA', '94130', 1) +insert authors + values('648-92-1872', 'Blotchet-Halls', 'Reginald', '503 745-6402', + '55 Hillsdale Bl.', 'Corvallis', 'OR', '97330', 1) +insert authors + values('341-22-1782', 'Smith', 'Meander', '913 843-0462', + '10 Mississippi Dr.', 'Lawrence', 'KS', '66044', 0) + +GO + +raiserror('Now at the inserts to publishers ....',0,1) + +GO + +insert publishers values('0736', 'New Moon Books', 'Boston', 'MA', 'USA') +insert publishers values('0877', 'Binnet & Hardley', 'Washington', 'DC', 'USA') +insert publishers values('1389', 'Algodata Infosystems', 'Berkeley', 'CA', 'USA') +insert publishers values('9952', 'Scootney Books', 'New York', 'NY', 'USA') +insert publishers values('1622', 'Five Lakes Publishing', 'Chicago', 'IL', 'USA') +insert publishers values('1756', 'Ramona Publishers', 'Dallas', 'TX', 'USA') +insert publishers values('9901', 'GGG&G', 'Mnchen', NULL, 'Germany') +insert publishers values('9999', 'Lucerne Publishing', 'Paris', NULL, 'France') + +GO + +raiserror('Now at the inserts to pub_info ....',0,1) + +GO + +insert pub_info values('0736', 0x474946383961D3001F00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000D3001F004004FFF0C949ABBD38EBCDBBFF60288E245001686792236ABAB03BC5B055B3F843D3B99DE2AB532A36FB15253B19E5A6231A934CA18CB75C1191D69BF62AAD467F5CF036D8243791369F516ADEF9304AF8F30A3563D7E54CFC04BF24377B5D697E6451333D8821757F898D8E8F1F76657877907259755E5493962081798D9F8A846D9B4A929385A7A5458CA0777362ACAF585E6C6A84AD429555BAA9A471A89D8E8BA2C3C7C82DC9C8AECBCECF1EC2D09143A66E80D3D9BC2C41D76AD28FB2CD509ADAA9AAC62594A3DF81C65FE0BDB5B0CDF4E276DEF6DD78EF6B86FA6C82C5A2648A54AB6AAAE4C1027864DE392E3AF4582BF582DFC07D9244ADA2480BD4C6767BFF32AE0BF3EF603B3907490A4427CE21A7330A6D0584B810664D7F383FA25932488FB96D0F37BDF9491448D1A348937A52CAB4A9D3784EF5E58B4A5545D54BC568FABC9A68DD526ED0A6B8AA17331BD91E5AD9D1D390CED23D88F54A3ACB0A955ADDAD9A50B50D87296E3EB9C76A7CDAABC86B2460040DF34D3995515AB9FF125F1AFA0DAB20A0972382CCB9F9E5AEBC368B21EEDB66EDA15F1347BE2DFDEBB44A7B7C6889240D9473EB73322F4E8D8DBBE14D960B6519BCE5724BB95789350E97EA4BF3718CDD64068D751A261D8B1539D6DCDE3C37F68E1FB58E5DCED8A44477537049852EFD253CEE38C973B7E9D97A488C2979FB936FBAFF2CF5CB79E35830400C31860F4A9BE925D4439F81B6A073BEF1575F593C01A25B26127255D45D4A45B65B851A36C56154678568A20E1100003B, +'This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts. + +This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.') + +insert pub_info values('0877', 0x4749463839618B002F00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000008B002F004004FFF0C949ABBD38EBCDBBFFA0048464089CE384A62BD596309CC6F4F58A287EBA79ED73B3D26A482C1A8FC8A47249FCCD76BC1F3058D94135579C9345053D835768560CFE6A555D343A1B6D3FC6DC2A377E66DBA5F8DBEBF6EEE1FF2A805B463A47828269871F7A3D7C7C8A3E899093947F666A756567996E6C519E167692646E7D9C98A42295ABAC24A092AD364C737EB15EB61B8E8DB58FB81DB0BE8C6470A0BE58C618BAC365C5C836CEA1BCBBC4C0D0AAD6D14C85CDD86FDDDFAB5F43A580DCB519A25B9BAE989BC3EEA9A7EBD9BF54619A7DF8BBA87475EDA770D6C58B968C59A27402FB99E2378FC7187010D5558948B15CC58B4E20CE9A762E62B558CAB86839FC088D24AB90854662BCD60D653E832BBD7924F49226469327FDEC91C6AD2538972E6FFEE429720D4E63472901251A33A9D28DB47A5A731A7325D56D50B36ADDAA2463D5AF1EAE82F5F84FAA946656AA21AC31D0C4BF85CBA87912D6D194D4B535C5DDDBA93221CB226D022E9437D89C594305FD321C0CB7DFA5C58223036E088F3139B9032563DD0BE66D2ACD8B2BCB9283CEDEE3C6A53EE39BA7579A62C1294917DC473035E0B9E3183F9A3BB6F7ABDE608B018800003B, +'This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. + +This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. + +This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. + +This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. + +This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C.') + +insert pub_info values('1389', 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000C2001D004004FFF0C949ABBD38EBCDBBFF60288E1C609E2840AE2C969E6D2CCFB339D90F2CE1F8AEE6BC9FEF26EC01413AA3F2D76BAA96C7A154EA7CC29C449AC7A8ED7A2FDC2FED25149B29E4D479FD55A7CBD931DC35CFA4916171BEFDAABC51546541684C8285847151537F898A588D89806045947491757B6C9A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A95A6A3E64169923B0901A775B7566B25D7F8C888A5150BE7B8F93847D8DC3C07983BEBDC1878BCFAF6F44BBD0AD71C9CBD653BFD5CEC7D1C3DFDB8197D8959CB9AAB8B7EBEEEFF0BA92F1B6B5F4A0F6F776D3FA9EBCFD748C01DCB4AB5DBF7C03CF1454070F61423D491C326BA18E211081250C7AB12867619825F37F2ECE1168AC242B6A274556D121D28FA46C11E78564C5B295308F21BBF5CAD6CCE52C7018813932C4ED5C517346B7C1C2683368349D49A19D0439D31538A452A916135A0B19A59AAB9E6A835A0EABD00E5CD11D1D478C1C59714053AA4C4955AB4B9956879AB497F62E1CBA2373DA25B752239F8787119390AB5806C74E1100003B, +'This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. + +This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. + +This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. + +This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. + +This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. + +This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. + +This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. + +This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. + +This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. + +This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California.') + +insert pub_info values('1622', 0x474946383961F5003400B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000F50034004004FFF0C949ABBD38EBCDBBFF60288E64D90166AA016CEBBEB02ACF746D67E82DC2ACEEFFC0A02997B31027C521EF25698D8E42230E049D3E8AD8537385BC4179DB6B574C26637BE58BF38A1EB393DF2CE55CA52731F77918BE9FAFCD6180817F697F5F6E6C7A836D62876A817A79898A7E31524D708E7299159C9456929F9044777C6575A563A68E827D9D4C8D334BB3B051B6B7B83A8490B91EB4B3BDC1C251A1C24BC3C8C9C8C5C4BFCCCAD0D135ACC36B2E3BBCB655AD1CDB8F6921DEB8D48AA9ADA46046D7E0DC829B9D98E9988878D9AAE5AEF875BC6DEFF7E7A35C9943F18CCA3175C0A4295C48625F3B8610234A0C17D159C289189515CC7531A3C7891BFF9B59FA4812634820F24AAA94882EA50D8BBB3E8813598B8A3D7C0D6F12CB8710E5BA7536D9ED3C458F8B509CF17CE94CEA658F254D944889528306E83C245089629DDA4F8BD65885049ACBB7ADAB2A5364AFDAF344902752409A6085FA39105EBB3C2DAB2E52FA8611B7ACFA060956CB1370598176DB3E74FB956CCCA77207BB6B8CAAAADEA3FFBE01A48CD871D65569C37E25A458C5C9572E57AADE59F7F40A98B456CB36560F730967B3737B74ADBBB7EFDABF830BE70B11F6C8E1C82F31345E33B9F3A5C698FB7D4E9D779083D4B313D7985ABB77E0C9B07F1F0F3EFA71F2E8ED56EB98BEBD7559306FC72C6995EA7499F3B5DDA403FF17538AB6FD20C9FF7D463D531681971888E0104E45069D7C742D58DB7B29B45454811B381420635135B5D838D6E487612F876D98D984B73D2820877DFD871523F5E161D97DD7FCB4C82E31BEC8176856D9D8487D95E1E5D711401AE2448EF11074E47E9D69359382E8A8871391880C28E5861636399950FEFCA55E315D8279255C2C6AA89899B68588961C5B82C366693359F1CA89ACACB959971D76F6E6607B6E410E9D57B1A9196A52BDD56636CC08BA519C5E1EDA8743688906DA9D53F2E367999656A96292E2781397A6264E62A04E25FE49A59354696958409B11F527639DEAC84E7795553A9AACA85C68E8977D2A7919A5A7F83329A46F0D79698BF60D98688CCC118A6C3F8F38E6D89C8C12F635E49145F6132D69DCCE684725FC0546C3B40875D79E70A5867A8274E69E8BAEAC1FEEC02E92EE3AA7ADA015365BEFBE83F2EB6F351100003B, +'This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. + +This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois.') + +insert pub_info values('1756', 0x474946383961E3002500B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000E30025004004FFF0C949ABBD38EBCDBBFF60288E240858E705A4D2EA4E6E0CC7324DD1EB9CDBBAFCE1AC878DE7ABBD84476452C963369F2F288E933A595B404DB27834E67A5FEC37ACEC517D4EB24E5C8D069966361A5E8ED3C3DCA5AA54B9B2AE2D423082817F848286898386858754887B8A8D939094947E918B7D8780959E9D817C18986FA2A6A75A7B22A59B378E1DACAEB18F1940B6A8B8A853727AB5BD4E76676A37BFB9AF2A564D6BC0776E635BCE6DCFD2C3C873716879D4746C6053DA76E0DAB3A133D6D5B290929F9CEAEDEB6FA0C435EF9E97F59896EC28EEFA9DFF69A21C1BB4CA1E3E63084DB42B970FD6407D05C9E59298B0A2C58B18337AA0E88DA3468DC3FFD0692187A7982F5F2271B152162DE54795CEB0F0DAF8EBDA2A932F1FF203B38C484B6ED07674194ACD639679424B4EDB36279B4D3852FE1095266743955138C5209ADA6D5CB26DCDFC644DD351EACF804BCD32421A562DB6965F25AADD11B056BD7BA436C903E82A1D4A3D024769BAE777B0BB7887F51A0E022E9589BCFCE0DD6527597223C4917502ACBCF8D5E6C49F0B6FA60751A7C2748A3EE7DD6B70B5628F9A5873C6DB5936E57EB843C726043B95EBDE394F3584EC7096ED8DA60D86001EBCB9F3E72F99439F0E7DEC7297BA84D9924EFDB11A65566B8EFB510C7CC258DBB7779F7834A9756E6C97D114F95E5429F13CE5F7F9AAF51C996928604710FF544AFDC79717C10CD85157C6EDD75F7EB49C81D45C5EA9674E5BBBA065941BFB45F3D62D5E99E11488516568A15D1292255F635E8045E0520F3E15A0798DB5C5A08105EE52E3884C05255778E6F5C4A287CCB4D84D1D41CE08CD913C56656482EAEDE8E38D71B974553C199EC324573C3669237C585588E52D1ACE049F85521648659556CD83445D27C9F4D68501CE580E31748ED4948C0E3E88959B257C87E39D0A8EC5D812559234996A9EE5B6E864FE31BA5262971DE40FA5B75D9A487A9A79975C6AB5DD06EA6CCA9DB94FA6A1568AD8A4C33DBA6A5995EE5450AC0AA24A9C6DBAE9F6883CB48976D0ABA8D90AA9A88D6246C2ABA3FE8A1B43CA229B9C58AFC11E071AB1D1BE366DB5C9AE85DCA48595466B83AC95C61DA60D1146EEB3BB817ADA40A08CFBDBB2EB9972EB6EDB66D26D71768D5B2B1FEFC65B11AFA5FA96C93AF50AA6AFBEFE263C1DC0FCA2AB8AC210472C310A1100003B, +'This is sample text data for Ramona Publishers, publisher 1756 in the pubs database. Ramona Publishers is located in Dallas, Texas.') + +insert pub_info values('9901', 0x4749463839615D002200B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000005D0022004004FFF0C949ABBD38EBCDFB03DF078C249895A386AA68BB9E6E0ACE623ABD1BC9E9985DFFB89E8E366BED782C5332563ABA4245A6744AAD5AAF4D2276CBED5EA1D026C528B230CD38B2C92721D78CC4772526748F9F611EB28DE7AFE25E818283604A1E8788898A7385838E8F55856F6C2C1D86392F6B9730708D6C5477673758A3865E92627E94754E173697A6A975809368949BB2AE7B9A6865AA734F80A2A17DA576AA5BB667C290CDCE4379CFD2CE9ED3D6A7CCD7DAA4D9C79341C8B9DF5FC052A8DEBA9BB696767B9C7FD5B8BBF23EABB9706BCAE5F05AB7E6C4C7488DDAF7251BC062530EFE93638C5B3580ECD4951312C217C425E73E89D38709D79D810D393BD20A528CE0AA704AA2D4D3082E583C89BD2C2D720753E1C8922697D44CF6AE53BF6D4041750B4AD467C54548932A1D7374A9D3A789004400003B, +'This is sample text data for GGG&G, publisher 9901 in the pubs database. GGG&G is located in Mnchen, Germany.') + +insert pub_info values('9952', 0x47494638396107012800B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000070128004004FFF0C949ABBD38EBCDBBFF60288E6469660005AC2C7BB56D05A7D24C4F339E3F765FC716980C3824F28418E4D1A552DA8ACCA5517A7B526F275912690D2A9BD11D14AB8B8257E7E9776BDEE452C2279C47A5CBEDEF2B3C3FBF9FC85981821D7D76868588878A898C8B838F1C8D928E733890829399949B979D9E9FA074A1A3A4A5A6A7458F583E69803F53AF4C62AD5E6DB13B6B3DAEAC6EBA64B365B26BB7ABBEB5C07FB428BCC4C8C1CCC7BBB065637C7A9B7BBE8CDADBDA8B7C31D9E1D88E2FA89E9AE9E49AE7EDA48DA2EEF2F3F4F597AEF6F9FAFBFC805D6CD28C0164C64D18BE3AAD88D87AA5C1DBC07FD59CE54293F0E0882AC39ED9CA2886E3308FB3FF262EBC726D591823204F2E0C09A4A3B32CFEACBC24198D86C48FD3E208D43832E3C0671A2D89737167281AA333219AC048D061499A3C83BEC8090BD84E5A99DE808B730DE9516B727CE85AE7C122BF73EAD29255CB76ADDBB6EC549C8504F7AD5DB37343A98D97576EDDBF7CFB0AEE8457EF5D4E83132BAEB1B8B1E3C749204B9EACB830E5CB984DE1F339A4E1CC88C93CB7D989D72234D1D3A672FEF85055C483C80A06742ADB664F3563119E417D5A8F52DFB1512AEC5D82E9C8662A477FB19A72B6F2E714413F8D0654AA75A8C4C648FDBC346ACDCD5487AFC439BE8BC8E8AA7F6BD77D2B7DF4E6C5882E57DFBDE2F56AEE6D87DFB8BFE06BE7E8F1C6CBCE4D2DC15751803C5956567EFA1D47A041E5F1176183CC1D571D21C2850396565CF5B1D5571D8AC21D08E099A15E85269E87207B1736B31E6FE620324E582116F5215178C86763518A9068DF7FE8C9C6207DCD0104A47B6B717388901EFA27238E3482454E43BB61E8D388F7FD44DD32473E79D43A527633232561E6F86536660256891699D175989A6F1A020A9C75C9D5E68274C619D79D91B5C5189F7906CA67297129D88F9E881A3AA83E8AB623E85E8B0EDAE89C892216E9A584B80318A69C7E3269A7A046FA69A8A4B6094004003B, +'This is sample text data for Scootney Books, publisher 9952 in the pubs database. Scootney Books is located in New York City, New York.') + +insert pub_info values('9999', 0x474946383961A9002400B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000A90024004004FFF0C949ABBD38EBCDBBFF60F8011A609E67653EA8D48A702CCFF44566689ED67CEFFF23D58E7513B686444A6EA26B126FC8E74AC82421A7ABE5F4594D61B7BBF0D6F562719A68A07ACDC6389925749AFC6EDBEFBCA24D3E96E2FF803D7A1672468131736E494A8B5C848D8633834B916E598B657E4A83905F7D9B7B56986064A09BA2A68D63603A2E717C9487B2B3209CA7AD52594751B4BD80B65D75B799BEC5BFAF7CC6CACB6638852ACC409F901BD33EB6BCCDC1D1CEA9967B23C082C3709662A69FA4A591E7AE84D87A5FA0AB502F43AC5D74EB9367B0624593FA5CB101ED144173E5F4315AE8485B4287FCBE39E446B1624173FEAC59DC2809594623D9C3388A54E4ACD59C642353E2F098E919319530DD61C405C7CBCB9831C5E5A2192C244E983A3FFE1CDA21282CA248ABB18C25336952A389D689E489B0D24483243B66CD8775A315801AA5A60A6B2DAC074E3741D6BBA8902BA687E9A6D1A3B6D6D15C7460C77AA3E3E556D79EBAF4AAAAB2CFCF578671DFDE657598305D51F7BE5E5A25361ED3388EED0A84B2B7535D6072C1D62DB5588BE5CCA5B1BDA377B99E3CBE9EDA31944A951ADF7DB15263A1429B37BB7E429D8EC4D754B87164078F2B87012002003B, +'This is sample text data for Lucerne Publishing, publisher 9999 in the pubs database. Lucerne publishing is located in Paris, France. + +This is sample text data for Lucerne Publishing, publisher 9999 in the pubs database. Lucerne publishing is located in Paris, France. + +This is sample text data for Lucerne Publishing, publisher 9999 in the pubs database. Lucerne publishing is located in Paris, France. + +This is sample text data for Lucerne Publishing, publisher 9999 in the pubs database. Lucerne publishing is located in Paris, France.') +GO + + +raiserror('Now at the inserts to titles ....',0,1) + +GO + +insert titles values ('PC8888', 'Secrets of Silicon Valley', 'popular_comp', '1389', +$20.00, $8000.00, 10, 4095, +'Muckraking reporting on the world''s largest computer hardware and software manufacturers.', +'06/12/94') + +insert titles values ('BU1032', 'The Busy Executive''s Database Guide', 'business', +'1389', $19.99, $5000.00, 10, 4095, +'An overview of available database systems with emphasis on common business applications. Illustrated.', +'06/12/91') + +insert titles values ('PS7777', 'Emotional Security: A New Algorithm', 'psychology', +'0736', $7.99, $4000.00, 10, 3336, +'Protecting yourself and your loved ones from undue emotional stress in the modern world. Use of computer and nutritional aids emphasized.', +'06/12/91') + +insert titles values ('PS3333', 'Prolonged Data Deprivation: Four Case Studies', +'psychology', '0736', $19.99, $2000.00, 10, 4072, +'What happens when the data runs dry? Searching evaluations of information-shortage effects.', +'06/12/91') + +insert titles values ('BU1111', 'Cooking with Computers: Surreptitious Balance Sheets', +'business', '1389', $11.95, $5000.00, 10, 3876, +'Helpful hints on how to use your electronic resources to the best advantage.', +'06/09/91') + +insert titles values ('MC2222', 'Silicon Valley Gastronomic Treats', 'mod_cook', '0877', +$19.99, $0.00, 12, 2032, +'Favorite recipes for quick, easy, and elegant meals.', +'06/09/91') + +insert titles values ('TC7777', 'Sushi, Anyone?', 'trad_cook', '0877', $14.99, $8000.00, +10, 4095, +'Detailed instructions on how to make authentic Japanese sushi in your spare time.', +'06/12/91') + +insert titles values ('TC4203', 'Fifty Years in Buckingham Palace Kitchens', 'trad_cook', +'0877', $11.95, $4000.00, 14, 15096, +'More anecdotes from the Queen''s favorite cook describing life among English royalty. Recipes, techniques, tender vignettes.', +'06/12/91') + +insert titles values ('PC1035', 'But Is It User Friendly?', 'popular_comp', '1389', +$22.95, $7000.00, 16, 8780, +'A survey of software for the naive user, focusing on the ''friendliness'' of each.', +'06/30/91') + +insert titles values('BU2075', 'You Can Combat Computer Stress!', 'business', '0736', +$2.99, $10125.00, 24, 18722, +'The latest medical and psychological techniques for living with the electronic office. Easy-to-understand explanations.', +'06/30/91') + +insert titles values('PS2091', 'Is Anger the Enemy?', 'psychology', '0736', $10.95, +$2275.00, 12, 2045, +'Carefully researched study of the effects of strong emotions on the body. Metabolic charts included.', +'06/15/91') + +insert titles values('PS2106', 'Life Without Fear', 'psychology', '0736', $7.00, $6000.00, +10, 111, +'New exercise, meditation, and nutritional techniques that can reduce the shock of daily interactions. Popular audience. Sample menus included, exercise video available separately.', +'10/05/91') + +insert titles values('MC3021', 'The Gourmet Microwave', 'mod_cook', '0877', $2.99, +$15000.00, 24, 22246, +'Traditional French gourmet recipes adapted for modern microwave cooking.', +'06/18/91') + +insert titles values('TC3218', 'Onions, Leeks, and Garlic: Cooking Secrets of the Mediterranean', +'trad_cook', '0877', $20.95, $7000.00, 10, 375, +'Profusely illustrated in color, this makes a wonderful gift book for a cuisine-oriented friend.', +'10/21/91') + +insert titles (title_id, title, pub_id) values('MC3026', +'The Psychology of Computer Cooking', '0877') + +insert titles values ('BU7832', 'Straight Talk About Computers', 'business', '1389', +$19.99, $5000.00, 10, 4095, +'Annotated analysis of what computers can do for you: a no-hype guide for the critical user.', +'06/22/91') + +insert titles values('PS1372', 'Computer Phobic AND Non-Phobic Individuals: Behavior Variations', +'psychology', '0877', $21.59, $7000.00, 10, 375, +'A must for the specialist, this book examines the difference between those who hate and fear computers and those who don''t.', +'10/21/91') + +insert titles (title_id, title, type, pub_id, notes) values('PC9999', 'Net Etiquette', +'popular_comp', '1389', 'A must-read for computer conferencing.') + +GO + +raiserror('Now at the inserts to titleauthor ....',0,1) + +GO + +insert titleauthor values('409-56-7008', 'BU1032', 1, 60) +insert titleauthor values('486-29-1786', 'PS7777', 1, 100) +insert titleauthor values('486-29-1786', 'PC9999', 1, 100) +insert titleauthor values('712-45-1867', 'MC2222', 1, 100) +insert titleauthor values('172-32-1176', 'PS3333', 1, 100) +insert titleauthor values('213-46-8915', 'BU1032', 2, 40) +insert titleauthor values('238-95-7766', 'PC1035', 1, 100) +insert titleauthor values('213-46-8915', 'BU2075', 1, 100) +insert titleauthor values('998-72-3567', 'PS2091', 1, 50) +insert titleauthor values('899-46-2035', 'PS2091', 2, 50) +insert titleauthor values('998-72-3567', 'PS2106', 1, 100) +insert titleauthor values('722-51-5454', 'MC3021', 1, 75) +insert titleauthor values('899-46-2035', 'MC3021', 2, 25) +insert titleauthor values('807-91-6654', 'TC3218', 1, 100) +insert titleauthor values('274-80-9391', 'BU7832', 1, 100) +insert titleauthor values('427-17-2319', 'PC8888', 1, 50) +insert titleauthor values('846-92-7186', 'PC8888', 2, 50) +insert titleauthor values('756-30-7391', 'PS1372', 1, 75) +insert titleauthor values('724-80-9391', 'PS1372', 2, 25) +insert titleauthor values('724-80-9391', 'BU1111', 1, 60) +insert titleauthor values('267-41-2394', 'BU1111', 2, 40) +insert titleauthor values('672-71-3249', 'TC7777', 1, 40) +insert titleauthor values('267-41-2394', 'TC7777', 2, 30) +insert titleauthor values('472-27-2349', 'TC7777', 3, 30) +insert titleauthor values('648-92-1872', 'TC4203', 1, 100) + +GO + +raiserror('Now at the inserts to stores ....',0,1) + +GO + +insert stores values('7066','Barnum''s','567 Pasadena Ave.','Tustin','CA','92789') +insert stores values('7067','News & Brews','577 First St.','Los Gatos','CA','96745') +insert stores values('7131','Doc-U-Mat: Quality Laundry and Books', + '24-A Avogadro Way','Remulade','WA','98014') +insert stores values('8042','Bookbeat','679 Carson St.','Portland','OR','89076') +insert stores values('6380','Eric the Read Books','788 Catamaugus Ave.', + 'Seattle','WA','98056') +insert stores values('7896','Fricative Bookshop','89 Madison St.','Fremont','CA','90019') + +GO + +raiserror('Now at the inserts to sales ....',0,1) + +GO + +insert sales values('7066', 'QA7442.3', '09/13/94', 75, 'ON invoice','PS2091') +insert sales values('7067', 'D4482', '09/14/94', 10, 'Net 60','PS2091') +insert sales values('7131', 'N914008', '09/14/94', 20, 'Net 30','PS2091') +insert sales values('7131', 'N914014', '09/14/94', 25, 'Net 30','MC3021') +insert sales values('8042', '423LL922', '09/14/94', 15, 'ON invoice','MC3021') +insert sales values('8042', '423LL930', '09/14/94', 10, 'ON invoice','BU1032') +insert sales values('6380', '722a', '09/13/94', 3, 'Net 60','PS2091') +insert sales values('6380', '6871', '09/14/94', 5, 'Net 60','BU1032') +insert sales values('8042','P723', '03/11/93', 25, 'Net 30', 'BU1111') +insert sales values('7896','X999', '02/21/93', 35, 'ON invoice', 'BU2075') +insert sales values('7896','QQ2299', '10/28/93', 15, 'Net 60', 'BU7832') +insert sales values('7896','TQ456', '12/12/93', 10, 'Net 60', 'MC2222') +insert sales values('8042','QA879.1', '5/22/93', 30, 'Net 30', 'PC1035') +insert sales values('7066','A2976', '5/24/93', 50, 'Net 30', 'PC8888') +insert sales values('7131','P3087a', '5/29/93', 20, 'Net 60', 'PS1372') +insert sales values('7131','P3087a', '5/29/93', 25, 'Net 60', 'PS2106') +insert sales values('7131','P3087a', '5/29/93', 15, 'Net 60', 'PS3333') +insert sales values('7131','P3087a', '5/29/93', 25, 'Net 60', 'PS7777') +insert sales values('7067','P2121', '6/15/92', 40, 'Net 30', 'TC3218') +insert sales values('7067','P2121', '6/15/92', 20, 'Net 30', 'TC4203') +insert sales values('7067','P2121', '6/15/92', 20, 'Net 30', 'TC7777') + +GO + +raiserror('Now at the inserts to roysched ....',0,1) + +GO + +insert roysched values('BU1032', 0, 5000, 10) +insert roysched values('BU1032', 5001, 50000, 12) +insert roysched values('PC1035', 0, 2000, 10) +insert roysched values('PC1035', 2001, 3000, 12) +insert roysched values('PC1035', 3001, 4000, 14) +insert roysched values('PC1035', 4001, 10000, 16) +insert roysched values('PC1035', 10001, 50000, 18) +insert roysched values('BU2075', 0, 1000, 10) +insert roysched values('BU2075', 1001, 3000, 12) +insert roysched values('BU2075', 3001, 5000, 14) + +GO + +insert roysched values('BU2075', 5001, 7000, 16) +insert roysched values('BU2075', 7001, 10000, 18) +insert roysched values('BU2075', 10001, 12000, 20) +insert roysched values('BU2075', 12001, 14000, 22) +insert roysched values('BU2075', 14001, 50000, 24) +insert roysched values('PS2091', 0, 1000, 10) +insert roysched values('PS2091', 1001, 5000, 12) +insert roysched values('PS2091', 5001, 10000, 14) +insert roysched values('PS2091', 10001, 50000, 16) +insert roysched values('PS2106', 0, 2000, 10) + +GO + +insert roysched values('PS2106', 2001, 5000, 12) +insert roysched values('PS2106', 5001, 10000, 14) +insert roysched values('PS2106', 10001, 50000, 16) +insert roysched values('MC3021', 0, 1000, 10) +insert roysched values('MC3021', 1001, 2000, 12) +insert roysched values('MC3021', 2001, 4000, 14) +insert roysched values('MC3021', 4001, 6000, 16) +insert roysched values('MC3021', 6001, 8000, 18) +insert roysched values('MC3021', 8001, 10000, 20) +insert roysched values('MC3021', 10001, 12000, 22) + +GO + +insert roysched values('MC3021', 12001, 50000, 24) +insert roysched values('TC3218', 0, 2000, 10) +insert roysched values('TC3218', 2001, 4000, 12) +insert roysched values('TC3218', 4001, 6000, 14) +insert roysched values('TC3218', 6001, 8000, 16) +insert roysched values('TC3218', 8001, 10000, 18) +insert roysched values('TC3218', 10001, 12000, 20) +insert roysched values('TC3218', 12001, 14000, 22) +insert roysched values('TC3218', 14001, 50000, 24) +insert roysched values('PC8888', 0, 5000, 10) +insert roysched values('PC8888', 5001, 10000, 12) + +GO + +insert roysched values('PC8888', 10001, 15000, 14) +insert roysched values('PC8888', 15001, 50000, 16) +insert roysched values('PS7777', 0, 5000, 10) +insert roysched values('PS7777', 5001, 50000, 12) +insert roysched values('PS3333', 0, 5000, 10) +insert roysched values('PS3333', 5001, 10000, 12) +insert roysched values('PS3333', 10001, 15000, 14) +insert roysched values('PS3333', 15001, 50000, 16) +insert roysched values('BU1111', 0, 4000, 10) +insert roysched values('BU1111', 4001, 8000, 12) +insert roysched values('BU1111', 8001, 10000, 14) + +GO + +insert roysched values('BU1111', 12001, 16000, 16) +insert roysched values('BU1111', 16001, 20000, 18) +insert roysched values('BU1111', 20001, 24000, 20) +insert roysched values('BU1111', 24001, 28000, 22) +insert roysched values('BU1111', 28001, 50000, 24) +insert roysched values('MC2222', 0, 2000, 10) +insert roysched values('MC2222', 2001, 4000, 12) +insert roysched values('MC2222', 4001, 8000, 14) +insert roysched values('MC2222', 8001, 12000, 16) + +GO + +insert roysched values('MC2222', 12001, 20000, 18) +insert roysched values('MC2222', 20001, 50000, 20) +insert roysched values('TC7777', 0, 5000, 10) +insert roysched values('TC7777', 5001, 15000, 12) +insert roysched values('TC7777', 15001, 50000, 14) +insert roysched values('TC4203', 0, 2000, 10) +insert roysched values('TC4203', 2001, 8000, 12) +insert roysched values('TC4203', 8001, 16000, 14) +insert roysched values('TC4203', 16001, 24000, 16) +insert roysched values('TC4203', 24001, 32000, 18) + +GO + +insert roysched values('TC4203', 32001, 40000, 20) +insert roysched values('TC4203', 40001, 50000, 22) +insert roysched values('BU7832', 0, 5000, 10) +insert roysched values('BU7832', 5001, 10000, 12) +insert roysched values('BU7832', 10001, 15000, 14) +insert roysched values('BU7832', 15001, 20000, 16) +insert roysched values('BU7832', 20001, 25000, 18) +insert roysched values('BU7832', 25001, 30000, 20) +insert roysched values('BU7832', 30001, 35000, 22) +insert roysched values('BU7832', 35001, 50000, 24) + +GO + +insert roysched values('PS1372', 0, 10000, 10) +insert roysched values('PS1372', 10001, 20000, 12) +insert roysched values('PS1372', 20001, 30000, 14) +insert roysched values('PS1372', 30001, 40000, 16) +insert roysched values('PS1372', 40001, 50000, 18) + +GO + +raiserror('Now at the inserts to discounts ....',0,1) + +GO + +insert discounts values('Initial Customer', NULL, NULL, NULL, 10.5) +insert discounts values('Volume Discount', NULL, 100, 1000, 6.7) +insert discounts values('Customer Discount', '8042', NULL, NULL, 5.0) + +GO + +raiserror('Now at the inserts to jobs ....',0,1) + +GO + +insert jobs values ('New Hire - Job not specified', 10, 10) +insert jobs values ('Chief Executive Officer', 200, 250) +insert jobs values ('Business Operations Manager', 175, 225) +insert jobs values ('Chief Financial Officier', 175, 250) +insert jobs values ('Publisher', 150, 250) +insert jobs values ('Managing Editor', 140, 225) +insert jobs values ('Marketing Manager', 120, 200) +insert jobs values ('Public Relations Manager', 100, 175) +insert jobs values ('Acquisitions Manager', 75, 175) +insert jobs values ('Productions Manager', 75, 165) +insert jobs values ('Operations Manager', 75, 150) +insert jobs values ('Editor', 25, 100) +insert jobs values ('Sales Representative', 25, 100) +insert jobs values ('Designer', 25, 100) + +GO + +raiserror('Now at the inserts to employee ....',0,1) + +GO + +insert employee values ('PTC11962M', 'Philip', 'T', 'Cramer', 2, 215, '9952', '11/11/89') +insert employee values ('AMD15433F', 'Ann', 'M', 'Devon', 3, 200, '9952', '07/16/91') +insert employee values ('F-C16315M', 'Francisco', '', 'Chang', 4, 227, '9952', '11/03/90') +insert employee values ('LAL21447M', 'Laurence', 'A', 'Lebihan', 5, 175, '0736', '06/03/90') +insert employee values ('PXH22250M', 'Paul', 'X', 'Henriot', 5, 159, '0877', '08/19/93') +insert employee values ('SKO22412M', 'Sven', 'K', 'Ottlieb', 5, 150, '1389', '04/05/91') +insert employee values ('RBM23061F', 'Rita', 'B', 'Muller', 5, 198, '1622', '10/09/93') +insert employee values ('MJP25939M', 'Maria', 'J', 'Pontes', 5, 246, '1756', '03/01/89') +insert employee values ('JYL26161F', 'Janine', 'Y', 'Labrune', 5, 172, '9901', '05/26/91') +insert employee values ('CFH28514M', 'Carlos', 'F', 'Hernadez', 5, 211, '9999', '04/21/89') +insert employee values ('VPA30890F', 'Victoria', 'P', 'Ashworth', 6, 140, '0877', '09/13/90') +insert employee values ('L-B31947F', 'Lesley', '', 'Brown', 7, 120, '0877', '02/13/91') +insert employee values ('ARD36773F', 'Anabela', 'R', 'Domingues', 8, 100, '0877', '01/27/93') +insert employee values ('M-R38834F', 'Martine', '', 'Rance', 9, 75, '0877', '02/05/92') +insert employee values ('PHF38899M', 'Peter', 'H', 'Franken', 10, 75, '0877', '05/17/92') +insert employee values ('DBT39435M', 'Daniel', 'B', 'Tonini', 11, 75, '0877', '01/01/90') +insert employee values ('H-B39728F', 'Helen', '', 'Bennett', 12, 35, '0877', '09/21/89') +insert employee values ('PMA42628M', 'Paolo', 'M', 'Accorti', 13, 35, '0877', '08/27/92') +insert employee values ('ENL44273F', 'Elizabeth', 'N', 'Lincoln', 14, 35, '0877', '07/24/90') + +GO + +insert employee values ('MGK44605M', 'Matti', 'G', 'Karttunen', 6, 220, '0736', '05/01/94') +insert employee values ('PDI47470M', 'Palle', 'D', 'Ibsen', 7, 195, '0736', '05/09/93') +insert employee values ('MMS49649F', 'Mary', 'M', 'Saveley', 8, 175, '0736', '06/29/93') +insert employee values ('GHT50241M', 'Gary', 'H', 'Thomas', 9, 170, '0736', '08/09/88') +insert employee values ('MFS52347M', 'Martin', 'F', 'Sommer', 10, 165, '0736', '04/13/90') +insert employee values ('R-M53550M', 'Roland', '', 'Mendel', 11, 150, '0736', '09/05/91') +insert employee values ('HAS54740M', 'Howard', 'A', 'Snyder', 12, 100, '0736', '11/19/88') +insert employee values ('TPO55093M', 'Timothy', 'P', 'O''Rourke', 13, 100, '0736', '06/19/88') +insert employee values ('KFJ64308F', 'Karin', 'F', 'Josephs', 14, 100, '0736', '10/17/92') +insert employee values ('DWR65030M', 'Diego', 'W', 'Roel', 6, 192, '1389', '12/16/91') +insert employee values ('M-L67958F', 'Maria', '', 'Larsson', 7, 135, '1389', '03/27/92') +insert employee values ('PSP68661F', 'Paula', 'S', 'Parente', 8, 125, '1389', '01/19/94') +insert employee values ('MAS70474F', 'Margaret', 'A', 'Smith', 9, 78, '1389', '09/29/88') +insert employee values ('A-C71970F', 'Aria', '', 'Cruz', 10, 87, '1389', '10/26/91') +insert employee values ('MAP77183M', 'Miguel', 'A', 'Paolino', 11, 112, '1389', '12/07/92') +insert employee values ('Y-L77953M', 'Yoshi', '', 'Latimer', 12, 32, '1389', '06/11/89') +insert employee values ('CGS88322F', 'Carine', 'G', 'Schmitt', 13, 64, '1389', '07/07/92') +insert employee values ('PSA89086M', 'Pedro', 'S', 'Afonso', 14, 89, '1389', '12/24/90') +insert employee values ('A-R89858F', 'Annette', '', 'Roulet', 6, 152, '9999', '02/21/90') +insert employee values ('HAN90777M', 'Helvetius', 'A', 'Nagy', 7, 120, '9999', '03/19/93') +insert employee values ('M-P91209M', 'Manuel', '', 'Pereira', 8, 101, '9999', '01/09/89') +insert employee values ('KJJ92907F', 'Karla', 'J', 'Jablonski', 9, 170, '9999', '03/11/94') +insert employee values ('POK93028M', 'Pirkko', 'O', 'Koskitalo', 10, 80, '9999', '11/29/93') +insert employee values ('PCM98509F', 'Patricia', 'C', 'McKenna', 11, 150, '9999', '08/01/89') +GO + +raiserror('Now at the create index section ....',0,1) with nowait + +GO + +CREATE CLUSTERED INDEX employee_ind ON employee(lname, fname, minit) + +GO + +CREATE NONCLUSTERED INDEX aunmind ON authors (au_lname, au_fname) +GO +CREATE NONCLUSTERED INDEX titleidind ON sales (title_id) +GO +CREATE NONCLUSTERED INDEX titleind ON titles (title) +GO +CREATE NONCLUSTERED INDEX auidind ON titleauthor (au_id) +GO +CREATE NONCLUSTERED INDEX titleidind ON titleauthor (title_id) +GO +CREATE NONCLUSTERED INDEX titleidind ON roysched (title_id) +GO + +raiserror('Now at the create view section ....',0,1) + +GO + +CREATE VIEW titleview +AS +select title, au_ord, au_lname, price, ytd_sales, pub_id +from authors, titles, titleauthor +where authors.au_id = titleauthor.au_id + AND titles.title_id = titleauthor.title_id + +GO + +raiserror('Now at the create procedure section ....',0,1) + +GO + +CREATE PROCEDURE byroyalty @percentage int +AS +select au_id from titleauthor +where titleauthor.royaltyper = @percentage + +GO + +CREATE PROCEDURE reptq1 AS +select + case when grouping(pub_id) = 1 then 'ALL' else pub_id end as pub_id, + avg(price) as avg_price +from titles +where price is NOT NULL +group by pub_id with rollup +order by pub_id + +GO + +CREATE PROCEDURE reptq2 AS +select + case when grouping(type) = 1 then 'ALL' else type end as type, + case when grouping(pub_id) = 1 then 'ALL' else pub_id end as pub_id, + avg(ytd_sales) as avg_ytd_sales +from titles +where pub_id is NOT NULL +group by pub_id, type with rollup + +GO + +CREATE PROCEDURE reptq3 @lolimit money, @hilimit money, +@type char(12) +AS +select + case when grouping(pub_id) = 1 then 'ALL' else pub_id end as pub_id, + case when grouping(type) = 1 then 'ALL' else type end as type, + count(title_id) as cnt +from titles +where price >@lolimit AND price <@hilimit AND type = @type OR type LIKE '%cook%' +group by pub_id, type with rollup + +GO + +UPDATE STATISTICS publishers +UPDATE STATISTICS employee +UPDATE STATISTICS jobs +UPDATE STATISTICS pub_info +UPDATE STATISTICS titles +UPDATE STATISTICS authors +UPDATE STATISTICS titleauthor +UPDATE STATISTICS sales +UPDATE STATISTICS roysched +UPDATE STATISTICS stores +UPDATE STATISTICS discounts + +GO + +CHECKPOINT + +GO + +USE master + +GO + +CHECKPOINT + +GO + +declare @dttm varchar(55) +select @dttm=convert(varchar,getdate(),113) +raiserror('Ending InstPubs.SQL at %s ....',1,1,@dttm) with nowait + +GO +-- - + diff --git a/Beginning ASP.NET 3.5/readme.txt b/Beginning ASP.NET 3.5/readme.txt new file mode 100644 index 0000000..1f102d7 --- /dev/null +++ b/Beginning ASP.NET 3.5/readme.txt @@ -0,0 +1,159 @@ + +---------- +Readme.txt +---------- + +The examples are arranged by chapter. + +You can use most of the examples without any additional configuration. Just open +the application folder as a website in Visual Studio. Or, open the corresponding +solution (.sln) file. All the websites include solution files, except Chapter03 +and Chapter05. + +The following notes explain special considerations for some examples, such as +database setup instructions. + + + +--------- +Chapter 8 +--------- + +This website includes examples that write event log entries. Writing to an event +log requires elevated privileges. In Windows Vista, you must explicitly run +Visual Studio as an administrator (right-click the Visual Studio icon and +choose Run As Administrator). Otherwise, the event log code will fail with a +security error. + + + +---------- +Chapter 12 +---------- + +You can download the font used in the GDI+ drawing example (it's optional) at +http://www.fonttrader.com/detailed~name~Alba_Super~font~648.htm. + + + +------------------ +Chapter 15, 16, 17 +------------------ + +Most of the code in these websites requires SQL Server 7 or later. You must also +install the sample databases and configure the connection string. The following +sections explain how. + + +* Installing the Sample Databases +--------------------------------- +These examples use two sample databases: Northwind and Pubs. If you are using +SQL Server 7 or SQL Server 2000, these sample databases may be installed already. +If you are using a later version of SQL Server, they won't be installed. + +To install the sample databases, you can use the following SQL scripts: + +- Use InstNwnd.sql to install the Northwind database. +- Use InstPubs.sql to install the Pubs database. + +If you are using a full version of SQL Server, you can open these scripts and run +them using a graphical tool like SQL Server Management Studio. + +If you are using SQL Server 2005 Express Edition, you'll need to use the sqlcmd.exe +command-line tool. If you are using SQL Server 2005 Express Edition, you need a +command like this to install the Northwind database: + + sqlcmd -S localhost\SQLEXPRESS -i InstNwnd.sql + +If you are using a full version of SQL Server 2005 on the local computer, you need +a command like this: + + sqlcmd -i InstNwnd.sql + + +* Connection Strings +-------------------- +You may need to modify the connection strings depending on how what version of +SQL Server you're using and where it's installed. The connection strings are in +the web.config file of each application, in the section. + +By default, the connection strings assume you are using SQL Server 2005 +Express Edition. Here's an example: + + + + + +If you are using a full version of SQL Server, you'll need to remove the instance +name and use a connection string like this: + + + + + +If you are using a SQL Server instance on another computer, you'll need to use +the server name instead of localhost. Read Chapter 15 for more information. + +Finally, the ConnectionTester.aspx page in Chapter 15 includes a hard-coded +connection string. You need to modify the source code of that page to change it. + + + +----------------- +Chapter 21 and 22 +----------------- + +These examples in these chapters use the automatic file-creation option in +SQL Server 2005 to create the membership and profiles databases. As long as +you have SQL Server 2005 installed, the required database will be generated +automatically in the App_Data subdirectory. + +If you are using SQL Server 2005 Express Edition, no changes are needed. +If you are using the full edition of SQL Server, you need to manually +create a database for storing the membership and profile information using the +aspnet_regsql.exe command-line tool. You must then modify the connection string +to use this database. Chapter 21 explains this setup process. + + + +---------- +Chapter 23 +---------- + +The two websites provided for this chapter use custom components. +The easiest way to use these examples is to open the solution (.sln) file, which +opens both the website and the class library project in one Visual Studio window. There are two solution files: + +- ComponentTest.sln (the simple component) +- DatabaseComponentTest.sln (the AdBoard database component) + +Before using the DatabaseComponentTest website, you must create the AdBoard +database. You can use the InstAdboard.sql script with a graphical management tool +or the sqlcmd.exe command-line tool, as described in the "Chapter 15, 16, 17" +section. If you are using the full version of SQL Server (not SQL Server Express), +you also need to modify the connection string in the web.config file. + + + +---------- +Chapter 24 +---------- + +The database dependency examples require the Northwind database. The section +"Chapter 15, 16, 17" describes how to install this database. If you are using +the full version of SQL Server (not SQL Server Express), you also need to modify +the connection string in the web.config file. + + + +---------- +Chapter 25 +---------- + +The autocomplete text box example requires the Northwind database. The section +"Chapter 15, 16, 17" describes how to install this database. If you are using +the full version of SQL Server (not SQL Server Express), you also need to modify +the connection string in the web.config file. + diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..0409ee5 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,27 @@ +Freeware License, some rights reserved + +Copyright (c) 2007 Matthew MacDonald + +Permission is hereby granted, free of charge, to anyone obtaining a copy +of this software and associated documentation files (the "Software"), +to work with the Software within the limits of freeware distribution and fair use. +This includes the rights to use, copy, and modify the Software for personal use. +Users are also allowed and encouraged to submit corrections and modifications +to the Software for the benefit of other users. + +It is not allowed to reuse, modify, or redistribute the Software for +commercial use in any way, or for a users educational materials such as books +or blog articles without prior permission from the copyright holder. + +The above copyright notice and this permission notice need to be included +in all copies or substantial portions of the software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS OR APRESS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..2ca3cd7 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +#Apress Source Code + +This repository accompanies [*Beginning ASP.NET 3.5 in C# 2008*](http://www.apress.com/9781590598917) by Matthew MacDonald (Apress, 2007). + +![Cover image](9781590598917.jpg) + +Download the files as a zip using the green button, or clone the repository to your machine using Git. + +##Releases + +Release v1.0 corresponds to the code in the published book, without corrections or updates. + +##Contributions + +See the file Contributing.md for more information on how you can contribute to this repository. diff --git a/contributing.md b/contributing.md new file mode 100644 index 0000000..f6005ad --- /dev/null +++ b/contributing.md @@ -0,0 +1,14 @@ +# Contributing to Apress Source Code + +Copyright for Apress source code belongs to the author(s). However, under fair use you are encouraged to fork and contribute minor corrections and updates for the benefit of the author(s) and other readers. + +## How to Contribute + +1. Make sure you have a GitHub account. +2. Fork the repository for the relevant book. +3. Create a new branch on which to make your change, e.g. +`git checkout -b my_code_contribution` +4. Commit your change. Include a commit message describing the correction. Please note that if your commit message is not clear, the correction will not be accepted. +5. Submit a pull request. + +Thank you for your contribution! \ No newline at end of file