By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,625 Members | 1,267 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,625 IT Pros & Developers. It's quick & easy.

Updating list from client-side script

P: n/a
Hi all

I have a ListControland it is updated by client-side script, the client
script adds a new item and gives it a value and a key.

The problem is when it's posted back the server the items that have been
added are all blank - the text and value properties are "".

Any ideas?

Thanks
Kev
Nov 19 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
You need to pass the data to the server and add the item to the ListControl
on the server side. This can be done using JavaScript and hidden form
fields.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
I'd rather be a hammer than a nail.

"Mantorok" <no**@tiscali.co.uk> wrote in message
news:dh**********@newsfeed.th.ifl.net...
Hi all

I have a ListControland it is updated by client-side script, the client
script adds a new item and gives it a value and a key.

The problem is when it's posted back the server the items that have been
added are all blank - the text and value properties are "".

Any ideas?

Thanks
Kev

Nov 19 '05 #2

P: n/a
Well, the scenario is that the user has an empty ListControl with a popup
button the right, they click the button, a modal popup list is then
presented, the user selects their item(s) and then the javascript plonks the
value(s) into the listbox.

From what you're saying I can't really do it that way AND have it posting
the items back?

Kev

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:ey**************@TK2MSFTNGP09.phx.gbl...
You need to pass the data to the server and add the item to the
ListControl on the server side. This can be done using JavaScript and
hidden form fields.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
I'd rather be a hammer than a nail.

"Mantorok" <no**@tiscali.co.uk> wrote in message
news:dh**********@newsfeed.th.ifl.net...
Hi all

I have a ListControland it is updated by client-side script, the client
script adds a new item and gives it a value and a key.

The problem is when it's posted back the server the items that have been
added are all blank - the text and value properties are "".

Any ideas?

Thanks
Kev


Nov 19 '05 #3

P: n/a
Course you can.

You put the hidden field on the base form and pass the values to and from
the popup. I agree this is crap, but for some weird reason it does not even
add this to the list of controls/values posted back to the server. I think I
am going to post a seperate question on jsut that actually.


"Mantorok" <no**@tiscali.co.uk> wrote in message
news:dh**********@newsfeed.th.ifl.net...
Well, the scenario is that the user has an empty ListControl with a popup
button the right, they click the button, a modal popup list is then
presented, the user selects their item(s) and then the javascript plonks
the value(s) into the listbox.

From what you're saying I can't really do it that way AND have it posting
the items back?

Kev

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:ey**************@TK2MSFTNGP09.phx.gbl...
You need to pass the data to the server and add the item to the
ListControl on the server side. This can be done using JavaScript and
hidden form fields.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
I'd rather be a hammer than a nail.

"Mantorok" <no**@tiscali.co.uk> wrote in message
news:dh**********@newsfeed.th.ifl.net...
Hi all

I have a ListControland it is updated by client-side script, the client
script adds a new item and gives it a value and a key.

The problem is when it's posted back the server the items that have been
added are all blank - the text and value properties are "".

Any ideas?

Thanks
Kev



Nov 19 '05 #4

P: n/a

"Mr Newbie" <he**@now.com> wrote in message
news:Or*************@TK2MSFTNGP12.phx.gbl...
Course you can.

You put the hidden field on the base form and pass the values to and from
the popup. I agree this is crap, but for some weird reason it does not
even add this to the list of controls/values posted back to the server. I
think I am going to post a seperate question on jsut that actually.


Yeah that is what I've ended up doing, seems silly to allow you to populate
lists and not have the content posted back, I understand why it cannot be
done but it still sucks.

Kev
Nov 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.