From d6b0341c9fa9a484ebd1afb3086e244100354bd3 Mon Sep 17 00:00:00 2001 From: jaimishpatel5 Date: Tue, 20 Sep 2016 18:39:49 +0530 Subject: [PATCH 1/9] v1 limited feature completed. --- .../jaimish_91/images/dafault.jpg | Bin 0 -> 5675 bytes .../GreetingsWebApp/jaimish_91/version1.aspx | 45 +++++++ .../jaimish_91/version1.aspx.cs | 87 +++++++++++++ .../jaimish_91/version1.aspx.designer.cs | 114 ++++++++++++++++++ 4 files changed, 246 insertions(+) create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/images/dafault.jpg create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version1.aspx create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version1.aspx.cs create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version1.aspx.designer.cs diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/images/dafault.jpg b/GreetingsWebApp/GreetingsWebApp/jaimish_91/images/dafault.jpg new file mode 100644 index 0000000000000000000000000000000000000000..98bc8003b7e2c07a696931842c751e0d42a68846 GIT binary patch literal 5675 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 R3x_W(9jJJycvNp@{tL-5ud)CD literal 0 HcmV?d00001 diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version1.aspx b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version1.aspx new file mode 100644 index 0000000..f2ff549 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version1.aspx @@ -0,0 +1,45 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="version1.aspx.cs" Inherits="GreetingsWebApp.jaimish_91.version1" %> + + + + + + + + +
+
+ + Choose a background color:
+

+ Choose a font:
+

+ Specify a numeric font size:
+

+ Choose a border style:
+

+

+ Enter the greeting text below:
+

+ +
+ + +
  +


+ +
+ +
+ + diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version1.aspx.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version1.aspx.cs new file mode 100644 index 0000000..2c4efea --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version1.aspx.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Drawing; + +namespace GreetingsWebApp.jaimish_91 +{ + public partial class version1 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + if (!this.IsPostBack) + { + // 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 = "images/dafault.jpg"; + } + } + protected void cmdUpdate_Click(object sender, EventArgs e) + { + // Update the color. + pnlCard.BackColor = Color.FromName(lstBackColor.SelectedItem.Text); + + // Update the font. + lblGreeting.Font.Name = lstFontName.SelectedItem.Text; + if (Int32.Parse(txtFontSize.Text) > 0) + { + lblGreeting.Font.Size = + FontUnit.Point(Int32.Parse(txtFontSize.Text)); + } + // Update the border style. This requires two conversion steps. + // First, the value of the list item is converted from a string + // into an integer. Next, the integer is converted to a value in + // the BorderStyle enumeration. + int borderValue = Int32.Parse(lstBorder.SelectedItem.Value); + pnlCard.BorderStyle = (BorderStyle)borderValue; + // Update the picture. + if (chkPicture.Checked) + { + imgDefault.Visible = true; + } + else + { + imgDefault.Visible = false; + } + // Set the text. + lblGreeting.Text = txtGreeting.Text; + } + } +} \ No newline at end of file diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version1.aspx.designer.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version1.aspx.designer.cs new file mode 100644 index 0000000..907baec --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version1.aspx.designer.cs @@ -0,0 +1,114 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GreetingsWebApp.jaimish_91 { + + + public partial class version1 { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// lstBackColor control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList lstBackColor; + + /// + /// lstFontName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList lstFontName; + + /// + /// txtFontSize control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtFontSize; + + /// + /// lstBorder control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RadioButtonList lstBorder; + + /// + /// chkPicture control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkPicture; + + /// + /// txtGreeting control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtGreeting; + + /// + /// cmdUpdate control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button cmdUpdate; + + /// + /// pnlCard control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel pnlCard; + + /// + /// lblGreeting control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblGreeting; + + /// + /// imgDefault control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image imgDefault; + } +} From 3f29ca39ac80d195670916d8b7424729affb1e18 Mon Sep 17 00:00:00 2001 From: jaimishpatel5 Date: Tue, 20 Sep 2016 18:53:14 +0530 Subject: [PATCH 2/9] v2 full features is completed. --- .../GreetingsWebApp/jaimish_91/version2.aspx | 45 +++++++ .../jaimish_91/version2.aspx.cs | 75 ++++++++++++ .../jaimish_91/version2.aspx.designer.cs | 114 ++++++++++++++++++ 3 files changed, 234 insertions(+) create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version2.aspx create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version2.aspx.cs create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version2.aspx.designer.cs diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version2.aspx b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version2.aspx new file mode 100644 index 0000000..4f7f319 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version2.aspx @@ -0,0 +1,45 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="version2.aspx.cs" Inherits="GreetingsWebApp.jaimish_91.version2" %> + + + + + + + + +
+
+ + Choose a background color:
+

+ Choose a font:
+

+ Specify a numeric font size:
+

+ Choose a border style:
+

+

+ Enter the greeting text below:
+

+ + + + +
  +


+ +
+
+
+ + diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version2.aspx.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version2.aspx.cs new file mode 100644 index 0000000..77268b1 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version2.aspx.cs @@ -0,0 +1,75 @@ +using System; +using System.Web.UI.WebControls; +using System.Drawing; +using System.Drawing.Text; +using System.ComponentModel; +using System; +using System.ComponentModel; +using System.ComponentModel.Design.Serialization; +using System.Globalization; +using System.Reflection; + +namespace GreetingsWebApp.jaimish_91 +{ + public partial class version2 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + InstalledFontCollection fonts = new InstalledFontCollection(); + if (!this.IsPostBack) + { + // Set color options. + string[] colorArray = Enum.GetNames(typeof(KnownColor)); + lstBackColor.DataSource = colorArray; + lstBackColor.DataBind(); + // Set font options. + 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 = "images/dafault.jpg"; + } + } + protected void cmdUpdate_Click(object sender, EventArgs e) + { + // Update the color. + pnlCard.BackColor = Color.FromName(lstBackColor.SelectedItem.Text); + + // Update the font. + lblGreeting.Font.Name = lstFontName.SelectedItem.Text; + if (Int32.Parse(txtFontSize.Text) > 0) + { + lblGreeting.Font.Size = + FontUnit.Point(Int32.Parse(txtFontSize.Text)); + } + // Update the border style. This requires two conversion steps. + // First, the value of the list item is converted from a string + // into an integer. Next, the integer is converted to a value in + // the BorderStyle enumeration. + // Find the appropriate TypeConverter for the BorderStyle enumeration. + TypeConverter converter =TypeDescriptor.GetConverter(typeof(BorderStyle)); + // Update the border style using the value from the converter. + pnlCard.BorderStyle = (BorderStyle)converter.ConvertFromString( + lstBorder.SelectedItem.Text); + // Update the picture. + if (chkPicture.Checked) + { + imgDefault.Visible = true; + } + else + { + imgDefault.Visible = false; + } + // Set the text. + lblGreeting.Text = txtGreeting.Text; + } + } +} \ No newline at end of file diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version2.aspx.designer.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version2.aspx.designer.cs new file mode 100644 index 0000000..1df3d1f --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version2.aspx.designer.cs @@ -0,0 +1,114 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GreetingsWebApp.jaimish_91 { + + + public partial class version2 { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// lstBackColor control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList lstBackColor; + + /// + /// lstFontName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList lstFontName; + + /// + /// txtFontSize control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtFontSize; + + /// + /// lstBorder control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RadioButtonList lstBorder; + + /// + /// chkPicture control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkPicture; + + /// + /// txtGreeting control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtGreeting; + + /// + /// cmdUpdate control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button cmdUpdate; + + /// + /// pnlCard control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel pnlCard; + + /// + /// lblGreeting control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblGreeting; + + /// + /// imgDefault control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image imgDefault; + } +} From 3c57b2555aa41bb3582510fb62503ebd41a43439 Mon Sep 17 00:00:00 2001 From: jaimishpatel5 Date: Tue, 20 Sep 2016 19:00:57 +0530 Subject: [PATCH 3/9] v3 multiview completed. --- .../GreetingsWebApp/jaimish_91/version3.aspx | 64 ++++++ .../jaimish_91/version3.aspx.cs | 122 +++++++++++ .../jaimish_91/version3.aspx.designer.cs | 195 ++++++++++++++++++ 3 files changed, 381 insertions(+) create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version3.aspx create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version3.aspx.cs create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version3.aspx.designer.cs diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version3.aspx b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version3.aspx new file mode 100644 index 0000000..8497e93 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version3.aspx @@ -0,0 +1,64 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="version3.aspx.cs" Inherits="GreetingsWebApp.jaimish_91.version3" %> + + + + + + + + +
+
+ +
  + + + 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/GreetingsWebApp/GreetingsWebApp/jaimish_91/version3.aspx.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version3.aspx.cs new file mode 100644 index 0000000..04bd7c5 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version3.aspx.cs @@ -0,0 +1,122 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +using System.Drawing; +using System.Drawing.Text; +using System.ComponentModel; + + +namespace GreetingsWebApp.jaimish_91 +{ + public partial class version3 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + InstalledFontCollection fonts = new InstalledFontCollection(); + if (!this.IsPostBack) + { + MultiView1.ActiveViewIndex = 0; + // Set color options. + string[] colorArray = Enum.GetNames(typeof(KnownColor)); + lstForeColor.DataSource = colorArray; + lstForeColor.DataBind(); + + string[] colorArray1 = Enum.GetNames(typeof(KnownColor)); + lstBackColor.DataSource = colorArray1; + lstBackColor.DataBind(); + // Set font options. + 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 = "images/dafault.jpg"; + } + } + protected void Button1_Click(object sender, EventArgs e) + { + MultiView1.SetActiveView(View2); + } + + protected void ControlChangedfore(object sender, EventArgs e) + { + pnlCard2.ForeColor = Color.FromName(lstForeColor.SelectedItem.Text); + + } + + protected void ControlChangedBack(object sender, EventArgs e) + { + pnlCard2.BackColor = Color.FromName(lstBackColor.SelectedItem.Text); + + } + + protected void ControlChangedBorder(object sender, EventArgs e) + { + TypeConverter converter = TypeDescriptor.GetConverter(typeof(BorderStyle)); + pnlCard2.BorderStyle = (BorderStyle)converter.ConvertFromString( + lstBorder.SelectedItem.Text); + + } + + protected void ControlChangedPicture(object sender, EventArgs e) + { + if (chkPicture.Checked) + { + imgDefault.Visible = true; + } + else + { + imgDefault.Visible = false; + } + + } + + protected void ControlChangedFontName(object sender, EventArgs e) + { + lblGreeting.Font.Name = lstFontName.SelectedItem.Text; + + } + + protected void ControlChangedFontSize(object sender, EventArgs e) + { + + if (Int32.Parse(txtFontSize.Text) > 0) + { + lblGreeting.Font.Size = + FontUnit.Point(Int32.Parse(txtFontSize.Text)); + } + } + + protected void ControlChangedTxtGreeting(object sender, EventArgs e) + { + lblGreeting.Text = txtGreeting.Text; + + } + + protected void Button2_Click(object sender, EventArgs e) + { + MultiView1.SetActiveView(View1); + } + + protected void Button3_Click(object sender, EventArgs e) + { + MultiView1.SetActiveView(View3); + } + + protected void Button4_Click(object sender, EventArgs e) + { + MultiView1.SetActiveView(View2); + } + } +} \ No newline at end of file diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version3.aspx.designer.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version3.aspx.designer.cs new file mode 100644 index 0000000..c2da7d2 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version3.aspx.designer.cs @@ -0,0 +1,195 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GreetingsWebApp.jaimish_91 { + + + public partial class version3 { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PnlCard1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel PnlCard1; + + /// + /// MultiView1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.MultiView MultiView1; + + /// + /// View1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.View View1; + + /// + /// lstForeColor control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList lstForeColor; + + /// + /// lstBackColor control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList lstBackColor; + + /// + /// Button1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button Button1; + + /// + /// View2 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.View View2; + + /// + /// lstBorder control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RadioButtonList lstBorder; + + /// + /// chkPicture control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkPicture; + + /// + /// Button2 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button Button2; + + /// + /// Button3 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button Button3; + + /// + /// View3 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.View View3; + + /// + /// lstFontName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList lstFontName; + + /// + /// txtFontSize control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtFontSize; + + /// + /// txtGreeting control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtGreeting; + + /// + /// Button4 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button Button4; + + /// + /// pnlCard2 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel pnlCard2; + + /// + /// lblGreeting control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblGreeting; + + /// + /// imgDefault control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image imgDefault; + } +} From 68e528f7f798aaba12b78351bed639143a837e74 Mon Sep 17 00:00:00 2001 From: jaimishpatel5 Date: Tue, 20 Sep 2016 19:07:06 +0530 Subject: [PATCH 4/9] v4 wizard completed. --- .../GreetingsWebApp/jaimish_91/version4.aspx | 57 ++++++++ .../jaimish_91/version4.aspx.cs | 78 +++++++++++ .../jaimish_91/version4.aspx.designer.cs | 123 ++++++++++++++++++ 3 files changed, 258 insertions(+) create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version4.aspx create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version4.aspx.cs create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version4.aspx.designer.cs diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version4.aspx b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version4.aspx new file mode 100644 index 0000000..3064789 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version4.aspx @@ -0,0 +1,57 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="version4.aspx.cs" Inherits="GreetingsWebApp.jaimish_91.version4" %> + + + + + + + + +
+
+ + + + 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/GreetingsWebApp/GreetingsWebApp/jaimish_91/version4.aspx.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version4.aspx.cs new file mode 100644 index 0000000..2112f68 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version4.aspx.cs @@ -0,0 +1,78 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +using System.Drawing; +using System.Drawing.Text; +using System.ComponentModel; +namespace GreetingsWebApp.jaimish_91 +{ + public partial class version4 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + InstalledFontCollection fonts = new InstalledFontCollection(); + if (!this.IsPostBack) + { + string[] colorArray = Enum.GetNames(typeof(KnownColor)); + lstForeColor.DataSource = colorArray; + lstForeColor.DataBind(); + // Set color options. + string[] colorArray1 = Enum.GetNames(typeof(KnownColor)); + lstBackColor.DataSource = colorArray1; + lstBackColor.DataBind(); + // Set font options. + 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 = "images/dafault.jpg"; + } + } + protected void Wizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e) + { + pnlCard.BackColor = Color.FromName(lstBackColor.SelectedItem.Text); + + pnlCard.ForeColor = Color.FromName(lstForeColor.SelectedItem.Text); + // Update the font. + lblGreeting.Font.Name = lstFontName.SelectedItem.Text; + if (Int32.Parse(txtFontSize.Text) > 0) + { + lblGreeting.Font.Size = + FontUnit.Point(Int32.Parse(txtFontSize.Text)); + } + // Update the border style. This requires two conversion steps. + // First, the value of the list item is converted from a string + // into an integer. Next, the integer is converted to a value in + // the BorderStyle enumeration. + // Find the appropriate TypeConverter for the BorderStyle enumeration. + TypeConverter converter = + TypeDescriptor.GetConverter(typeof(BorderStyle)); + // Update the border style using the value from the converter. + pnlCard.BorderStyle = (BorderStyle)converter.ConvertFromString( + lstBorder.SelectedItem.Text); + // Update the picture. + if (chkPicture.Checked) + { + imgDefault.Visible = true; + } + else + { + imgDefault.Visible = false; + } + // Set the text. + lblGreeting.Text = txtGreeting.Text; + } + } +} \ No newline at end of file diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version4.aspx.designer.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version4.aspx.designer.cs new file mode 100644 index 0000000..4e370cf --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version4.aspx.designer.cs @@ -0,0 +1,123 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GreetingsWebApp.jaimish_91 { + + + public partial class version4 { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// Wizard1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Wizard Wizard1; + + /// + /// lstForeColor control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList lstForeColor; + + /// + /// lstBackColor control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList lstBackColor; + + /// + /// lstBorder control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RadioButtonList lstBorder; + + /// + /// chkPicture control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkPicture; + + /// + /// lstFontName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList lstFontName; + + /// + /// txtFontSize control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtFontSize; + + /// + /// txtGreeting control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtGreeting; + + /// + /// pnlCard control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel pnlCard; + + /// + /// lblGreeting control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblGreeting; + + /// + /// imgDefault control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image imgDefault; + } +} From ef3195f87b756c74dfdec3c5d65b78b5dc845c2c Mon Sep 17 00:00:00 2001 From: jaimishpatel5 Date: Tue, 20 Sep 2016 19:26:41 +0530 Subject: [PATCH 5/9] v5 viewstate completed. --- .../GreetingsWebApp/jaimish_91/version5.aspx | 47 +++++++ .../jaimish_91/version5.aspx.cs | 106 +++++++++++++++ .../jaimish_91/version5.aspx.designer.cs | 123 ++++++++++++++++++ 3 files changed, 276 insertions(+) create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version5.aspx create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version5.aspx.cs create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version5.aspx.designer.cs diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version5.aspx b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version5.aspx new file mode 100644 index 0000000..a5b1941 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version5.aspx @@ -0,0 +1,47 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="version5.aspx.cs" Inherits="GreetingsWebApp.jaimish_91.version5" %> + + + + + + + + +
+
+ + Choose a background color:
+

+ Choose a font:
+

+ Specify a numeric font size:
+

+ Choose a border style:
+

+

+ Enter the greeting text below:
+

+   + + + + +
  +


+ +
+
+
+ + diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version5.aspx.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version5.aspx.cs new file mode 100644 index 0000000..17af12b --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version5.aspx.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Drawing; +using System.Drawing.Text; +using System.ComponentModel; + +namespace GreetingsWebApp.jaimish_91 +{ + public partial class version5 : System.Web.UI.Page + { + private string backcolor, fontname, borderstyle, greetingtext; + private Int32 fontsize; + protected void cmdSave_Click(object sender, EventArgs e) + { + backcolor = lstBackColor.SelectedItem.Text; + fontname = lstFontName.SelectedItem.Text; + fontsize = Int32.Parse(txtFontSize.Text); + borderstyle = lstBorder.SelectedItem.Text; + greetingtext = txtGreeting.Text; + + } + protected void Page_Load(object sender, EventArgs e) + { + InstalledFontCollection fonts = new InstalledFontCollection(); + if (!this.IsPostBack) + { + + // Set color options. + string[] colorArray = Enum.GetNames(typeof(KnownColor)); + lstBackColor.DataSource = colorArray; + lstBackColor.DataBind(); + // Set font options. + 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 = "images/dafault.jpg"; + } + else + { + backcolor = (string)ViewState["backcolor"]; + fontname = (string)ViewState["fontname"]; + fontsize = (Int32)ViewState["fontsize"]; + borderstyle = (string)ViewState["borderstyle"]; + greetingtext = (string)ViewState["greetingtext"]; + } + } + protected void Page_PreRender(object sender, EventArgs e) + { + ViewState["backcolor"] = backcolor; + ViewState["fontname"] = fontname; + ViewState["fontsize"] = fontsize; + ViewState["borderstyle"] = borderstyle; + ViewState["greetingtext"] = greetingtext; + + } + + protected void cmdUpdate_Click(object sender, EventArgs e) + { + pnlCard.BackColor = Color.FromName(backcolor); + + // Update the font. + lblGreeting.Font.Name = fontname; + if (Int32.Parse(txtFontSize.Text) > 0) + { + lblGreeting.Font.Size = + FontUnit.Point(fontsize); + } + // Update the border style. This requires two conversion steps. + // First, the value of the list item is converted from a string + // into an integer. Next, the integer is converted to a value in + // the BorderStyle enumeration. + // Find the appropriate TypeConverter for the BorderStyle enumeration. + TypeConverter converter = + TypeDescriptor.GetConverter(typeof(BorderStyle)); + // Update the border style using the value from the converter. + pnlCard.BorderStyle = (BorderStyle)converter.ConvertFromString(borderstyle); + // Update the picture. + if (chkPicture.Checked) + { + imgDefault.Visible = true; + } + else + { + imgDefault.Visible = false; + } + // Set the text. + lblGreeting.Text = greetingtext; + } + + + + } +} \ No newline at end of file diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version5.aspx.designer.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version5.aspx.designer.cs new file mode 100644 index 0000000..0b3b262 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version5.aspx.designer.cs @@ -0,0 +1,123 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GreetingsWebApp.jaimish_91 { + + + public partial class version5 { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// lstBackColor control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList lstBackColor; + + /// + /// lstFontName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList lstFontName; + + /// + /// txtFontSize control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtFontSize; + + /// + /// lstBorder control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RadioButtonList lstBorder; + + /// + /// chkPicture control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkPicture; + + /// + /// txtGreeting control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtGreeting; + + /// + /// cmdSave control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button cmdSave; + + /// + /// cmdUpdate control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button cmdUpdate; + + /// + /// pnlCard control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel pnlCard; + + /// + /// lblGreeting control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblGreeting; + + /// + /// imgDefault control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image imgDefault; + } +} From 0e38ccaae84adfff6f59d158a27a3fda1ff27a9a Mon Sep 17 00:00:00 2001 From: jaimishpatel5 Date: Tue, 20 Sep 2016 19:50:14 +0530 Subject: [PATCH 6/9] v6 cross page posting completed. --- .../jaimish_91/version2.aspx.cs | 2 - .../GreetingsWebApp/jaimish_91/version6.aspx | 33 +++++++ .../jaimish_91/version6.aspx.cs | 40 +++++++++ .../jaimish_91/version6.aspx.designer.cs | 87 +++++++++++++++++++ .../GreetingsWebApp/jaimish_91/version61.aspx | 25 ++++++ .../jaimish_91/version61.aspx.cs | 68 +++++++++++++++ .../jaimish_91/version61.aspx.designer.cs | 51 +++++++++++ 7 files changed, 304 insertions(+), 2 deletions(-) create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version6.aspx create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version6.aspx.cs create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version6.aspx.designer.cs create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version61.aspx create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version61.aspx.cs create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version61.aspx.designer.cs diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version2.aspx.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version2.aspx.cs index 77268b1..a9d4268 100644 --- a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version2.aspx.cs +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version2.aspx.cs @@ -3,8 +3,6 @@ using System.Drawing; using System.Drawing.Text; using System.ComponentModel; -using System; -using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Globalization; using System.Reflection; diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version6.aspx b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version6.aspx new file mode 100644 index 0000000..18455f1 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version6.aspx @@ -0,0 +1,33 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="version6.aspx.cs" Inherits="GreetingsWebApp.jaimish_91.version6" %> + + + + + + + + +
+
+ + Choose a background color:
+

+ Choose a font:
+

+ Specify a numeric font size:
+

+ Choose a border style:
+

+

+ Enter the greeting text below:
+

+ +
+
+ + diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version6.aspx.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version6.aspx.cs new file mode 100644 index 0000000..c4b9fac --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version6.aspx.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Drawing; +using System.Drawing.Text; +using System.ComponentModel; +namespace GreetingsWebApp.jaimish_91 +{ + public partial class version6 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + InstalledFontCollection fonts = new InstalledFontCollection(); + if (!this.IsPostBack) + { + // Set color options. + string[] colorArray = Enum.GetNames(typeof(KnownColor)); + lstBackColor.DataSource = colorArray; + lstBackColor.DataBind(); + // Set font options. + 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. + + } + } + } +} \ No newline at end of file diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version6.aspx.designer.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version6.aspx.designer.cs new file mode 100644 index 0000000..80c3282 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version6.aspx.designer.cs @@ -0,0 +1,87 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GreetingsWebApp.jaimish_91 { + + + public partial class version6 { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// lstBackColor control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList lstBackColor; + + /// + /// lstFontName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList lstFontName; + + /// + /// txtFontSize control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtFontSize; + + /// + /// lstBorder control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RadioButtonList lstBorder; + + /// + /// chkPicture control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkPicture; + + /// + /// txtGreeting control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtGreeting; + + /// + /// cmdUpdate control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button cmdUpdate; + } +} diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version61.aspx b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version61.aspx new file mode 100644 index 0000000..92e6f87 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version61.aspx @@ -0,0 +1,25 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="version61.aspx.cs" Inherits="GreetingsWebApp.jaimish_91.version61" %> + + + + + + + + +
+
+ + +
  +


+ +
+
+
+ + diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version61.aspx.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version61.aspx.cs new file mode 100644 index 0000000..25f54e0 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version61.aspx.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Drawing; +using System.Drawing.Text; +using System.ComponentModel; +namespace GreetingsWebApp.jaimish_91 +{ + public partial class version61 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + TextBox t1, t2; + RadioButtonList r1; + DropDownList d1, d2; + CheckBox c1; + if (PreviousPage != null && PreviousPage.IsCrossPagePostBack) + { + d1 = (DropDownList)PreviousPage.FindControl("lstBackColor"); + + d2 = (DropDownList)PreviousPage.FindControl("lstFontName"); + t1 = (TextBox)PreviousPage.FindControl("txtFontSize"); + + t2 = (TextBox)PreviousPage.FindControl("txtGreeting"); + r1 = (RadioButtonList)PreviousPage.FindControl("lstBorder"); + c1 = (CheckBox)PreviousPage.FindControl("chkPicture"); + + + imgDefault.ImageUrl = "images/dafault.jpg"; + pnlCard.BackColor = Color.FromName(d1.SelectedItem.Text); + + // Update the font. + lblGreeting.Font.Name = d2.SelectedItem.Text; + if (Int32.Parse(t1.Text) > 0) + { + lblGreeting.Font.Size = + FontUnit.Point(Int32.Parse(t1.Text)); + } + // Update the border style. This requires two conversion steps. + // First, the value of the list item is converted from a string + // into an integer. Next, the integer is converted to a value in + // the BorderStyle enumeration. + // Find the appropriate TypeConverter for the BorderStyle enumeration. + TypeConverter converter = + TypeDescriptor.GetConverter(typeof(BorderStyle)); + // Update the border style using the value from the converter. + pnlCard.BorderStyle = (BorderStyle)converter.ConvertFromString( + r1.SelectedItem.Text); + // Update the picture. + if (c1.Checked) + { + imgDefault.Visible = true; + } + else + { + imgDefault.Visible = false; + } + // Set the text. + lblGreeting.Text = t2.Text; + + + } + } + } +} \ No newline at end of file diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version61.aspx.designer.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version61.aspx.designer.cs new file mode 100644 index 0000000..e7c6235 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version61.aspx.designer.cs @@ -0,0 +1,51 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GreetingsWebApp.jaimish_91 { + + + public partial class version61 { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// pnlCard control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel pnlCard; + + /// + /// lblGreeting control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblGreeting; + + /// + /// imgDefault control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image imgDefault; + } +} From b798cb1efe0b55c70ed1066d4f508fd8cca46502 Mon Sep 17 00:00:00 2001 From: jaimishpatel5 Date: Tue, 20 Sep 2016 20:03:13 +0530 Subject: [PATCH 7/9] v7 Query srting is completed. --- .../GreetingsWebApp/jaimish_91/version7.aspx | 34 ++++++++ .../jaimish_91/version7.aspx.cs | 53 +++++++++++ .../jaimish_91/version7.aspx.designer.cs | 87 +++++++++++++++++++ .../GreetingsWebApp/jaimish_91/version71.aspx | 25 ++++++ .../jaimish_91/version71.aspx.cs | 60 +++++++++++++ .../jaimish_91/version71.aspx.designer.cs | 51 +++++++++++ 6 files changed, 310 insertions(+) create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version7.aspx create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version7.aspx.cs create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version7.aspx.designer.cs create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version71.aspx create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version71.aspx.cs create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version71.aspx.designer.cs diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version7.aspx b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version7.aspx new file mode 100644 index 0000000..17694bc --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version7.aspx @@ -0,0 +1,34 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="version7.aspx.cs" Inherits="GreetingsWebApp.jaimish_91.version7" %> + + + + + + + + +
+
+ + Choose a background color:
+

+ Choose a font:
+

+ Specify a numeric font size:
+

+ Choose a border style:
+

+

+ Enter the greeting text below:
+

+ +
+
+ + diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version7.aspx.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version7.aspx.cs new file mode 100644 index 0000000..40caab1 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version7.aspx.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Drawing; +using System.Drawing.Text; +using System.ComponentModel; + +namespace GreetingsWebApp.jaimish_91 +{ + public partial class version7 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + InstalledFontCollection fonts = new InstalledFontCollection(); + if (!this.IsPostBack) + { + // Set color options. + string[] colorArray = Enum.GetNames(typeof(KnownColor)); + lstBackColor.DataSource = colorArray; + lstBackColor.DataBind(); + // Set font options. + 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. + + } + } + protected void cmdUpdate_Click(object sender, EventArgs e) + { + string s1, s2, s3, s4, s5; + bool s6; + s1 = lstBackColor.SelectedItem.Text; + s2 = lstFontName.SelectedItem.Text; + s3 = lstBorder.SelectedItem.Text; + s4 = txtFontSize.Text; + s5 = txtGreeting.Text; + s6 = chkPicture.Checked; + Response.Redirect("version71.aspx?val1=" + s1 + "&val2=" + s2 + "&val3=" + s3 + "&val4=" + s4 + "&val5=" + s5 + "&val6=" + s6); + } + } +} \ No newline at end of file diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version7.aspx.designer.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version7.aspx.designer.cs new file mode 100644 index 0000000..19ea91e --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version7.aspx.designer.cs @@ -0,0 +1,87 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GreetingsWebApp.jaimish_91 { + + + public partial class version7 { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// lstBackColor control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList lstBackColor; + + /// + /// lstFontName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList lstFontName; + + /// + /// txtFontSize control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtFontSize; + + /// + /// lstBorder control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RadioButtonList lstBorder; + + /// + /// chkPicture control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkPicture; + + /// + /// txtGreeting control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtGreeting; + + /// + /// cmdUpdate control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button cmdUpdate; + } +} diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version71.aspx b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version71.aspx new file mode 100644 index 0000000..1f15166 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version71.aspx @@ -0,0 +1,25 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="version71.aspx.cs" Inherits="GreetingsWebApp.jaimish_91.version71" %> + + + + + + + + +
+
+ + +
  +


+ +
+
+
+ + diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version71.aspx.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version71.aspx.cs new file mode 100644 index 0000000..036e422 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version71.aspx.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Drawing; +using System.Drawing.Text; +using System.ComponentModel; + +namespace GreetingsWebApp.jaimish_91 +{ + public partial class version71 : System.Web.UI.Page + { + string s1, s2, s3, s4, s5, s6; + protected void Page_Load(object sender, EventArgs e) + { + s1 = Request.QueryString["val1"].ToString(); + + s2 = Request.QueryString["val2"].ToString(); + + s3 = Request.QueryString["val3"].ToString(); + + s4 = Request.QueryString["val4"].ToString(); + + s5 = Request.QueryString["val5"].ToString(); + s6 = Request.QueryString["val6"].ToString(); + pnlCard.BackColor = Color.FromName(s1); + imgDefault.ImageUrl = "images/dafault.jpg"; + // Update the font. + lblGreeting.Font.Name = s2; + if (Int32.Parse(s4) > 0) + { + lblGreeting.Font.Size = + FontUnit.Point(Int32.Parse(s4)); + } + // Update the border style. This requires two conversion steps. + // First, the value of the list item is converted from a string + // into an integer. Next, the integer is converted to a value in + // the BorderStyle enumeration. + // Find the appropriate TypeConverter for the BorderStyle enumeration. + TypeConverter converter = + TypeDescriptor.GetConverter(typeof(BorderStyle)); + // Update the border style using the value from the converter. + pnlCard.BorderStyle = (BorderStyle)converter.ConvertFromString( + s3); + // Update the picture. + if (s6 == "True") + { + imgDefault.Visible = true; + } + else + { + imgDefault.Visible = false; + } + // Set the text. + lblGreeting.Text = s5; + } + } +} \ No newline at end of file diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version71.aspx.designer.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version71.aspx.designer.cs new file mode 100644 index 0000000..81ffa57 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version71.aspx.designer.cs @@ -0,0 +1,51 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GreetingsWebApp.jaimish_91 { + + + public partial class version71 { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// pnlCard control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel pnlCard; + + /// + /// lblGreeting control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblGreeting; + + /// + /// imgDefault control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image imgDefault; + } +} From 0a4e4aacd875292743bb2cabd4f5c16c9e431268 Mon Sep 17 00:00:00 2001 From: jaimishpatel5 Date: Tue, 20 Sep 2016 20:10:40 +0530 Subject: [PATCH 8/9] v8 cookie version is completed. --- .../GreetingsWebApp/jaimish_91/version8.aspx | 34 ++++++++ .../jaimish_91/version8.aspx.cs | 59 +++++++++++++ .../jaimish_91/version8.aspx.designer.cs | 87 +++++++++++++++++++ .../GreetingsWebApp/jaimish_91/version81.aspx | 25 ++++++ .../jaimish_91/version81.aspx.cs | 61 +++++++++++++ .../jaimish_91/version81.aspx.designer.cs | 51 +++++++++++ 6 files changed, 317 insertions(+) create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version8.aspx create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version8.aspx.cs create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version8.aspx.designer.cs create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version81.aspx create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version81.aspx.cs create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version81.aspx.designer.cs diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version8.aspx b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version8.aspx new file mode 100644 index 0000000..f9da227 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version8.aspx @@ -0,0 +1,34 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="version8.aspx.cs" Inherits="GreetingsWebApp.jaimish_91.version8" %> + + + + + + + + +
+
+ + Choose a background color:
+

+ Choose a font:
+

+ Specify a numeric font size:
+

+ Choose a border style:
+

+

+ Enter the greeting text below:
+

+ +
+
+ + diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version8.aspx.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version8.aspx.cs new file mode 100644 index 0000000..d1b7ea2 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version8.aspx.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +using System.Drawing; +using System.Drawing.Text; +using System.ComponentModel; + +namespace GreetingsWebApp.jaimish_91 +{ + public partial class version8 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + InstalledFontCollection fonts = new InstalledFontCollection(); + if (!this.IsPostBack) + { + // Set color options. + string[] colorArray = Enum.GetNames(typeof(KnownColor)); + lstBackColor.DataSource = colorArray; + lstBackColor.DataBind(); + // Set font options. + 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. + + } + } + protected void cmdUpdate_Click(object sender, EventArgs e) + { + HttpCookie Cookie = Request.Cookies["Attributes"]; + if (Cookie == null) + { + Cookie = new HttpCookie("Attributes"); + } + Cookie["backcolor"] = lstBackColor.SelectedItem.Text; + Cookie["fontname"] = lstFontName.SelectedItem.Text; + Cookie["fontsize"] = txtFontSize.Text; + Cookie["borderstyle"] = lstBorder.SelectedItem.Text; + Cookie["greetingtext"] = txtGreeting.Text; + Cookie["chkpic"] = chkPicture.Checked.ToString(); + Cookie.Expires = DateTime.Now.AddYears(1); + Response.Cookies.Add(Cookie); + Response.Redirect("version81.aspx"); + } + } +} \ No newline at end of file diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version8.aspx.designer.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version8.aspx.designer.cs new file mode 100644 index 0000000..bed1c6f --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version8.aspx.designer.cs @@ -0,0 +1,87 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GreetingsWebApp.jaimish_91 { + + + public partial class version8 { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// lstBackColor control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList lstBackColor; + + /// + /// lstFontName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList lstFontName; + + /// + /// txtFontSize control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtFontSize; + + /// + /// lstBorder control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RadioButtonList lstBorder; + + /// + /// chkPicture control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkPicture; + + /// + /// txtGreeting control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtGreeting; + + /// + /// cmdUpdate control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button cmdUpdate; + } +} diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version81.aspx b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version81.aspx new file mode 100644 index 0000000..760287b --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version81.aspx @@ -0,0 +1,25 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="version81.aspx.cs" Inherits="GreetingsWebApp.jaimish_91.version81" %> + + + + + + + + +
+
+ + +
  +


+ +
+
+
+ + diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version81.aspx.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version81.aspx.cs new file mode 100644 index 0000000..c51c490 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version81.aspx.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +using System.Drawing; +using System.Drawing.Text; +using System.ComponentModel; + + +namespace GreetingsWebApp.jaimish_91 +{ + public partial class version81 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + HttpCookie Cookie = Request.Cookies["Attributes"]; + if (Cookie == null) + { + Response.Redirect("GreetingCardMaker_version8.aspx"); + } + else + { + imgDefault.ImageUrl = "images/dafault.jpg"; + pnlCard.BackColor = Color.FromName(Cookie["backcolor"]); + + // Update the font. + lblGreeting.Font.Name = Cookie["fontname"]; + if (Int32.Parse(Cookie["fontsize"]) > 0) + { + lblGreeting.Font.Size = + FontUnit.Point(Int32.Parse(Cookie["fontsize"])); + } + // Update the border style. This requires two conversion steps. + // First, the value of the list item is converted from a string + // into an integer. Next, the integer is converted to a value in + // the BorderStyle enumeration. + // Find the appropriate TypeConverter for the BorderStyle enumeration. + TypeConverter converter = + TypeDescriptor.GetConverter(typeof(BorderStyle)); + // Update the border style using the value from the converter. + pnlCard.BorderStyle = (BorderStyle)converter.ConvertFromString( + Cookie["borderstyle"]); + // Update the picture. + if (Cookie["chkpic"] == "True") + { + imgDefault.Visible = true; + } + else + { + imgDefault.Visible = false; + } + // Set the text. + lblGreeting.Text = Cookie["greetingtext"]; + + } + } + } +} \ No newline at end of file diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version81.aspx.designer.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version81.aspx.designer.cs new file mode 100644 index 0000000..f8cda10 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version81.aspx.designer.cs @@ -0,0 +1,51 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GreetingsWebApp.jaimish_91 { + + + public partial class version81 { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// pnlCard control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel pnlCard; + + /// + /// lblGreeting control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblGreeting; + + /// + /// imgDefault control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image imgDefault; + } +} From 5d948d67c5139c7f9e20d4f86381c3ecfaa92afa Mon Sep 17 00:00:00 2001 From: jaimishpatel5 Date: Tue, 20 Sep 2016 20:21:11 +0530 Subject: [PATCH 9/9] v9 session version is completed. --- .../GreetingsWebApp/jaimish_91/version9.aspx | 34 ++++++++ .../jaimish_91/version9.aspx.cs | 53 +++++++++++ .../jaimish_91/version9.aspx.designer.cs | 87 +++++++++++++++++++ .../GreetingsWebApp/jaimish_91/version91.aspx | 25 ++++++ .../jaimish_91/version91.aspx.cs | 53 +++++++++++ .../jaimish_91/version91.aspx.designer.cs | 51 +++++++++++ 6 files changed, 303 insertions(+) create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version9.aspx create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version9.aspx.cs create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version9.aspx.designer.cs create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version91.aspx create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version91.aspx.cs create mode 100644 GreetingsWebApp/GreetingsWebApp/jaimish_91/version91.aspx.designer.cs diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version9.aspx b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version9.aspx new file mode 100644 index 0000000..95204aa --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version9.aspx @@ -0,0 +1,34 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="version9.aspx.cs" Inherits="GreetingsWebApp.jaimish_91.version9" %> + + + + + + + + +
+
+ + Choose a background color:
+

+ Choose a font:
+

+ Specify a numeric font size:
+

+ Choose a border style:
+

+

+ Enter the greeting text below:
+

+ +
+
+ + diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version9.aspx.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version9.aspx.cs new file mode 100644 index 0000000..1ec04e9 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version9.aspx.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Drawing; +using System.Drawing.Text; +using System.ComponentModel; +using System.Net; + +namespace GreetingsWebApp.jaimish_91 +{ + public partial class version9 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + InstalledFontCollection fonts = new InstalledFontCollection(); + if (!this.IsPostBack) + { + // Set color options. + string[] colorArray = Enum.GetNames(typeof(KnownColor)); + lstBackColor.DataSource = colorArray; + lstBackColor.DataBind(); + // Set font options. + 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. + + } + } + protected void cmdUpdate_Click(object sender, EventArgs e) + { + Session["backcolor"] = lstBackColor.SelectedItem.Text; + Session["fontname"] = lstFontName.SelectedItem.Text; + Session["fontsize"] = txtFontSize.Text; + Session["borderstyle"] = lstBorder.SelectedItem.Text; + Session["greetingtext"] = txtGreeting.Text; + Session["chkpic"] = chkPicture.Checked; + // if(!Session.IsNewSession) + Response.Redirect("version91.aspx"); + } + } +} \ No newline at end of file diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version9.aspx.designer.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version9.aspx.designer.cs new file mode 100644 index 0000000..bbd7a1a --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version9.aspx.designer.cs @@ -0,0 +1,87 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GreetingsWebApp.jaimish_91 { + + + public partial class version9 { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// lstBackColor control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList lstBackColor; + + /// + /// lstFontName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList lstFontName; + + /// + /// txtFontSize control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtFontSize; + + /// + /// lstBorder control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RadioButtonList lstBorder; + + /// + /// chkPicture control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkPicture; + + /// + /// txtGreeting control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtGreeting; + + /// + /// cmdUpdate control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button cmdUpdate; + } +} diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version91.aspx b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version91.aspx new file mode 100644 index 0000000..582015d --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version91.aspx @@ -0,0 +1,25 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="version91.aspx.cs" Inherits="GreetingsWebApp.jaimish_91.version91" %> + + + + + + + + +
+
+ + +
  +


+ +
+
+
+ + diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version91.aspx.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version91.aspx.cs new file mode 100644 index 0000000..b6c8600 --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version91.aspx.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Drawing; +using System.Drawing.Text; +using System.ComponentModel; +using System.Net; + +namespace GreetingsWebApp.jaimish_91 +{ + public partial class version91 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + imgDefault.ImageUrl = "images/dafault.jpg"; + pnlCard.BackColor = Color.FromName(Session["backcolor"].ToString()); + + // Update the font. + lblGreeting.Font.Name = Session["fontname"].ToString(); + if (Int32.Parse(Session["fontsize"].ToString()) > 0) + { + lblGreeting.Font.Size = + FontUnit.Point(Int32.Parse(Session["fontsize"].ToString())); + } + // Update the border style. This requires two conversion steps. + // First, the value of the list item is converted from a string + // into an integer. Next, the integer is converted to a value in + // the BorderStyle enumeration. + // Find the appropriate TypeConverter for the BorderStyle enumeration. + TypeConverter converter = + TypeDescriptor.GetConverter(typeof(BorderStyle)); + // Update the border style using the value from the converter. + pnlCard.BorderStyle = (BorderStyle)converter.ConvertFromString( + Session["borderstyle"].ToString()); + // Update the picture. + if (Session["chkpic"].ToString() == "True") + { + imgDefault.Visible = true; + } + else + { + imgDefault.Visible = false; + } + // Set the text. + lblGreeting.Text = Session["greetingtext"].ToString(); + + //Session.Abandon(); + } + } +} \ No newline at end of file diff --git a/GreetingsWebApp/GreetingsWebApp/jaimish_91/version91.aspx.designer.cs b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version91.aspx.designer.cs new file mode 100644 index 0000000..cba75cb --- /dev/null +++ b/GreetingsWebApp/GreetingsWebApp/jaimish_91/version91.aspx.designer.cs @@ -0,0 +1,51 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GreetingsWebApp.jaimish_91 { + + + public partial class version91 { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// pnlCard control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel pnlCard; + + /// + /// lblGreeting control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblGreeting; + + /// + /// imgDefault control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image imgDefault; + } +}