T
the.tinapatel
Guys,
I want the user to be able to select font (such as Bold, Italic,
underline) and stuff like that from a dropdown list) and then I wanna
apply these properties to all my page (all text). Now I'm doing
something like this:
string font = string.Empty;
switch(ddl2.SelectedItem.Text)
{
case "Bold":
font = Convert.ToString(System.Drawing.FontStyle.Bold);
break;
case "Italic":
font = Convert.ToString(System.Drawing.FontStyle.Italic);
break;
}
myBody.Attributes.Add("Font", font);
Session["theColor"] = font;
This worked for changing the color of the entire page as I hard coded
the colors hexa decimal values in the cases, but here these are enums,
and can only be compared.
Anyways does anyone has any input on this???? I want this to happen
when the user select from the DDL and on the button click event it
should change the font.
Thanks
Tina
I want the user to be able to select font (such as Bold, Italic,
underline) and stuff like that from a dropdown list) and then I wanna
apply these properties to all my page (all text). Now I'm doing
something like this:
string font = string.Empty;
switch(ddl2.SelectedItem.Text)
{
case "Bold":
font = Convert.ToString(System.Drawing.FontStyle.Bold);
break;
case "Italic":
font = Convert.ToString(System.Drawing.FontStyle.Italic);
break;
}
myBody.Attributes.Add("Font", font);
Session["theColor"] = font;
This worked for changing the color of the entire page as I hard coded
the colors hexa decimal values in the cases, but here these are enums,
and can only be compared.
Anyways does anyone has any input on this???? I want this to happen
when the user select from the DDL and on the button click event it
should change the font.
Thanks
Tina