I am creating new custom command button control derived from asp.net command button. In my custom control I want to set two images (i.e. one from left and one from right). In center command text will come. I tried background image property using css. But I won't work out for me. The image is coming left but the actual command button style is lost and the second problem is I could not able to set image on right side. Can anyone send me code or help how to solve this issue.
Thanks in Advance
Regards
Viswanathan
viswanathan chidambaramPosted Jul 12, 2010, 5:42 AM
It is possible to place the icon on RenderContent method of asp.net button control. If yes mean how will you do that.
Thanks
Viswanathan
Amit ChoudharyPosted Jul 7, 2010, 8:20 AM
left and right div. i dont know much about how to use resources you have to find some article on it but it'll create you complete custom control...
viswanathan chidambaramPosted Jul 7, 2010, 3:38 AM
Thanks for your quick response. In my custom command button i need place two icon(left side and right side). how will do that.
Amit ChoudharyPosted Jul 7, 2010, 3:09 AM
try below code:
// put your image for left side
//put your image for right side
Some text here
Width can be calculate by following formula:
width of text div=Totalwidth of control - (width of left div image + width of right div image)
it'll create the style what you wanted for you custom control...
enjoy coding!!
Please mark "Do you like this post" if it helps you.