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 8610587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:10:14+00:00 2026-06-12T04:10:14+00:00

I run the code and it will not store the values it stops immediately

  • 0

I run the code and it will not store the values it stops immediately at the loadingfromscreen. What its supposed to do is a multi-page application form that will reinput the values to the texbox’s on the back button from the next form.

The ASP.net code is too long to post, but basically its just texbox’s and dropboxes. If needed i can post it, but the main issue im 90% sure is the C# code.

UPDATE: When i say stop it continues the code but will not run the dictionary method…i have put a arrow where the method stops in DICTIONARY ONLY

C#:

public partial class employment_driversapplication_personalinfo : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
    Dictionary<string, string> DriversApplicationData = (Dictionary<string, string>) Session["DriversApp"];

    try
    { 



            if (Page.IsPostBack)
            {
                LoadMemoryFromScreen(DriversApplicationData);
            }
            else
            {
                LoadScreenFromMemory(DriversApplicationData);
            }
              }

    catch //(Exception ex)
    {
       // throw new Exception("Exception occured in employment_driversapplication_personalinfo.aspx - Page_Load" + ex.Message);
    }
    finally
    {


    }
} 

private void LoadMemoryFromScreen(Dictionary<string, string> DicDriversApp)
    {

    DicDriversApp["position"] = position.Text; <---Stops here (won't even store this)
    DicDriversApp["fname"] = fname.Text;
    DicDriversApp["middleinitial"] = middleinitial.Text;
    DicDriversApp["lname"] = lname.Text;
    DicDriversApp["birthday"] = birthday.Text;
    DicDriversApp["proofofage"] = proofofage.SelectedValue;
    DicDriversApp["address"] = address.Text;
    DicDriversApp["city"] = city.Text;
    DicDriversApp["state"] = state.Text;
    DicDriversApp["email"] = email.Text;
    DicDriversApp["phone"] = phone.Text;
    DicDriversApp["altphone"] = altphone.Text;
    DicDriversApp["citizen"] = citizen.SelectedValue;
    DicDriversApp["whoreferred"] = whoreferred.Text;
    DicDriversApp["famfriend"] = famfriend.Text;
    DicDriversApp["relationship"] = relationship.Text;
    DicDriversApp["rateofpayexpected"] = rateofpayexpected.Text;
    DicDriversApp["rateofpaytype"] = RadioButtonList1.SelectedValue;
    DicDriversApp["employedNow"] = employednow.SelectedValue;
    DicDriversApp["curremployment"] = curremployment.Text;
    DicDriversApp["pastAddress"] = pastaddress.SelectedValue;
    DicDriversApp["previousAddress"] = previousaddress.Text;
    DicDriversApp["previousCity"] = previouscity.Text;
    DicDriversApp["previousZip"] = previouszip.Text;
    DicDriversApp["previousState"] = previousstate.Text;
    DicDriversApp["previousDuration"] = previousduration.Text;
    DicDriversApp["previousAddress1"] = previousaddress1.Text;
    DicDriversApp["previousCity1"] = previouscity1.Text;
    DicDriversApp["previousZip1"] = previouszip1.Text;
    DicDriversApp["previousState1"] = previousstate1.Text;
    DicDriversApp["previousDuration1"] = previousduration1.Text;

    Session["DriversApp"] = DicDriversApp;
    }

private void LoadScreenFromMemory(Dictionary<string, string> DicDriversApp)
{
    position.Text = DicDriversApp["position"];
    fname.Text = DicDriversApp["fname"] ;
    middleinitial.Text = DicDriversApp["middleinitial"];
    lname.Text = DicDriversApp["lname"];
    birthday.Text = DicDriversApp["birthday"];
    proofofage.SelectedValue = DicDriversApp["proofofage"];
    address.Text = DicDriversApp["address"];
    city.Text = DicDriversApp["city"];
    state.Text = DicDriversApp["state"];
    email.Text = DicDriversApp["email"];
    phone.Text = DicDriversApp["phone"];
    altphone.Text = DicDriversApp["altphone"];
    citizen.SelectedValue = DicDriversApp["citizen"];
    whoreferred.Text = DicDriversApp["whoreferred"];
    famfriend.Text = DicDriversApp["famfriend"];
    relationship.Text = DicDriversApp["relationship"];
    rateofpayexpected.Text = DicDriversApp["rateofpayexpected"];
    RadioButtonList1.SelectedValue = DicDriversApp["rateofpaytype"];
    employednow.SelectedValue = DicDriversApp["employedNow"];
    curremployment.Text = DicDriversApp["curremployment"];
    pastaddress.SelectedValue = DicDriversApp["pastAddress"];
    previousaddress.Text = DicDriversApp["previousAddress"];
    previouscity.Text = DicDriversApp["previousCity"];
    previouszip.Text = DicDriversApp["previousZip"];
    previousstate.Text = DicDriversApp["previousState"];
    previousduration.Text = DicDriversApp["previousDuration"];
    previousaddress1.Text = DicDriversApp["previousAddress1"];
    previouscity1.Text = DicDriversApp["previousCity1"];
    previouszip1.Text = DicDriversApp["previousZip1"];
    previousstate1.Text = DicDriversApp["previousState1"];
    previousduration1.Text = DicDriversApp["previousDuration1"];

}
  • 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-06-12T04:10:16+00:00Added an answer on June 12, 2026 at 4:10 am

    try something like this:

     private void LoadMemoryFromScreen()
        {    
         Dictionary<string, string> driver = new Dictionary<string, string>();
         driver.Add("position", position.Text);
         driver.Add("othervalue",value.Text); ///etc..
         Session["dict"] = driver;
        }
    

    then, later on if you want to access the values in your dictionary, use something like this:

    var dict = (Dictionary<string, string>)Session["dict"];
    

    problem with this is that you’re going to have to use dict.GetElementAt(index) in order to retrieve values, and i don’t think that’s a very good approach.

    This will work, but i kinda dont understand why you are using a dictionary to do this. I assume you are only loading data from 1 person on your page? Then you might as well just make a class with all the properties in it, and then you can just pass that around instead of using this dictionary/session hack.

    public class DriversApplicationData
    {
    public string position {get;set;}
    public string firstname {get;set;}
    //etc
    }
    

    then, you can just do something like

    DriversApplicationData data = new DriversApplicationData();
    data.position = position.Text;
    data.firstname = fname.Text;
    

    this is gonna be alot easier to maintain and to retrieve/insert values.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to run some code that will fetch some configuration values from the
When I run the first code and press ctrl-c immediately there will be no
I need to create a desktop application that will run third party code, and
i need run code that will create a database and populate tables. i am
What I'm trying to do is run some JavaScript code that will enter text
If I run this code, will each AppDomain execute in a different thread? ThreadPool.QueueUserWorkItem(delegate
I want this for some conditional compilation code that will run in all IE's
I have a PHP code, that will run a Select query to check if
I'm trying to write code in my controller that when run, will create a
When I try to run the code below the browser does not display an

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.