I want to build a user control suppose MyDiv.ascx. This control renders the div tag and do few more code behind stuff like adding few attributes etc which is not a matter of
Add a Text property to your control and linked this text property to a label run at server that will be between the opening and closing div.