I have a listbox which I am populating on the client (it contains a list of
dates selected from calender). The listbox is a server control.
When I get to the server after postback by selecting an item in the list,
the list box cannot be accessed.
How do I repopulate the listbox on the server after postback and be able to
access the elements? 6 1543
what do you mean it cant be accessed? Is there an error?
Could you show the code you are using.
You should be able to loop through the Items collection on it, as long as
you aren't wiping the values with the postback prior to reading them.
--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
"P K" wrote: I have a listbox which I am populating on the client (it contains a list of dates selected from calender). The listbox is a server control. When I get to the server after postback by selecting an item in the list, the list box cannot be accessed. How do I repopulate the listbox on the server after postback and be able to access the elements?
When I say the list box cannot be accessed, I mean that on the server the
listbox shows that there are no items in it.
The items in the list were populated on the client side using javascript and
no server binding was done
"Curt_C [MVP]" wrote: what do you mean it cant be accessed? Is there an error? Could you show the code you are using. You should be able to loop through the Items collection on it, as long as you aren't wiping the values with the postback prior to reading them.
-- Curt Christianson site: http://www.darkfalz.com blog: http://blog.darkfalz.com "P K" wrote:
I have a listbox which I am populating on the client (it contains a list of dates selected from calender). The listbox is a server control. When I get to the server after postback by selecting an item in the list, the list box cannot be accessed. How do I repopulate the listbox on the server after postback and be able to access the elements?
Try this sample: http://www.societopia.net/samples/li...lientside.aspx
You need to manage the ViewState of the added ListItems.
--
HTH,
Phillip Williams http://www.societopia.net http://www.webswapp.com
"P K" wrote: When I say the list box cannot be accessed, I mean that on the server the listbox shows that there are no items in it. The items in the list were populated on the client side using javascript and no server binding was done
"Curt_C [MVP]" wrote:
what do you mean it cant be accessed? Is there an error? Could you show the code you are using. You should be able to loop through the Items collection on it, as long as you aren't wiping the values with the postback prior to reading them.
-- Curt Christianson site: http://www.darkfalz.com blog: http://blog.darkfalz.com "P K" wrote:
I have a listbox which I am populating on the client (it contains a list of dates selected from calender). The listbox is a server control. When I get to the server after postback by selecting an item in the list, the list box cannot be accessed. How do I repopulate the listbox on the server after postback and be able to access the elements?
Thanks ..That helps
"Phillip Williams" wrote: Try this sample: http://www.societopia.net/samples/li...lientside.aspx
You need to manage the ViewState of the added ListItems. -- HTH, Phillip Williams http://www.societopia.net http://www.webswapp.com
"P K" wrote:
When I say the list box cannot be accessed, I mean that on the server the listbox shows that there are no items in it. The items in the list were populated on the client side using javascript and no server binding was done
"Curt_C [MVP]" wrote:
what do you mean it cant be accessed? Is there an error? Could you show the code you are using. You should be able to loop through the Items collection on it, as long as you aren't wiping the values with the postback prior to reading them.
-- Curt Christianson site: http://www.darkfalz.com blog: http://blog.darkfalz.com "P K" wrote:
> I have a listbox which I am populating on the client (it contains a list of > dates selected from calender). The listbox is a server control. > When I get to the server after postback by selecting an item in the list, > the list box cannot be accessed. > How do I repopulate the listbox on the server after postback and be able to > access the elements?
On Wed, 09 Nov 2005 09:22:02 -0800, Curt_C[ MVP] wrote: what do you mean it cant be accessed? Is there an error? Could you show the code you are using. You should be able to loop through the Items collection on it, as long as you aren't wiping the values with the postback prior to reading them.
I am interjecting here :(. However, it seems that what is happening here
is that the listbox entries are generated by the client. The server has no
idea about them. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Broder |
last post by:
Hi there,
I am currently running into a somewhat weired problem and hope that this NG
is able to help ;-)
I have a table in a MSSQL Server in which there is one Column that stores a
date. The...
|
by: Bill Brinkworth |
last post by:
I want the user to type in part of a word, and I want to return all words
from an Access word table that contains specified letters. If they were to
type "fe??", it should return all words in the...
|
by: collie |
last post by:
Hi,
I have 2 listboxes. The first gets populated from the db as soon as
the page loads. The second listbox get populated based on the user's
selection from the first listbox. However,...
|
by: Chris Leuty |
last post by:
I am populating a multiselect Listbox from a dataset, with the content of
the listbox filled by one table, and the selections determined from another
table. So far, I have been keeping the dataset...
|
by: Casey |
last post by:
hello,
I need to populate a drop down list when the user clicks
on the arrow button.
how do i do this.
Should i use a html select control or is it possible
using the asp:dropdownlist
|
by: jack-b |
last post by:
Hi,
I have a list box which displays countries names and a second listbox
which displays their cites (based on the selection made in ListBox 1)
If the user selects USA i want to display cities...
|
by: CraigMuckleston |
last post by:
I have the following php code that retrieves a list of items. I want to populate a listbox with the XMLHttpRequestObject, but I am getting 1 long string instead of each item on a line. How can I...
|
by: NvrBst |
last post by:
I populate a ListBox with a LogFile that has about (~1000 lines). The
ListBox's datasource is a BindingList<string>. Whenever I add the
elements, with the datasource set, it takes about 2 mins.
...
|
by: TG |
last post by:
Hi!
I am using VB 2008 with SQL Server 2000 and SQL Server 2005 (depending
which server the user selects to connect to).
I have a listbox in which the user select the server to connect to.
...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |