Findcontrol inside a webzone/Webpart sharepoint Dataformwebpartcontrol?

J

jc

I'm trying to find an asp dropdownlist control inside a Webpart from
Page_OnLoad in an inline code block?

Unfortunetly I'm working in Sharepoint Designer.

I've tried all of these with no luck.

//DropDownList fddl = WebPartZone0.WebParts[0].FindControl
("FacilityDDL") as DropDownList;
//DropDownList fddl = this.Page.FindControl("FacilityDDL")
as DropDownList;
//DropDownList fddl = aspnetForm.findControl<DropDownList>
("FacilityDDL") as DropDownList;
//DropDownList fddl = this.Page.FindControl("FacilityDDL")
as DropDownList;
// if(fddl=null)

There is masterpage, webzones and webparts. I'm not sure how to get
any needed IDs. Or how to check for parent controls, etc.

Thanks for any help or information.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top