"If at first you don't succeed; call it version 1.0" :-Unknown

Pages

Wednesday, December 8, 2010

changing div background image in C# ,Server side

Hi frienz,
for my last project i face this twist. Need to change a div background image. To achieve this create a new css attribute, that's not a good way. so i used page.resolveurl
code:
div.Style["background-image"] = Page.ResolveUrl("~/pathrelativetoapproot/yourimage.jpg");




Have a nice day... 'N happy Coding :)

No comments: