• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 385
  • Last Modified:

ASP.NET adding to database from usercontrol without using a postback.

I have a usercontrol loaded with code behind. That usercontrol collects data via input boxes, there is a save button that is used to send the data to the sequel server. Problem is that the user control unload when the postback happens. And I would rather have it that way but the update to the database doesn't happen because the button event wasn't fired because it unloaded. I need a solution that I can do this without postback if at all possible. I appreciate any help

The coding language I am us is asp.net vb.net
1 Solution
It seems you are adding a User Control dynamically but have troubles persisting it across postbacks. The postback is fundamental to passing information between the end-user and the server. The problem lies with you adding a dynamic User Control.

By trying to do something, you are now attempting to re-write the ASP.NET methodology.

Have your User Controls as static ones.
jon37325Author Commented:
I was hoping for a simple and easy solution, this was the best of both. I thought using dynamic controls would be easier but with all of the viewstate problems and uncertainty of asp.net static is the best policy. Thankyou.

So much for ASP.NET being dynamic.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now