This is a migrated thread and some comments may be shown as answers.

[Solved] Set Image Properties fails

4 Answers 43 Views
RadEditor
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nikolaj Rasmussen
Top achievements
Rank 1
Nikolaj Rasmussen asked on 25 Jan 2006, 10:29 AM
Hey,

"Set  Image Properties" results in a "Value cannot be null"?

My codebehind radeditor-setup looks like:
    reText.DialogParameters.Clear();
    ParameterCollection imageArguments = new ParameterCollection();
    imageArguments.Add(new Parameter("ThumbSuffix", reText.ThumbSuffix));
    imageArguments.Add(new Parameter("MaxImageSize", reText.MaxImageSize.ToString()));
    imageArguments.Add(new Parameter("AllowThumbGeneration",   reText.AllowThumbGeneration.ToString()));
    imageArguments.Add(new Parameter("SiteUrl", SPEncode.UrlEncode(sURL)));
    imageArguments.Add(new Parameter("WebUrl", SPEncode.UrlEncode(sRelativeURL)));
    reText.DialogParameters.Add("SharePoint/ImageManager", imageArguments);

4 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 25 Jan 2006, 12:46 PM
Hello Nikolaj,

Could you please add a breakpoint to the code and tell us which of the values in the ParameterCollection is null? (reText.ThumbSuffix, reText.MaxImageSize, etc)? Also, if possible, could you please attach a screenshot of the error you are getting?


All the best,
Elton
the telerik team
0
Nikolaj Rasmussen
Top achievements
Rank 1
answered on 25 Jan 2006, 02:56 PM

Hi Elton

    foreach(Parameter p in imageArguments)
    {
     if (p.Value==null)
      Response.Write(HttpUtility.HtmlEncode(p.Name)+" = null<br>");
     else
      Response.Write(HttpUtility.HtmlEncode(p.Name)+" = "+HttpUtility.HtmlEncode(p.Value)+"<br>");
    }

Results in...

ThumbSuffix = Thumbnail
MaxImageSize = 204800
AllowThumbGeneration = False
SiteUrl = http%3A%2F%2Fdomaintest%2FC18%2FPictureArea
WebUrl = %2FC18%2FPictureArea

So no null values present in the collection.


ErrorMsg:

Exception Details: System.ArgumentNullException: Value cannot be null.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace:


[ArgumentNullException: Value cannot be null.]
   Microsoft.SharePoint.h.a(String A_0, Boolean A_1) +432
   Microsoft.SharePoint.SPSite.OpenWeb(String strUrl) +19
   Telerik.WebParts.SharePointContext.Init(HttpContext context) +145
   Telerik.WebParts.Editor.Dialogs.BaseDialogControl.xde97676d01739ced(Object xe0292b9ed559da7d, EventArgs xfbf34718e704c6bc) +23
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Control.LoadRecursive() +98
   System.Web.UI.Control.LoadRecursive() +98
   System.Web.UI.Control.LoadRecursive() +98
   System.Web.UI.Page.ProcessRequestMain() +750

 

0
Nikolay
Telerik team
answered on 27 Jan 2006, 02:42 PM

Hi Nikolaj,

Thanks for the explanation.

Since the problem seems to be a bit complicated, we will need some more time to run some local tests.

We will investigate the problem further and surely write back to you on the results on Monday.

Thanks you for the cooperation and understanding.

Kiind regards,
Nick
the telerik team
0
Nikolaj Rasmussen
Top achievements
Rank 1
answered on 06 Feb 2006, 11:52 AM
Hi,
Albert posted a fix for this problem in the
"Flash/Media/Attachment managers fails"-thread
Tags
RadEditor
Asked by
Nikolaj Rasmussen
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Nikolaj Rasmussen
Top achievements
Rank 1
Nikolay
Telerik team
Share this question
or