Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7583681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:44:23+00:00 2026-05-30T18:44:23+00:00

I have a ASP.Net create user wizard. One of the additional steps I included

  • 0

I have a ASP.Net create user wizard. One of the additional steps I included is to gather contact information for connections the customer may have to fellow co-workers so the account being configured can batch create logins for them as well. The user I use for ContactPerson consist of several text boxes for key info (Name, DoB, Company Name, Address and State).

I use a simple button to invoke the AddContacts method which creates the proper nesting structure used for RadPanelItems. As soon as I add the first item it works fine, the second one though wipes out the first via postback and lack of data persistence.

This user control maps to an EF4 Entity, specifically the page has a member called List ContactList. I wanted to ask what would be the best way for me to persist my Entity data I gathered from the previous contact along with re-adding my user control (with said data) back to the form when a post back is encountered?

I am open to suggestions and I am looking for a best practice solution(s). Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T18:44:24+00:00Added an answer on May 30, 2026 at 6:44 pm

    Until you persist you data, you can use the HttpContext.Current.Session object to store this info. The Session (stored on the server) is better for larger data, the ViewState (stored in a hidden field on the page) can be used for smaller data as it is sent back and forth every request and quickly blows up the page size. For discussion see ViewState Vs Session … maintaining object through page lifecycle or http://msdn.microsoft.com/en-us/library/ms972976.aspx

    Annother option (not a good one for your situation) is QueryParameters for very small data like IDs or primary Keys having the advantage that you can copy paste the url to an email and still have the info. see http://www.codeproject.com/Articles/5876/Passing-variables-between-pages-using-QueryString

    So back to your issue: For every new contact you add, perform something like this until you finally persist your data.

    var contacts = new List<EF4Entity>()
    if (Session["Contacts"] != null){
      contacts = Session["Contacts"] as List<EF4Entity>
    }
    
    var newContact = new EF4Entity()
    //fill your new contact here
    contacts.Add(newContact)
    
    //bind your RadPanelItems here
    
    //store it to the session
    Session["Contacts"] = contacts
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have asp.net membership and I use the built in Create user method since
I have an ASP.NET MVC 3 application which has a post action called Create
I'm creating a login page. I want to create ASP.NET TextBox controls that have
i have to create an asp.net page dynamically on runtime. It should work like
If you create an ASP.NET web file project you have direct access to the
Does ASP.NET MVC provide a standard validator functionality or do you have to create
I have to create and return file in my aplication ASP.net MVC aplication. The
I have a requirement to create a multi level treeview in ASP.Net (with VB)
How do I create subdomains in ASP.NET? I have few links on my homepage(Home.aspx)
im trying to create a database for a feedback application in ASP.net i have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.