I am facing a problem where I need fresh minds opinion:
I have 开发者_如何学Goan asp.Net page with a grid that has Selection column.
The grid is populated fine and the data is visible. But when the Select link is clicked on any row in the grid, instead of having a post pock and calling the event handler:
void dgvMyGrid_SelectedIndexChanged(object sender, EventArgs e) {...}
I get in IE:
Internet Explorer cannot display the webpage
but when I try it in FF I get:
The connection to the server was reset while the page was loading.
Do you have any idea that can be a good clue for me to track the possible reasons?
Thanks!
Firstly, as a guess, you may not have your event wired up correctly, so if you've defined the SelectedIndexChanged
event handler in the ASPX markup, it could be that the method can't be found on a postback.
Maybe you have the "Show friendly HTTP error messages" option checked in Internet Explorer's Internet Options. This is found in Tools -> (Internet) Options -> Advanced, under the Browsing section. With this disabled, the error shown in IE should be closer to the one shown in Firefox.
As far as getting the actual problem, you should turn off the custom errors in your site's web.config
file. To do this, find the <customErrors>
element in your web.config (or create it if it doesn't exist - it belongs under <system.web>
), and make it like this:
<customErrors mode="Off" />
Then you'll get the standard ASP.NET yellow error page showing details of the exception that was thrown.
UPDATE: If you're getting an IE error page then some kind of HTTP thing must be going on, so maybe try using Fiddler to see exactly what the browser is doing in terms of trying to fetch pages.
精彩评论