Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello..............
I am having some problem about loading .XLS file in i frame.
The frame is comming but its not loading the file


MY CODE of source page
............................................

C#
<asp:UpdatePanel ID="TreeViewUpdatePanel" runat="server">
                <ContentTemplate>
                <div>
                <iframe id="frmsReferrer1" src="" name="frmsReferrer1"  runat="server" marginwidth="0" frameborder="1" width="100%"
                height="500" scrolling="auto" ></iframe>
                </div>
                </ContentTemplate></asp:UpdatePanel>



IN page load
.............................................
C#
GetIntraEAGInvoiceFileName = invFacade.GetNonUsIntraEAGInvoiceFile(InvoiceID, true, System.Web.HttpContext.Current);
frmsReferrer1.Attributes.Add("src", GetIntraEAGInvoiceFileName);

In the Above i have one method retriving file path and storing in string i.e GetIntraEAGInvoiceFileName .
path is retriving asssing to string but on page load its not loading


anyone can help me about this...............
Thank u in advance..................
this variable (GetIntraEAGInvoiceFileName) returns the path like C:\JivaDocsFolder\C-Jivadoc\PlayJiva\Job\P\02\G\01\04\InvoiceC195473 .xls
When ever i type this url i am getting the file
but when i put mouse on iframe id its saying innertext=null
is there any problem?
Posted
Updated 23-Aug-12 4:43am
v2
Comments
Christian Graus 23-Aug-12 9:40am    
First, what is the HTML you end up with ? Is it a link to an Excel file ? If so, is Excel on the target machine ? If not, if it's converted and the Excel part is irrelevant, is the data coming out OK ? What does the actual HTML end up looking like ? What does your debugger tell you ?
ZurdoDev 23-Aug-12 9:43am    
If you put the src attribute on an iframe to be an excel file the browser then has control as to whether it is displayed in the browser or opened in a new window. I don't believe you can force it to stay in the iframe.

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900