Dropdownlist Losing Value On Postback


Enable/Disable ASP. How to force a postback on a value change of a dropDownList. Net Ajax to develop this custom field. But when I enter values in them and get a postback the values are gone. On Load I'm populating it with values, but upon submit ie. We have confirmed this (unable to obtain the "id" of the selected item during postback) as bug and a defect report has been logged for this. Value = "1";}} The problem is when I click the Cancel button, which invokes the Postback, thus the Page_Init event gets called but by that time the content of Hidden1 has been reset to empty/null. Hi, I need to save data in the grid when the user modifies and clicks on an asp button. NET AJAX Grid. (in the rendered source). The problem is that on postback the system only gives me values for combo boxes that were changed by the user. net c# example code demonstrate us how can we reset the dropdownlist on postback in an asp. by Scott Mitchell. Hi, I have a @Html. The amount of columns returned are based on a user's selection critiera from the page. dropdownlistfor. In tabs I have a Standard (not devexpress) textbox control and DropDownList. In this user control I have a dropdownlist which is populated dynamically. Retain the state of dynamic created controls or maintain the data of dynamic created/ added user control on postback in asp. Get each value of Dropdownlist in Gridview after Postback So i have here a dropddownlist inside a gridview. Hi, I have a dropdownlist in side a gridview, Onselectedindexchanged I want to some action. I'll cover the following topics in the code samples below: Page, VB. I have a ASP DropDownList that gets populated on the Page_Load event, after i select an item and hit a button the selected item gets cleared and the first item in the DropDownList gets selected. C# - Possible To Re-DataBind A DropDownList Upon Postback Triggered By SelectedIndexChanged Event? Feb 3, 2011. How do I save value in gridview after postback without using database. All, I've been banging my head against the wall for hours now, and my co-workers don't have an. 3) If the value is there I used jQuery datepicker API option called “setDate” to initialize the datepicker again with the value user entered. NET Building Controls. Handling Postbacks from a ModalPopup (C#) 06/02/2008; 2 minutes to read +1; In this article. DropDownList Within Composite Control Is Losing Selected Value On Postback Feb 23, 2010. UserControl values lost on PostBack - ASP. Just for a better appearance. The DropDownList control supports strongly typed HTML helpers represented by lambda expressions that have model or template passed into the View. In day to day life in programming we make use of Properties to pass data from Page to Web User Control and vice versa in asp. Per my issue, I was changing the value of the control thru javascript and even though the browser rendered the change, on the postback, the control still retained the original value. I am looping through the products and creating select options from them i. the value of the ID will change on every postback. A postback is an HTTP POST to the same page that the form is on. Steve's solution involves the addition of a simple server control in the Web Form, a technique that works in a myriad of browsers. Form except CheckBoxList control. In this way the Product dropdownlist is populated and no Page PostBack happens. Download Code or Download PDF. In tabs I have a Standard (not devexpress) textbox control and DropDownList. 6m developers to have your questions answered on RadAjaxManager losing drop down list value after Ajax postback of UI for ASP. 0 added a feature called event validation. Hence, I used CONDENSE on the key before appending the values to the drop down list internal table which was later passed on to function module 'VRM_SET_VALUES'. It will automatically populate set of DropDownList controls without page postback. How to force a postback on a value change of a dropDownList. How to get controls values like textboxes, checkbox, radiobuttons and dropdownlist back to controller from Razor view in mvc3. PostBack is done if certain credentials of the page are to be checked against some sources (such as verification of username and password using database). but I want to fill the listbox from an xml file. Because Telerik UI for ASP. you could look in the form collection for the value. Net DropDownList will be referenced using JavaScript or jQuery on Client Side and then its SelectedIndexChanged event will be called by making use of the __doPostBack JavaScript function. Value = Hello; Text = Hello World. (The DropDownList is only populated when the page is not postback) Help please. If the form validation fails then we have to show again the same form asking for changes in input data and submit again. I have a ListView (with nested controls including LinkButtons) and a data pager that is bound to a data source that loads items (Cases) in a user control (. hi, i am not clear wats ur requirment but wat i understood is tat u have a dropdown list with 3 values for eg 1,2 & 3 thne wen u select 2 u want tat 2 in the pai if tat is ur requirement then assign a fcode to tat field (dropdown field ) in screen painter field attributes. Here Mudassar Ahmed Khan has provided solution to a problem where the selected value of the jQuery DatePicker TextBox is lost after PostBack in ASP. NET Forums on Bytes. ddlState is in update panel. The FormCollection object. Here is the sample for this. 0 TextBox Ready Only losing client side changes, values across postback? Well, this has been under discussion for sometime and I knew this was a known issue although it was a design change in ASP. my problem is i have textbox,button with two dropdownlists, dropdownlists are inside gridview. After losing starting job, Toronto FC's Alex Bono finally gets a chance to play "Obviously there's shock value to it when it comes and it first hits you," Bono said Monday of his drop down the. The dropdownlist is loaded with crmservice calls to the entity on pageload in my asp. Tags: postback, repeater, viewstate trackback. NET I have a page menu. ValueType property value. 2) If the attribute is present I checked if it has some value which the user entered/selected before postback. how to retain value of dropdown list after postback which is extended by ajax cascading dropdownlist extendar. For example, storing an Integer in viewstate can be accomplished like this: VB. Dim column_name As String = column_x. net c# example code demonstrate us how can we reset the dropdownlist on postback in an asp. There are options like using AJAX callbacks on selectedIndex change of dropdownlist but sometimes it is needed that you postback the entire form and render it again. keep selected value after postback dropdown list Jun 23, 2011 05:06 AM | lvbasanta | LINK I have many dropdownlist binded to a datasource that is used to save items to a database, everythinng works, but when i save the items to the database i want to keep the last selected value of my dropdown to make more inserts with the same values. Problem is not able to find the dropdown list's selected values. Tag: post,yii,html. NET I have a page menu. Postbacks are commonly seen in edit forms, where the user introduces information in a form, hits "save" or "submit", causing a postback. ASPxComboBox may lose its selected value after a postback in the following situation: - You have non-unique ValueField values; - You have not defined a correct ASPxComboBox. A general approach to prevent a webpart from redrawing or reloading data when a webpart is refreshed via postback is to detect a postback. Any pointers?. In the article I will going to address those two questions. This article, by Steve Stchur, looks at how to easily maintain scroll position on postback in ASP. But, the grid doesnot persist data when coming into the click event - it is losing its state on postback. Do I use them when I'm updating a page 30-Jul-19 1. The text boxt are populate manualy but the DropDownList are populate dynamicaly from database. Posted by Sharpcnet under ASP. Use the DropDownList control to create a single-selection drop-down list Gets or sets a value indicating whether a postback to the server automatically occurs. net webpage code-behind. private void CreateDropdownListEmployee(string id,Panel pnl,. In a normal ASP. Most often, the key field name in the database has the 'integer' type, so I suggest you set ValueType to "System. The ASPxDropDownEdit's Text property stores a list containing selected items (that is, values of their Text property), separated by semicolons. But on form I have one DropDownList with AutoPostBack=true. I have gone to SE 51 and changed the AUART to list box. net application. In this way the Product dropdownlist is populated and no Page PostBack happens. How to select an item in a DropDownList by value Asp. For example if I choose a category "Category1", I get in the dropdownlist" SousCategorie " all sub categories relative to the category1. Solution walkthrough. Net DropDownList using JavaScript and jQuery. If you are starter then you will be searching for ways to do this. Posted on May 12, 2012 by chikkanti. On the first postback, the DropDown loses its selected value and goes back to default. But it doing postback but I don't want postback. Few days back one gentleman asked me that how can I select a row within a GridView control using CheckBox while the auto-postback property of the CheckBox is set to true. Try removing this line. The CascadingDropDown control in the AJAX Control Toolkit extends a DropDownList control so that changes in one DropDownList loads associated values in another DropDownList. The problem is that on postback the system only gives me values for combo boxes that were changed by the user. DropDownList lost SelectedItem at PostBack I click on my btnSeach and my selectedindex of dropdown goes to first index always my code is: Based on your description, it seems that you create the DropDownList dynamically, and hope to get the selectedValue on server side. This is populated from a database but the data it is populated with is dependent upon the current value in one of the datagrid's dropdownlist boxes. Hi, Im trying to make my own web custom control. got many similar pages that work, but this page is losing the selection each time I submit the form, and I don't know why. Retain Dropdown Selected Value After Postback Javascript. AddItemInList() function adds a new ListItem into the DropDownList based from the values entered from the TextBox Control. When there is a asp:DropDownList element with property AutoPostBack=true, a postback is triggered upon initializing the dropdown. And I was able to view the value of domainTypeOid upon initial page load. NET partial page postback Published 31/08/2011 When using JQuery to hook up events to your ASP. So if the 1st or 2nd Item is selected, you get Email1 and Email2 for. The ListItem class saves just its Text and Value property values in ViewState - it simply neglects its Attributes collection. NET Web Service application in Microsoft Visual Studio 2008. Hello: I am currently using WebDataGrid version 10. The problem is that after it places the value, postback occurs and value is lost. If the dynamic Web controls are not added at the correct time in the page's lifecycle, the values entered by the visitor will be lost on postback. NET AJAX ComboBox. So to retrieve the selected values we will use ViewState as shown below. I recently ran into the altogether common problem of the Html. Hi, All of you. Join a community of over 2. * The value of the textbox IS NOT lost after postback. NET, SelectedIndexChanged, Postback, and Initial Load. I am working with VS 2010, in Windows7, on IIS7. the browser only sends back the selected value to the server. Hi, Im trying to make my own web custom control. ProductName. Getting the selected value of dropdownlist: At any point in time, only one item in the dropdown list can be selected. hello, I want to ask how to keep the value selected in the dropdown list (within a search filter) when I navigate in the pages of the search results (using the pager), because I am losing the filter values on navigation, for example: after filtering products to choose only Laptops, and navigating to the second page of the search results, the products refresh and remove the condition. users to select an item. I used update panel and Trigger with AsyncPostBackTrigger but I did not get success. TextBox), the value in that controls is lost on postback of the page. 3) If the value is there I used jQuery datepicker API option called "setDate" to initialize the datepicker again with the value user entered. This is why when extending, say, the CheckBoxList (as we did in ListControl Items and Attributes) to support item-level attributes the extended control does not remember the attribute values - the ListItem isn't saving it!. Answered Active Solved. NET form elements. DropDownList, it's name property is the same as your model's property name, you pass a SelectList with you selected value, but in the UI it's not showing your expected selection. Net with C# and VB. Say this is my GridView bound to a SqlDataSource that get’s the products details. Dynamically created DropDownList loses selected Item on Postback When click import button, this will displays a first item from dropdownlist only. Any pointers?. Select only the header row and the data, if you include the filter row it won't work. If you use: ddlInfo. The dropdownlist is loaded with crmservice. Net has provided a feature using which controls like DropDownList, CheckBoxList, RadioButtonList, etc. keep dropdownlist selected value after postback dropdownlist selected value after. dropdownlistfor. Few days back one gentleman asked me that how can I select a row within a GridView control using CheckBox while the auto-postback property of the CheckBox is set to true. I am looping through the products and creating select options from them i. In this article I will describe after binding data or values from an XML file to a DropDownList when we will select a particular item in the DropDownList it will display the selected item without any post back to the server. 0 Any help would be greatly appreciated. Dynamically created DropDownList loses selected Item on Postback When click import button, this will displays a first item from dropdownlist only. Ive made a control with 2 textboxes and 1 dropdownlist. There are options like using AJAX callbacks on selectedIndex change of dropdownlist but sometimes it is needed that you postback the entire form and render it again. The items have different content for Value and Text. I have a DropDownList that obtains its values from a database. I have created a JSP page and i placed a dropDownList on. 2199 and am wondering if with the WebDataGrid control, it is possible to persist template column controls and values on postbacks and / or callbacks without having to recreate them each and every time in the Preinit event. DropdownList to preserve the value. How to get controls values like textboxes, checkbox, radiobuttons and dropdownlist back to controller from Razor view in mvc3. Hi, I have a dropdownlist in side a gridview, Onselectedindexchanged I want to some action. How can I make dropdownlist no postback - I have a dropdownlist which I put a code in selected indexchanged - basically for every indexchanged the code will connect to sql and get values then populate textboxes with values. Dynamically created controls are lost on PostBack and hence we need to recreate the dynamic controls in the PreInit event of the page. When I select value in DropDownList AjaxFileUpload lose the value. Hi, I have a @Html. The effect is more or less the same. The problem here is that, if the the people editor control is disable, and when he clicks the button PeopleEditor is just an empty string. Answered Active Solved. Now after the Postback, I am losing it's value having a a NullReferenceException. Tag: post,yii,html. We get the value of the selected item in the DropDownList by casting sender, then we add Key and Value if key does not exist or reset value of the existing key to a new value. In this article I am going to discuss how to postback a form on ASP. How to determine which Control caused PostBack The sample code demonstrates how to create a web application that can determine which control cause postback event on an Asp. Hello, I have a datagrid which is being bound to a DataView who's dimensions are unknown at design time. Two dropdownlists are one is ddlcountry and another one is ddlstates. Steve's solution involves the addition of a simple server control in the Web Form, a technique that works in a myriad of browsers. In Focus Saving DropDownList Selected Value Across PostBack in MVC. DropDownList Postback clears the selected value. I am not sure I understand what you mean. The edit form shows all of the data from the selected item except for those with a drop down. AspxComboBox was lose data after a post back, but this didn't happen in the standard dropdown control, it is working I'm not sure if it's something I am doing any mistake in AspxComboBox. Lost selection from dropdownlist after postback??? The list of the second one (ddl_2) is depend on the selected value of the first one (ddl_1). Net AJAX for SharePoint. On PostBack however (the ListItemCollections are not re-generated on postback) the ListItems in the dropdownlist contain the. Net FileUpload After PostBack. This works fine, but now the users want another drop down box to be added and filled with different options depending on what they pick from the first drop down box. I also used Updatepanel but after that the action what I want its not happening. When there is a asp:DropDownList element with property AutoPostBack=true, a postback is triggered upon initializing the dropdown. How can I make dropdownlist no postback - I have a dropdownlist which I put a code in selected indexchanged - basically for every indexchanged the code will connect to sql and get values then populate textboxes with values. NET Data Grid Control. NET User Control Not Retaining Postback Values. I see many people coming across same issue of how to set the SelectedValue of a DropDownList that is inside of a GridView. I am trying to get the selected value of the dropdownlist. NET Web Service application in Microsoft Visual Studio 2008. We at times come across a requirement where a feature in a web application is supposed to behave similar to that of its windows counterpart. And there is no code in my html page or code behind where I clear the value of Hidden1. Retain the state of dynamic created controls or maintain the data of dynamic created/ added user control on postback in asp. Retaining drop down list box value of a form after posting From a drop down list box or combo box visitor selects one option and submits the form. Using Auto-Postback with CascadingDropDown (C#) 06/02/2008; 2 minutes to read +1; In this article. But on form I have one DropDownList with AutoPostBack=true. 6m developers to have your questions answered on Radcombobox not retaining selected value after postback of UI for ASP. [Solved] DropDownList Selected Value getting lost on PostBack in ASP. If you are starter then you will be searching for ways to do this. Postbacks are commonly seen in edit forms, where the user introduces information in a form, hits "save" or "submit", causing a postback. A postback is an HTTP POST to the same page that the form is on. 0 Any help would be greatly appreciated. In Focus Saving DropDownList Selected Value Across PostBack in MVC. Datatable Reload Without Postback. How do I get the default value, <--Choose City--> as selected value again. Can any one helpme out in stoping the PostBack. When RadConfirm is used, the button's click() method is used to initiate the postback if the user confirms the action. For example, storing an Integer in viewstate can be accomplished like this: VB. 1) Checked if the text box has the attribute called “Value” present. NET on 11/5/2013 // Next time submit and Session has values but FileUpload is. NET DropDownList. Hi, Im trying to make my own web custom control. On the first postback, the DropDown loses its selected value and goes back to default. Rilen Taylor matched with someone on a dating site, but the experience went sour when the match insisted Taylor identify as only one gender, either as a man or as a woman. I had this issue when dynamically populating a drop down box using javascript on a previous user selection. Controls are losing values on postback Hello I have two dropdowns in a gridview that need cascading functionality but I have experianced problems with the cascading drop down extenders in the past so I have decieded to write my own javascript. God put eyes in the front of our head, feet pointing forward, and arms that move forward freely. Hi Fever, Thanks for using syncfusion products, Query: Dropdown list how to show data to index 0 instead value empty We would like to let you know that we have provided a property called “selectedItemIndex” which is used to specify which item value to be displayed in the dropdown list. Join a community of over 2. NET TextBox Control (for example), and it's READONLY or DISABLED, the postback won't catch the changed value. but I want to fill the listbox from an xml file. Test question: I have a form which binds data to a Repeater on PageLoad. DropDownList, it's name property is the same as your model's property name, you pass a SelectList with you selected value, but in the UI it's not showing your expected selection. I can get the dropdown loaded but after postback it is empty. NET AJAX Ajax. populate a "ReadOnly" text box with another textbox's value onblur (OnTextChanged with codebehind) so that two are in synch, and the "driver" textbox is the "control value" for the read-only textbox. This raises a couple issues because we may not know all of the legal values the control can take. On clicking save button, the page is getting posted back and gridview values are getting cleared, due to which i am not able to save the latest data. Net MVC dropdownlist's selected item's index change. Set Selected Value for DropdownList on Clientside using Javascript May 29, 2010 collecteddotnet 3 Comments Sometimes we need show the dropdownlist control with some selected value after some activity ( without server postback ) on the web page. In this article I am going to discuss how to postback a form on ASP. ascx) on a page. NET AJAX ComboBox. So to retrieve the selected values we will use ViewState as shown below. ASPxComboBox may lose its selected value after a postback in the following situation: - You have non-unique ValueField values; - You have not defined a correct ASPxComboBox. C# - Possible To Re-DataBind A DropDownList Upon Postback Triggered By SelectedIndexChanged Event? Feb 3, 2011. Rishitnandan. Here I will explain how to use jQuery to set dropdownlist selected value or text based on value / text or jQuery set dropdownlist value based on value or text with example. In this way the Product dropdownlist is populated and no Page PostBack happens. Forum Thread - DateTimePicker lose date value after postback - ASP. Hi All, I have a server runnable textbox control. If, say, the script was programmed to only accept capital letters, then a drop-down menu would secure that no invalid entries were made. by Scott Mitchell. In both cases I first clicked Button1 to set the textbox's value to "1" and then clicked Button2 to perform a postback. Ive made a control with 2 textboxes and 1 dropdownlist. So if the 1st or 2nd Item is selected, you get Email1 and Email2 for. if i select country from ddlcountry , country related states comes in ddlstates. I need to retain its value in every postabck(. I also used Updatepanel but after that the action what I want its not happening. Enable/Disable ASP. 0 Any help would be greatly appreciated. Introduction In this article we will see how to use the DropDownList control in ASP. 6m developers to have your questions answered on RadAjaxManager losing drop down list value after Ajax postback of UI for ASP. In a normal ASP. set { Session["ModificationMode"] = value; }} In the PageLoad, I set it's value. How to load the dropdownlist box without postback? eg: if you choose country in one dropdown the corresponding states wil fetch in another dropdo. I can get the dropdown loaded but after postback it is empty. This property can use viewstate to store its value rather than a member variable that would lose the value over a postback. The ModalPopup control in the AJAX Control Toolkit offers a simple way to create a modal popup using client-side means. I am getting the drop down but I am not able to see the F4 values in drop down. ProductName. I can click the drop down and the list will be there. hello, I want to ask how to keep the value selected in the dropdown list (within a search filter) when I navigate in the pages of the search results (using the pager), because I am losing the filte. There are options like using AJAX callbacks on selectedIndex change of dropdownlist but sometimes it is needed that you postback the entire form and render it again. 6m developers to have your questions answered on Dropdownlist get's lost after invalid form submit of Kendo UI for jQuery DropDownList. The DropDownList will not retain it's values when a Postback is done (caused by a submit button being pressed), and I cannot use the. Dropdownlist will render on page at runtime without value being populated. NET forum, you can post the issue on ASP. Hi, All of you. Use Popup To Postback/Update It’s Parent/Opener Without losing ViewState Values And Close JIT (Just In Time) Debugger with Visual Studio. Selecting items from listbox without postback i have a listbox which shows some categories in a listbox and a checkbox list for each of the selected categ. On Load I'm populating it with values, but upon submit ie. Upon return it places the value in the textbox (client side script). To solve the problem with exceptions after change of the drop-down selected item, you need to create controls for old value of the drop-down first and then for the new value in the even handler. C# DropDownList selecting a value. Here is the code with the control that I am trying to run a postback with; the id. Hi guys On tweeter template I changed the template to keep the searchbox on all pages. Select only the header row and the data, if you include the filter row it won't work. To understand, here all my code : Aspx code:. One of the elements is a checkboxlist. On selection of country i have populated its states using selectedindexchanged event of ddlCountry. Any suggestions. Other dropdownlists where new values have been added also reset and lose their new values. I have a DropDownList that obtains its values from a database. The problem is that on postback the system only gives me values for combo boxes that were changed by the user. Dropdownlist not keeping viewstate after postback - ASP. Net DropDownList from getting Lost / Cleared / Reset on PostBack when the Submit button is clicked. When having a custom control that has some controls in it (e. dropdownlist ClearSelection() method clears out the list selection and set the selected property of all items to false. *When the drop down list value changes and the postback occurs the data that I had. The dropdown list named ShowDetail has two. Losing Textbox Value On Postback? Jun 9, 2010. NET DropDownLost loses values on PostBack. I have a dropdownlist with the autopostback set to true. I have gone to SE 51 and changed the AUART to list box. populate a "ReadOnly" text box with another textbox's value onblur (OnTextChanged with codebehind) so that two are in synch, and the "driver" textbox is the "control value" for the read-only textbox. AspxComboBox was lose data after a post back, but this didn't happen in the standard dropdown control, it is working I'm not sure if it's something I am doing any mistake in AspxComboBox. When there is a asp:DropDownList element with property AutoPostBack=true, a postback is triggered upon initializing the dropdown. NET Forums on Bytes. Lost selection from dropdownlist after postback??? The list of the second one (ddl_2) is depend on the selected value of the first one (ddl_1). I tried to reload the page from the onchange event of the first drop down but this loses the selected value. Form except CheckBoxList control. In the postback event I need the selected value and a rowindex or other value to know which row/record the dropdown is in. August 30, 2014, 4:12am #1. In this way the Product dropdownlist is populated and no Page PostBack happens. There is Categories DropDownList used to display the Category of the product but the field. Note In the sample code that is provided, the project name of the C# sample project is KB_CascadingDDL_CS. In this article we will examine how to add dynamic Web controls to a page in such a manner that you will not need to worry about losing form field values on postback. The DropDownList will not retain it's values when a Postback is done (caused by a submit button being pressed), and I cannot use the. how to retain value of dropdown list after postback which is extended by ajax cascading dropdownlist extendar. How to get a drop down list with the selected value across the Post back. Net C# without creating a web service. Get each value of Dropdownlist in Gridview after Postback So i have here a dropddownlist inside a gridview. The page on_load event loads the default value of each dropdown box. [Solved] Bootstrap Modal Popup Auto Closes on PostBack in ASP. Net Created: 31/10/2013 07:56:09 p. I tried to reload the page from the onchange event of the first drop down but this loses the selected value. Hi, Im trying to make my own web custom control. 0 To reproduce using the code below, press button 1. keep selected value after postback dropdown list Jun 23, 2011 05:06 AM | lvbasanta | LINK I have many dropdownlist binded to a datasource that is used to save items to a database, everythinng works, but when i save the items to the database i want to keep the last selected value of my dropdown to make more inserts with the same values. Answered Active Solved. Here is the sample for this. In the gridview, I got a dropdown list for each line that pre-selects an option depending on the DB value for that. how to retain value of dropdown list after postback which is extended by ajax cascading dropdownlist extendar. NET Forums on Bytes. Other dropdownlists where new values have been added also reset and lose their new values. DropDownList lost SelectedItem at PostBack I click on my btnSeach and my selectedindex of dropdown goes to first index always my code is: Based on your description, it seems that you create the DropDownList dynamically, and hope to get the selectedValue on server side. Do I use them when I'm updating a page 30-Jul-19 1. by Scott Mitchell. Net DropDownList will be referenced using JavaScript or jQuery on Client Side and then its SelectedIndexChanged event will be called by making use of the __doPostBack JavaScript function. Is there some other way to have the lists on one sheet, get unique values and sort them, then reference them from a drop down on another worksheet?. i'm using a code in asp. Last Reply on Nov 14, 2016 09:43 AM By dharmendr. Rishitnandan. This page provides solutions to common issues you may encounter while working with Telerik UI for ASP. But in the postBack the selected values cannot be retrieved. Retain the state of dynamic created controls or maintain the data of dynamic created/ added user control on postback in asp. So to retrieve the selected values we will use ViewState as shown below.