I'm trying to create an asset picker which matches my needs. I have the asset picker in my Custom Field and i want it to open the dialog from the List he is in.

I wrote down this code:

urlSelector = new AssetUrlSelector();
urlSelector.PickerButtonText = "Add";
urlSelector.AllowExternalUrls = true;

//Get current list
string app = this.Context.Request.Url.ToString();
Match m = Regex.Match(app, @"/Lists/.*/");

urlSelector.DisplayLookInSection = false;

//Associate the right path
urlSelector.DefaultOpenLocationUrl = "~Site" + m.Value;
urlSelector.DefaultToLastUsedLocation = false;
urlSelector.AutoPostBack = true;

Am i doing something wrong?

  • Did you ever found a solution? – Steve B Feb 10 '14 at 9:25
  • Sadly not, as I can remember, I change my mind about how the control must be. – Ziba Leah Feb 10 '14 at 12:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.