1

I have am generating a listView that looks like this

enter image description here

Now, on the click of the "Add To Briefcase" button, I need to go though the each item and email the once where user has entered quantity.

I saw I can do something like this

 foreach (var item in productFormsView.Items)
 {
     var somevalue = ((Form)item.DataItem).Quantity;
 }

However, item.DataItem is returning null as below. How do I get the text from "QUANTITY" textboxes?

enter image description here

1

1 Answer 1

1

when you click the button. there was a new request come to your web server.the productFormsView will be init,so the item is null. you can save the quantity data in some hidden filed by javascript when you click the button, and get the quantity from Request.Form["xxx"]

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.