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(@"/forum/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="/forum/FrameTop.html" 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 = "/forum/FrameBottom_id_1.html" ;
LinkButton1.Target = "fBottom";
LinkButton2.NavigateUrl = "/forum/FrameBottom_id_2.html";
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.

  Re: ASP.NET /Excel opening in frame Issue  arash farhad at 04:14 on Saturday, March 06, 2010
 

Ground shaking content i get form your blog. Very nice post about ASP.NET. Thanks for your beneficial information about 70-270 latest dumps, 70-291 braindumps and 70-432 braindump certifications. These are the best certifications in the world.








CodeToad Experts

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








Recent Forum Threads
•  Re: How to highlight text WITHIN a JTable cell?
•  Re: Problem to declare global variable in Object oriented perl
•  Re: dereferenceing a string to a constant name
•  Re: Submit multiple forms with one button
•  Re: Passing Password using $ssh->cmd
•  Re: ADODB.Recordset error (0x800A0CB3)
•  Re: Open a Modal Pop Up From a LinkButton In a GridView
•  Re: Need Javascript Multiple sidebar menu with sliding effects
•  Re: ASP.NET /Excel opening in frame Issue


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-2010