Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
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 posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.