VB.NET
Dim x As New Unit('80px')
Dim y As New Unit('20px')
Dim imagestate as string= 'stand'
If imagestate = 'stand' then
imagebutton1.height = x
else
imagebutton1.height = y
end if
C#
Unit x = new Unit ('80px');
Unit y = new Unit('20px');
string imagestate='stand';
if( imagestate != 'stand')
{
ImageButton1.Height = x;
}
else
{
ImageButton1.Height = y;
}
For more details Setting Web Server Control Properties Programmatically
Share with