Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding data in web form
Message
 
To
04/07/2007 10:28:05
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01237747
Message ID:
01238153
Views:
18
Tim,

>All the rest of the fields are bound controls. I am getting a null exception on the oContact object in the submit click event. It seems the object creation in the load event is not persistent. What is the proper way to do this? I could create it in the click event but then would just unbind all the controls and set them in the click event also.

You're getting the error because you are checking for !IsPostBack in the form's load. You should be checking for IsPostBack instead. Clicking the submit button posts your web form back to the server.

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform