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

September 5th, 2007, 03:13 PM
|
|
Authorized User
|
|
Join Date: Sep 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I tried using a Try..Catch..End Try logic, but still just receive this error:
The following error has occurred:
Class CustSignIn Error=Object reference not set to an instance of an object.
|
|

September 5th, 2007, 03:18 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
How about putting a breakpoint in your code and see where it breaks?
From what I can see, your DB code is fine, so maybe it has to do with the methods in the base page you are calling.
Without a location where things break (e.g. call stack and detailed error info) we can all look at this for hours without coming up with a fix...
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
|
|

September 5th, 2007, 03:30 PM
|
|
Wrox Author
|
|
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
|
|
I believe the code is breaking here:
Code:
Try
SetPageTitle = m_objMessages.GetXMLMessage("default.aspx", "PageTitle", "Title")
SetDesign(PageTable, PageSubTable, PageCell, ErrorAlignment, MessageAlignment)
Catch ex As Exception
Session("DetailError") = "Class CustSignIn Error=" & ex.Message
Response.Redirect(StoreFrontConfiguration.SiteURL & "errors.aspx")
End Try
Unfortunately, I do not see how the data would be wrote to the screen. Check what the values of ex.StackTrace and ex.Source are to get a further clue on what is going on.
Also, as Imar suggested, set a breakpoint and step through the code.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for:
Professional Search Engine Optimization with ASP.NET
Professional IIS 7 and ASP.NET Integrated Programming
================================================== =========
|
|

September 5th, 2007, 03:45 PM
|
|
Authorized User
|
|
Join Date: Sep 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Sorry, I guess I'm not using the same tools you are. Break points seem strangely absent from Dreamweaver 8. Though seeing as it doesn't have a built in compiler, I'm not all that surprised.
I noticed that the imported CWebPage class has its own iteration of the Page_Load function. Unfortunately, turning this off breaks everything else. I was not there during the inception of this project, so I'm still unaware of a lot of the deep dark dealings of this system. That's originally why I was trying to do a more surface level query (in the ASPX file), rather than try bothering all the ghosts of this project's past.
Thanks,
blu
|
|

September 5th, 2007, 03:59 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Personally, I think you're *far* better off doing ASP.NET 2.0 projects in Visual Studio 2005. The Express Editions come for free, so price shouldn't be an issue.
Dreamweaver is very nice for plain HTML / CSS design, and somewhat good at building database driven sites with classic ASP / PHP and a few more other technologies, but IMO, it's unsuitable for any serious .NET development. The lack of IntelliSense, integrated tools / wizards (even support for something as simple as a Grid on a page) compilation and an integrated debugger make it very very hard to do .NET development with Dreamweaver, causing you endless hours of frustration and costing you and your client lots of money.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
|
|

September 5th, 2007, 04:01 PM
|
|
Authorized User
|
|
Join Date: Sep 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Yes I've used break points while coding in Visual languages before, but there's no such thing in tools like Dreamweaver.
One thought I had bouncing ideas around...
Create the login functionality in one page, the database query in another page... include the login script inside an <iframe></iframe> and let them each have their own pageload... Tiresome and probably very wrong somehow, but at this point...
Anyways, I want to thank you very much for helping me today. I've got some ideas going now, at least.
|
|

September 5th, 2007, 04:05 PM
|
|
Authorized User
|
|
Join Date: Sep 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks very much for the advice, Imar. I'll definitely be getting myself and my coworkers a copy of the express edition of Visual Studio, if not the full thing. This project is becoming much too cumbersome to work with in Dreamweaver alone. It's like trying to write binary in Notepad.
|
|

September 6th, 2007, 08:08 AM
|
|
Authorized User
|
|
Join Date: Sep 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Just letting you know, the problem was finally resolved... Here's how I did it...
I let the login function use the codebehind and do its thing with its own Page_Load() routine. I left it well enough alone by simply including an iframe including the other function that pulls from the database:
Code:
<iframe width="100%" src="featuredproducts.aspx" border="0px" scrolling="no" height="850" style="border-style:none;"></iframe>
This allows each piece of the page have its own Page_Load without interfering with each other. :)
|
|
 |