Normally VS tries to render your control to give the developer as close to real-life rendering a possible. Sometimes, like in your case, this isn't appropriate. In these scenarios, there is a flag you can take advantage of to help.
Here's an example you can use for reference:
Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)
If DesignMode Then
writer.Write(Me.ID)
End If
MyBase.Render(writer)
End Sub
--
Danny
disclaimer: Information provided is 'as is' and conveys no warranties or guarantees.