Blue Ink
Blue InkHomeBlue Ink SolutionsArticlesBlue Ink Net CommunityBlue Ink Demo ApplicationAbout Automated Architecture
My Profile
login/register
0

Dubugging Error

View General Forum | Post Response | New Topic

Author Message
akaikini
Dec 30 2005
12:10 PM
I am new to building applications. I get an
"Object reference not set to an instance of an object"
with specific code
:

Line 13:
Line 14: public static void FillDropDown(DropDownList ddl, DataTable tbl, string strDataTextField, string strDataValueField) {
Line 15: ddl.DataSource = tbl;
Line 16: ddl.DataTextField = strDataTextField;
Line 17: ddl.DataValueField = strDataValueField;

What is the best way to locate and fix the problem?
Lee Richardson
(Admin)

Dec 30 2005
12:45 PM
"Object reference not set to an instance of an object" type of errors almost always happen when an .aspx or .ascx page get out of sync with a code behind page. The FillDropDown() method generated by Blue Ink takes drop down list controls (they start with ddl) and fills them with data.

But if the drop down list specified by the code behind page doesn't exist in the .aspx page, then .Net complains. So to resolve this bug first verify that the code behind and .aspx page have the same variable names.

With Blue Ink these files may have gotten out of sync if you regenerated but customized the .aspx page and opted not to overwrite. If this is the case you can view what Blue Ink would have written by viewing the View Results page which is displayed after generating and then manually resolving the files.

View General Forum | Post Response | New Topic






ARTICLES

What is Rapid Application Development?


QUESTIONS?

Call us toll free:
(877) 756-3595

Or Visit Forums

    

Copyright © 2017 Automated Architecture, Inc. All rights reserved.