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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:25:17+00:00 2026-05-27T01:25:17+00:00

I have a problem that I cant seem to find a solution to, even

  • 0

I have a problem that I cant seem to find a solution to, even though there are very similar questions to it.

Basically I have text boxes that are programmatically created in my Page_Load method. They are filled with values from certain cookies.

I then have a ‘Update’ button, which, when clicked, should update the cookie that was loaded into the textbox.

So I gave the ID of the text box, the same name as the cookie, then on the On_Click method of the update button, I cycle through the text boxes and update the cookie (ID name) with the value in the text box.

However, this is not working. What I have tried is as follows.

The controls are simply created in the onload method. Then when you click the button after you have changed the text box, the onload method is called again, thus changing the textbox back to the original and updating it the way it was.

The controls are created in the onload method after checking for if (!Page.IsPostBack). This does not work because the page load method is called first and doesn’t create the controls on the screen. Your left with a blank screen and no updated cookies.

I tried EnableViewState which didnt work, and I tried creating the controls on their own when (Page.IsPostBack) but still nothing.

Any ideas?

  • 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-27T01:25:17+00:00Added an answer on May 27, 2026 at 1:25 am

    Yuo should create the controls in the onLoad method and give them the initial value inside the if (!Page.IsPostBack) code block. This way you will create the control tree everytime but you won’t reinitialize the values loosing the updated values.

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

Sidebar

Related Questions

I seem to have a problem that I can't find the solution for myself,
I have a wierd problem that I can't seem to find the solution, probably
I have a head aching problem that I can't seem to find an easy
May be a easily solvable problem but I cant seem to find a solution.
I have a problem that i cant solve :( I have a user control
I have a weird problem that i can't figure out a solution for: I've
This may be a common problem but I'm struggling to find a solution that
I have a problem when using Jython, but I can't seem to find a
I have been looking everywhere but can't seem to find a good solution for
i have a problem that i can't solve ! (sqlite3, but i think it

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.