Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web Form loads blank - very strange - IIS Issue

Status
Not open for further replies.

Merkaba

Programmer
Jun 14, 2005
69
US
Hi all,

I read a few threads here about web forms loading blank when using Response.Redirect, but my case is very odd.

I have a custom datagrid control that works fine. There is a Template Column with an ImageButton control to redirect to a web form that displays full details of the associated data from the ImageButton's row. When I clicked the ImageButton, it redirected to the page, with the correct page name and querystring in the browser, but the page loaded with barely any code in it. Here is the html source from the browser:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>

That is definitely not coming from my code!

The Response.Redirect does fire, but the Page_Load on the details page did not. I definitely have the this.Load += new EventHandler( this.Page_Load ); in the InitializeComponent() method, so that isn't the problem.

I read that removing the AutoEventWireup="false" from the Page directive might correct this problem, and it did. I put the AutoEventWireup="false" back in the directive and it still works.

Now here is the strange part:

After a few minor code changes, like changing control width properties, the page with the datagrid that loaded fine now loads with the same blank page code as above! Removing the AutoEventWireup="false" did not fix this page. I tried everything I could to solve this, like clearing IE's cache, restarting IIS, recompiling the project, restarting VS.NET, rebooting the PC, and nothing fixs it. I also checked to make sure SmartNavigation was not enabled, and the command window confirmed it is set to false. I tried browsing to the site from a remote PC, and that PC's browser loads blank too. The details page that this issue first appeared on with still works, though.

I renamed the page, still loads blank. I renamed the page to Trial.aspx and then pointed the browser to the original name, and the browser loaded the same blank page, from a now non-existant file! This has to be an IIS issue. I am running IIS Version 5.0 on a Win2K Advanced Server box.

Thanks in advance for any help you can provide.


-Merk

There will either be World Peace or The World in Pieces. Everything we do plays a part for one of the outcomes.
 
I managed to get the page working. It makes very little sense why it works now, but it does.

I changed the Response.Redirect to a Server.Transfer for kicks. The page threw and exception saying the process thread was aborted. So I changed it back, and all of a sudden it worked again. I did not change a single line of code on the page that loaded blank, and I removed the Server.Transfer, putting the Response.Redirect back, and it worked as though there was never anything wrong.


There will either be World Peace or The World in Pieces. Everything we do plays a part for one of the outcomes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top