Archive | Programming RSS feed for this section

How to add ListItem to Dropdownlist at first position

Published on January th, 2013
Andri Kasta Marengga

How to add ListItem to Dropdownlist at first position

Recently I knew a “new” method named ddlArea.Items.Insert. Here’s the story how we met Result of code snippet above:  “All Area” item disappear from my dropdownlist, I guess binding dropdownlist with a new datasource replace all its item with new items. If I put ddlArea.Items.Add(myItem) after DataBinding call, myItem will be placed on the last […]

Continue Reading →

Programatically Change Color Of An Element to Hexa Color Code

Published on January th, 2013
Andri Kasta Marengga

Programatically Change Color Of An Element to Hexa Color Code

Changing color (ex: forecolor) of an element is actually easy. You only have to do this one line script But the weakness of this way is you can’t specify your personal color. Solution to this matter is we have to define our custom color (either in css file or by code) first and then use […]

Continue Reading →