CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML





Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.visual_web_developer_2005_express Tags:
Item Type: NewsGroup Date Entered: 8/12/2004 2:01:27 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 11 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
avperede
Asp.Net User
A first chance exception of type....8/12/2004 2:01:27 AM

0/0

Greetings All,

I'm running the VWD.NET 2005 Express, and when I'm running and testing my web app, I notice in the output window I'm getting lots of these messages:

A first chance exception of type 'System.ArgumentNullException' occurred in mscorlib.dll

Is this a true warning? or error?

Also, from time to time, I get:

An exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll but was not handled in your code

The web app does not crash at all...but am I creating memory leaks that will come back to haunt me?

I'm using nested master pages, and I use Server.Transfer() and Page.Redirect() (back to the same page) alot after saving data to the database, so that I guarantee that all controls on my page will show the same data, instead of being rendered out of order, because their Page_Loads would have read old data since the button click event for my "Save" button has not executed yet.

As an aside, I really wish that button click methods and other events in ASP.NET would be handled BEFORE the Page_Load() event, instead of being triggered as the last event...

Maybe I should be doing my saves from button click events in the Page_Init() or Page_PreRender() event (would that be a best practice?)

thanks,
andy p.
Fredrik N
Asp.Net User
Re: A first chance exception of type....8/12/2004 4:43:59 AM

0/0

If you want the Page_Load event to not load your data when your press the buton, make sure you use the Page.IsPostBack in page load:


public void Page_Load()
{
if( !Page.IsPostBack )
{
LoadMyData()
}
}


public void Botton_Click(..)
{
SaveData();
LoadMyData();
}

private void LoadMyData(...)
{
}

/Fredrik Norm?n NSQUARED2
Microsoft MVP, MCSD, MCAD, MCT

Cornerstone

My Blog, ASP.Net 2.0 etc
avperede
Asp.Net User
Re: A first chance exception of type....8/12/2004 5:26:35 AM

0/0


I know I posted 2 questions in one in this thread....

my primary concern is why the errors are appearing in the output window of VWD.

my second question was related to the first, and I'm speculating its because in doing Server.Transfer() to reload the page with the new data. This is something I'm trying to avoid by possibly using another techique.

Is is a best practice to do a SaveData() from a Page_Init() ? That way I no longer have to call the Server.Transfer() at the end of my SaveData() and I can potentially get rid of all those warning/error msgs that are showing up in the VWD output window?

thanks,
andy p.
3 Items, 1 Pages 1 |< << Go >> >|



Search This Site:


Meet Our Sponsors:



Other Resources:

Exception Types to Ignore isn't. - borland.public.delphi.ide.general ... Exception Types to Ignore isn't., > ROOT > NEWSGROUP > Borland Forums > borland.public.delphi.ide.general, Date: 10 ... A first chance exception of type ' ...
First-chance exception--Invalid handle - microsoft.public.dotnet ... First-chance exception--Invalid handle, > ROOT > NEWSGROUP > Microsoft News > ... Item Type: NewsGroup. Date Entered: 1/23/2008 9:01:12 AM. Date Modified: ...
How To Disable "A first chance exception of type..." Messages in VS 2005 A first chance exception of type 'System.ArgumentException' occurred in MyAssembly.dll ... "How To Disable "A first chance exception of type..." Messages in VS ...
Re: first chance exception of type 'System.IO.IOException' - MSDN Forums the myDataAdapter.Fill creates a 'first chance exception', whatever that is ... A first chance exception of type 'System.IO.IOException' occurred in mscorlib.dll ...
David Kline : What is a First Chance Exception? Ever wondered: What is a first chance exception? ... A first chance exception of type 'System.ApplicationException' occurred in myapp. ...
First chance exceptions while building - MSDN Forums A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll ... A first chance exception of type 'System.Net.Sockets. ...
First Chance Exception and XamlParseException A first chance exception of type 'System.ApplicationException' occurred in ... order to answer those questions is just exactly what a First Chance Exception is. ...
CodeProject: FIRST CHANCE Exceptions. Free source code and programming help Are there any sort of exceptions in .NET that cannot be caught ... a FIRST CHANCE ... A first chance exception of type 'System.ApplicationException' ...
A first chance exception of type 'System.Data.SqlClient.SqlException ... ... ASP.NET AJAX " ASP.NET AJAX Networking and Web Services " A first chance ... A first chance exception of type 'System.Data.SqlClient.SqlException' occurred ...
80+ First chance exceptions from the 4.0.3 core... - Install It ... DotNetNuke® Forums ... Jump down a few pages to see the first chance exception that is thrown. 2/6/2007 10:51 AM ... the location of the exception) and are ...



 
All Times Are GMT