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;
            this.Controls.Add(urlSelector);

Am i doing something wrong?

share|improve this question
    
Did you ever found a solution? –  Steve B Feb 10 at 9:25
    
Sadly not, as I can remember, I change my mind about how the control must be. –  Ziba Leah Feb 10 at 12:31
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.