Embed
Email

greeting_card

Document Sample

Categories
Tags
Stats
views:
0
posted:
11/20/2011
language:
English
pages:
3
.aspx file













Untitled Page











    Izaberi boju:

   





    Izaberi font:

   







    Izaberi velicinu fonta:

   





    Izaberi border style:

  



   





   Upisi tekst cestitke ispod:



  





   

















.aspx.cs file

// potrebno je uneti celobrojne vrednosti u polje za velicinu fonta



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;

using System.Drawing;



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

{

protected void Page_Load(object sender, EventArgs e)

{

System.Drawing.Text.InstalledFontCollection fonts;

Font f;



if (!this.IsPostBack)

{

DropDownList1.Items.Add("White");

DropDownList1.Items.Add("Red");

DropDownList1.Items.Add("Green");

DropDownList1.Items.Add("Blue");

DropDownList1.Items.Add("Yellow");



fonts = new System.Drawing.Text.InstalledFontCollection();

foreach (FontFamily family in fonts.Families)

{

DropDownList2.Items.Add(family.Name);

}



//DropDownList2.Items.Add("Times New Roman");

//DropDownList2.Items.Add("Arial");

//DropDownList2.Items.Add("Verdana");

//DropDownList2.Items.Add("Tahoma");



//dodaje List Iteme za border style

ListItem item = new ListItem();



item.Text = BorderStyle.None.ToString();

item.Value = ((int)BorderStyle.None).ToString();

BordStl.Items.Add(item);



item = new ListItem();

item.Text = BorderStyle.Double.ToString();

item.Value = ((int)BorderStyle.Double).ToString();

BordStl.Items.Add(item);



item = new ListItem();

item.Text = BorderStyle.Solid.ToString();

item.Value = ((int)BorderStyle.Solid).ToString();

BordStl.Items.Add(item);



BordStl.SelectedIndex = 0;

Image1.ImageUrl = "slika.jpg";

}





}

protected void DropDownList2_SelectedIndexChanged(object sender,

EventArgs e)

{



}

protected void Button1_Click(object sender, EventArgs e)

{

Panel1.BackColor=Color.FromName(DropDownList1.SelectedItem.Text);

Poruka.Font.Name = DropDownList2.SelectedItem.Text;

if (Int32.Parse(TextBox1.Text) > 0)

{

Poruka.Font.Size = FontUnit.Point(Int32.Parse(TextBox1.Text));



}





Panel1.BorderStyle =

(BorderStyle)Int32.Parse(BordStl.SelectedItem.Value);

if (CheckBox1.Checked)

{

Image1.Visible = true;

}

else

{

Image1.Visible = false;

}



Poruka.Text = TextBox2.Text;

}

}



Related docs
Other docs by Stariya Js @ B...
Lab2_Fishing_lab_pack
Views: 0  |  Downloads: 0
JMK sample legal brief
Views: 1  |  Downloads: 0
DriveQ
Views: 0  |  Downloads: 0
cybersecurity_reform_-_senate_bill_eyes
Views: 0  |  Downloads: 0
Opening and Marketing
Views: 0  |  Downloads: 0
Making_it_Work_notes
Views: 0  |  Downloads: 0
First Announcement 7th ISFS_
Views: 0  |  Downloads: 0
as90173
Views: 0  |  Downloads: 0
VNAfashionshow2010
Views: 0  |  Downloads: 0
By registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!