I am working on my project website for pizzeria using C#. I need to make page where you can create your own pizza. The problem is that my client has option to put ingredient 3x times. I need to make a drop down list with 1x, 2x and 3x for each I have different price 1x = 10 , 2x = 15, 3x = 20. My question is how I can make each 1x, 2x and 3x equal to different price because at the end I am suppose to make label where the price is shown.
If you have better suggestions, please leave a comment ( I am still learning C#) Thanks in advance for the respond.
Code behind til now is:
}
static void Main()
{
int first, second, third;
first = 10;
second = 15;
third = 20;
}
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
if (CheckBox1.Checked == true)
{
DropDownList1.Visible = true;
Image1.Visible = true;
}
else
{
DropDownList1.Visible = false;
Image1.Visible = false;
}
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
// Each element = to different price
DropDownList1.DataValueField = "first";
//ListItem lst = new ListItem("Add New", "0");
}
}