views:

590

answers:

1

when I reference Microsoft.SharePoint.WebPartPages.WebPart the WebPartTitleID is generated on pages in the following format. WebPartTitleWPQ2

when I reference the System.Web.UI.WebControls.WebParts.WebPart

the WebPartTitleID is generated on pages like the following

WebPartTitlectl00_m_g_cfe73da2_e9aa_44e3_aa10_b8a300837217

is there a way to control this so I get the WPQ pattern on the asp.net webpart ?

A: 

As far as I know, there's no way to control these auto-generated web part ID's. If you need to style them, the best thing I've been able to do is wrap everything is a div with a custom ID or class.

Abs