Question

I have a FormView that contains three list boxes and a user control. The user control is a grid that inserts and updates data while the form is in edit or insert mode. The problem I am having is that the postbacks generated by the user control are wiping out the listbox values. There is existing code that rebuilds the ListBoxes when a post back occurs by clicking on the insert/update button, and it works correctly. But when the user control does a post back the request.Form collection for the ListBoxes is null. The code that rebuilds the list box values uses Request.Form to retrieve the values. I don't want validation to occur everytime the user control causes a post back, but what changes do I need to make to the user control or the FormView so that the Request.Form variables are not null?

Was it helpful?

Solution

the listbox options were being filled in via a popup, but the values were not selectd. The idea was that whatever options appeared in the listbox were the ones to update, so all i had to do was use javascript to select them all before each page load, and problem solved.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top