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

Radpane ContentUrl doesn't work

4 Answers 66 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
heba
Top achievements
Rank 1
heba asked on 03 Feb 2014, 06:20 PM
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.

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 04 Feb 2014, 08:54 AM
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.
0
heba
Top achievements
Rank 1
answered on 04 Feb 2014, 01:42 PM
Thanks Princy ,
that is the same as I did but the result is like  this in attached file

thanks,
0
Accepted
Dobromir
Telerik team
answered on 04 Feb 2014, 02:03 PM
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.
0
heba
Top achievements
Rank 1
answered on 04 Feb 2014, 02:28 PM
Thanks Dobromir ,
I found that the PDF document is corrupted.

Thanks for your time
Tags
Splitter
Asked by
heba
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
heba
Top achievements
Rank 1
Dobromir
Telerik team
Share this question
or