Most efficient way to create multi-step update form in ASP.NET? -


i have asp.net page form inserts database. page uses wizard control since form complex 80 form fields , having multiple steps necessary. not databound data collected , inserted code behind page. need create identical form updating records, 1 inserts. efficient way set 1 up, considering can reuse code first form? controls should use? know how databind fields updating when in formview, using both formview , wizard control seems complicated. work best?

i have 1 wizard both, inserts , updates. how handle situations create data-transfer object or reuse existing entity working with. let's customer. in page_load event check if it's request edit (you pass in customerid edit), load object database , store either in session or in viewstate , set formviews (bind them object). in end of wizard, check, if customer.id>0 then it's update, else it's insert. in case it's not edit , session["customerid"] == null session["customer"] = new customer() , ignore formview binding, on each step of wizard update customer object in session , in end perfomr insert. way don't have maintain 2 identical methods.


Comments