Hello, Im learning about themes and how to change the Theme at runtime., I found this article and code (check out the download) which accomplished this task. The code is in C# and unfortuantly I'm still in VB. Here is the original artilcle and download page:
The sample application (the download) Uses a dropdown to select the theme from the getdirectorys of the app_themes. While this works great I would rather use image buttons instead of a dropdown.
Can someone help to modify the c# code below to accept the theme from image buttons green, blue and default?
Here is the script:
protected void _button_Click(object sender, EventArgs e)
this.Profile.Theme = _themes.SelectedValue;
protected void Page_Load(object sender, EventArgs e)
foreach (string s in Directory.GetDirectories(S
_themes.SelectedIndex = -1;
if (this.Page.Theme != null && this.Page.Theme.Length > 0)
cted = true;