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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:51:48+00:00 2026-06-03T21:51:48+00:00

Consider the following: A text value added to a textbox on the client is

  • 0

Consider the following: A text value added to a textbox on the client is added to viewstate on postback (thus the value is still present in the textbox when the page has reloaded).

How come when I move a value from listbox1 to listbox2 via jquery the items in listbox2 are not added to viewstate. (note: the items are selected before POST and the values in listbox2 are available on the server on postback via request.form.getvalues(“listbox2”).getvalue(index).tostring())

I’m not looking for a work around, I’ve got that. I’m want to know “why” the listbox2 values are not added. Is there some event being fired for the textbox but not the listbox? Just trying to better understand what’s going on. Thanks!

  • 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-03T21:51:49+00:00Added an answer on June 3, 2026 at 9:51 pm

    A text value added to a textbox on the client is added to viewstate on postback (thus the value is still present in the textbox when the page has reloaded).

    This statement is incorrect. The value of a TextBox server control is preserved across postbacks because the browser sends it in the post data, and on postback the TextBox copies the value from the post data to its Text property. View state is not involved, as you can verify by setting EnableViewState="False". (I’m assuming here that the TextBox is visible and enabled; otherwise, the browser doesn’t sent its value in the post data, and view state is required to preserve the value.)

    How come when I move a value from listbox1 to listbox2 via jquery the items in listbox2 are not added to viewstate.

    For a multi-selection ListBox server control, the browser sends the value of each selected item in the post data. On postback, the ListBox looks at each value in the post data, searches for the corresponding item in its Items collection, and sets that item’s Selected property to True. It doesn’t add unrecognized values to the Items collection; instead, if event validation is enabled, it throws an “Invalid postback or callback argument” exception. Again, view state is not involved.

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

Sidebar

Related Questions

Consider the following jsf page: <h:body> <h:form id=SessionStartDialog> <table> <tr> <td class=label> <h:outputLabel value=Enter
Consider the following tweets table tweet_id user_id text ----------------------------------------- 1 1 look at my
Consider the following picture representing the WCF channel stack: alt text http://i.msdn.microsoft.com/ee672186.image001(en-us).jpg I'm implementing
Consider the following table tweets tweet_id call_id id_str timestamp text -------------------------------------------------- 1 11 12345
consider the following pgSQL statement: SELECT DISTINCT some_field FROM some_table WHERE some_field LIKE 'text%'
Please consider the following tweets table: tweet_id user_id text ---------------------------- 1 1 lorem ipsum
Let's consider the following scenario. I have the following page where all rendered elements
Please consider the following: DECLARE @xml XML SET @xml = '<Capture> <Data><DataType>Card Number</DataType><Value>1234567898765</Value></Data> <Data><DataType>Expiry
Consider the following code for printing questions from text file: foreach ($lines as $line_num
Consider the following text from the PostgreSQL documentation on binary copying: 11-byte sequence PGCOPY\n\377\r\n\0

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.