Updating list from client-side script

  • Thread starter Thread starter Mantorok
  • Start date Start date
M

Mantorok

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
 
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.
 
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
 
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.
 
Mr Newbie said:
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
 
Back
Top