Adding web part to web part zone programmatically?

Adding web part to web part zone programmatically?

Post by cmVtb » Tue, 17 Aug 2004 21:31:02


Hi!
Is there any way to add (custom) web part to web part zone programmatically?
I know how to add web part to web part pages SPWebPartCollection, but I want
the web part to be shown in certain web part zone. My first guess was to add
web part instance to SPWebPartCollection of the page and then change web
part instances ZoneID property to corresponding Zone. But I couldn't find the
way to get Web part pages Zoneids. Any ideas/comments?