javascript problem asp.net

P

pl

1) build drop down list on server
2) manipulating lists on the client using javascript
3) when postback to server, lost the values that were
manipulated on the client.
4) how we defined to client js
cboInternalOrigin.Attributes.Add
("OnBlur", "CheckRequiredField()")
4) why ? is there another way to define?
 
J

Jalil Vaidya

If you are adding attributes to the dropdown control using client side
scripting, they will be lost on server side because they are not part of
post data. Either add the data to the value attribute and make sure the
item is selected when submitting the form or add the data to the value
of a hidden element which you can access from the server side on postback.

Jalil Vaidya
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top