 |
| ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

March 21st, 2008, 08:57 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
Mouseover "OrderIDDropDownList.SelectedValue" in the code to see what it is. I'm wondering if the value you are providing the query is the problem.
-Peter
peterlanoie.blog
|
|

March 21st, 2008, 09:02 AM
|
|
Authorized User
|
|
Join Date: Mar 2008
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
When I put the mouse over OrderIDDropDownList.SelectedValue I get the following text in the tooltip: "DropDownList administration_orderallocation.aspxOrderIDDropDown List".
|
|

March 21st, 2008, 09:07 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
I probably should have clarified that you need to do this while you are debugging. And make sure you hover over "SelectedValue" to see that value, not just the DDL instance tooltip.
-Peter
peterlanoie.blog
|
|

March 21st, 2008, 09:12 AM
|
|
Authorized User
|
|
Join Date: Mar 2008
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
quote:Originally posted by planoie
I probably should have clarified that you need to do this while you are debugging. And make sure you hover over "SelectedValue" to see that value, not just the DDL instance tooltip.
-Peter
peterlanoie.blog
|
Right I have just debugged it and set the breakpoint and when I select 2 on the drop down list and click the button, then highlight "OrderIDDropDownList.SelectedValue" on the SelectedValue I get 2.
|
|

March 21st, 2008, 09:19 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
This thread is starting to get confusing and a bit vague. Can you reproduce the error and post all the exception information you can gather? I'm loosing site of what and where the problem actually is.
-Peter
peterlanoie.blog
|
|

March 21st, 2008, 09:28 AM
|
|
Authorized User
|
|
Join Date: Mar 2008
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Sorry for the confusion. It's even starting to really confuse me. When you say gather all the exception information, do you mean from the output window?
|
|

March 21st, 2008, 10:14 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
Wherever you can get it. If your application is throwing an exception that isn't being gracefully handled then you should be getting the "yellow screen of death" with lots of information about the error. The message includes the line of code it's blowing up on as well as the method call stack information. This is most helpful in tracking down the source of the problem. It's hard to diagnose with just the exception message text.
-Peter
peterlanoie.blog
|
|

March 21st, 2008, 10:37 AM
|
|
Authorized User
|
|
Join Date: Mar 2008
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Right after searching the internet on how to get the call stack up on the debugger (Ctrl-Alt-C) I added a break point and debugged the file. I only got one entry on the call stack:
> App_Web_a0v2xyfc.dll!ASP.administration_orderalloc ation_aspx.ViewDestinationBtn_Click(object sender = {Text = "View Destinations"}, System.EventArgs e = {System.EventArgs}) Line 45 C#
With this problem I have never had a yellow screen of death. And what confuses me even more is that I have code in another file which does nearly the same thing but to a different table and yet that works.
I don't know how to get more information. But if I do I'll post it on here.
|
|

March 21st, 2008, 11:05 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
Now we are getting somewhere though... what is line 45?
One fundamental problem here is that you are "swallowing" the exception. You have a catch with no body. You should let the exception bubble out. Then you'll see all the crash information that will help us figure out the problem. Once you have things working, you can add in the try/catch block so you can handle the error gracefully. Alternatively, you could just use a try/finally block. This will ensure the connection(s) are closed, but allow the exception to bubble up so you'll see it. It's never a good idea to swallow exceptions unless you really really mean to.
-Peter
peterlanoie.blog
|
|

March 21st, 2008, 11:08 AM
|
|
Authorized User
|
|
Join Date: Mar 2008
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
quote:Originally posted by planoie
Now we are getting somewhere though... what is line 45?
One fundamental problem here is that you are "swallowing" the exception. You have a catch with no body. You should let the exception bubble out. Then you'll see all the crash information that will help us figure out the problem. Once you have things working, you can add in the try/catch block so you can handle the error gracefully. Alternatively, you could just use a try/finally block. This will ensure the connection(s) are closed, but allow the exception to bubble up so you'll see it. It's never a good idea to swallow exceptions unless you really really mean to.
-Peter
peterlanoie.blog
|
Line 45 is the "catch" line. Okay, I'll remove the try and catch blocks and come back with some progress.
Many thanks.
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| sql query question |
ldp101068 |
SQL Server 2000 |
6 |
December 3rd, 2007 03:41 PM |
| ASP / Sql question |
joebeem |
Classic ASP Basics |
0 |
August 28th, 2007 02:45 PM |
| A SQL question |
pankaj_daga |
Access |
5 |
December 5th, 2005 04:37 PM |
| Sql-question |
boson |
SQL Language |
2 |
July 3rd, 2004 06:39 AM |
| SQL question |
U.N.C.L.E. |
SQL Server 2000 |
3 |
October 10th, 2003 02:00 PM |
|
 |