Search Results

Search found 2 results on 1 pages for 'user710502'.

Page 1/1 | 1 

  • convert from physical path to virtual path

    - by user710502
    I have this function that gets the fileData as a byte array and a file path. The error I am getting is when it tries to set the fileInfo in the code bewlo. It says 'Physical Path given, Virtual Path expected' public override void WriteBinaryStorage(byte[] fileData, string filePath) { try { // Create directory if not exists. System.IO.FileInfo fileInfo = new System.IO.FileInfo(System.Web.HttpContext.Current.Server.MapPath(filePath)); //when it gets to this line the error is caught if (!fileInfo.Directory.Exists) { fileInfo.Directory.Create(); } // Write the binary content. System.IO.File.WriteAllBytes(System.Web.HttpContext.Current.Server.MapPath(filePath), fileData); } catch (Exception) { throw; } } When debugging it, is providing the filePath as "E:\\WEBS\\webapp\\default\\images\\mains\\myimage.jpg" . And the error message is 'E:/WEBS/webapp/default/images/mains/myimage.jpg' is a physical path, but a virtual path was expected. Also, what it is triggering this to happen is the following call properties.ResizeImage(imageName, Configurations.ConfigSettings.MaxImageSize, Server.MapPath(Configurations.EnvironmentConfig.LargeImagePath));

    Read the article

  • How to control the width of radgrid

    - by user710502
    I have a RadGrid but it is spanning the width across the page, how can I control it and set a width and mae contents in the cells wrap if they need to?. I cant find anything that is helping me. I tried MasterTableView-TableLayout="fix" but then anything in the cells gets cut off. Any help would be much appreciated: <RadGrid:CustomRadGrid ID="DetailsGrid" runat="server" AutoGenerateColumns="False" ShowFooter="True" OnNeedDataSource="DetailsGrid_NeedDataSource" OnItemDataBound="DetailsGrid_ItemDataBound" OnItemCreated="DetailsGrid_ItemCreated" OnItemCommand="DetailsGrid_ItemCommand" GridLines="None" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" AllowMultiRowSelection="true">

    Read the article

1