Friday, May 16, 2008

How to instatiate a MultipleLookupField Control in a Web Part

This post has moved here: Programmer Computer

3 comments:

Unknown said...

sweeeeet :P I've been meaning to use it

Anonymous said...

Hi Garth,
How to get(read in loop) multiple lookup values?
Here is a problem with contains ";#" symbole & I'm, getting values are '48;#All;#33;#Supper Admin;#1;#METAMOSS\alamk.

I want to get only "All;Supper Admin;METAMOSS\alamk"

Plz help me It's urgent,
Thanks in advance
My Email:anwarul.mdh@gmail.com

Anonymous said...

SPList list = SPContext.Current.Web.Lists["Regions"];
mlfLocation = new MultipleLookupField();
mlfLocation.ControlMode = SPControlMode.New;
mlfLocation.FieldName = "Regions";
mlfLocation.ID = "Regions";
mlfLocation.ListId = list.ID;
mlfLocation.ItemId = list.Items[0].ID;
phLocation.Controls.Add(mlfLocation);


The above code is not working. I am not getting anything in the Panel. Please suggest.