Radpane ContentUrl doesn't work

5 posts, 1 answers
  1. heba
    heba avatar
    8 posts
    Member since:
    Sep 2013

    Posted 03 Feb 2014 Link to this post

    I want to use RadSplitter to view a PDF that is saved in server 
    I used this code but it doesn't work and give me error HTTP Error 400. The request URL is invalid.

    <telerik:RadSplitter ID="Radsplitter1" runat="server" Orientation="Horizontal">
                    <telerik:RadPane ID="Radpane1" runat="server" Height="650" Width="600">
                    </telerik:RadPane>
                </telerik:RadSplitter>

    string newURL = "Documents/CV.pdf";
                Radpane1.ContentUrl = newURL; 
                //Radpane1.ContentUrl = Server.MapPath("Documents/"+ PDFname);

    Thanks.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 04 Feb 2014 in reply to heba Link to this post

    Hi heba,

    Unfortunately I couldn't replicate the issue at my end. Please have a look into the sample code snippet which works fine at my end. Please verify that you are giving the correct path  in the ContentUrl of RadPane.

    ASPX:
    <telerik:RadSplitter ID="Radsplitter1" runat="server" Orientation="Horizontal">
        <telerik:RadPane ID="Radpane1" runat="server" Height="650" Width="600">
        </telerik:RadPane>
    </telerik:RadSplitter>

    C#:
    protected void Page_Load(object sender, EventArgs e)
    {
        //path of the pdf file
        Radpane1.ContentUrl = "NewFolder1/Getting Started.pdf";
    }

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. heba
    heba avatar
    8 posts
    Member since:
    Sep 2013

    Posted 04 Feb 2014 Link to this post

    Thanks Princy ,
    that is the same as I did but the result is like  this in attached file

    thanks,
  5. Answer
    Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 04 Feb 2014 Link to this post

    Hello Heba,

    Could you please verify that the PDF document is not corrupted? Do you experience the same issue with other documents and are you able to load the document in the browser itself - File->Open->CV.pdf?

    Regards,
    Dobromir
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
  6. heba
    heba avatar
    8 posts
    Member since:
    Sep 2013

    Posted 04 Feb 2014 in reply to Dobromir Link to this post

    Thanks Dobromir ,
    I found that the PDF document is corrupted.

    Thanks for your time
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017