codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  ASP.NET /Excel opening in frame Issue  raymondhsu09 at 12:09 on Monday, June 01, 2009
 

Hi,

I have a web application(made in ASP.NET ) which opens excel document in a frame by using Response.Redirect(@"some path../Excel 2.xls", true);
.
To reproduce the error we need to open an excel(say Excel1.xls ) document using MS excel application. Then if i open an excel document(say Excel2.xls) using
my web application. The excel file is opening correctly in the frame but my problem is once the document is open in the frame(and also the frame size is change by user, without which the error does not occur!! )
It prevents use of Excel outside the application i.e Excel1.xls from operating correctly. It seems to be lock. No changes not even 'save' button works.


Here is a little demo, so that you all can recreate the bug easily.


This is home.aspx
..
<frameset name="fr_main" id="fr_main" rows="*,50%" frameborder="1">
<frame name="fTop" id="fTop" src="FrameTop.aspx" frameborder="1" >
<frame name="fBottom" id="fBottom" frameborder="1" >
</frameset>
..


In FrameTop.aspx

..

<body>
<form id="form1" runat="server">
<asp:HyperLink ID="LinkButton1" runat="server">HyperLink1</asp:HyperLink>
<asp:HyperLink ID="LinkButton2" runat="server">HyperLink2</asp:HyperLink>


</form>
</body>

.

In FrameTop.aspx.cs page

protected void Page_Load(object sender, EventArgs e)
{

LinkButton1.NavigateUrl = "FrameBottom.aspx?id=1" ;
LinkButton1.Target = "fBottom";
LinkButton2.NavigateUrl = "FrameBottom.aspx?id=2";
LinkButton2.Target = "fBottom";

}


In FrameBottom.aspx.cs

protected void Page_Load(object sender, EventArgs e)
{
string id=Request.QueryString["id"] ;



if (id == "1")
{

Response.Redirect(@"http://localhost/TestSite/TempFiles/Excel 1.xls", true);


}
else if (id == "2")
Response.Redirect(@"http://localhost/TestSite/TempFiles/fiber.bmp", true);


}



--------------------------------------


Before you run the application open another excel(not the same as the one in your web application) document by MS Excel application.


Thanks.








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
• C++
• Re: refresh parent after closing pop up window
• Dynamic Insertion
• Date and Time function around the world???
• Significant Factors
• Perl array access
• Re: huffman encoding and decoding in C++...
• Perl One Liner: Replace {(
• Re: html including php, accessing the functions


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2009