Need to post label values also along with my textbox values in form collection in mvc4

Posted by kallamjreddy-17301 under ASP.NET on 11/26/2012 | Points: 10 | Views : 1739 | Status : [Member] | Replies : 3
Hi there,

I have a requirement like i need to provide customer to add multiple addresses on in his registartion form, my requirement is to show all of the addresses in divs binded to labels and i need to post all the data along with addresses(which includes texboxes) to controller through form collection.The issue is i am not getting the labels in form collection but i am getting textboxes, If i put textboxes in place of lables it looks Odd so any please try to help me........I am using MVC4 (Posting fron view to controller action method).


Thanks In Advance....




Responses

Posted by: Funda on: 11/27/2012 [Member] Starter | Points: 25

Up
0
Down
send your label or view...i can chek that...all the element inside the form will be reterived in form collection which are binded to Model..and the posted contoller [Submit Button]

kallamjreddy-17301, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: kallamjreddy-17301 on: 11/27/2012 [Member] Starter | Points: 25

Up
0
Down
i am generating the html controls dynamically using java script as the data in labels not getting posted i used text boxes instead, which looks very odd so need to have a label whose data can accessed through form collection in my controller........we cannot get labels data in form collection as per the R&D i have done i found out that we cannot post the label to controller.......suggest me with an alternative except(hidden field)

kallamjreddy-17301, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Funda on: 11/27/2012 [Member] Starter | Points: 25

Up
0
Down
how your binding the value to the dyanmic controller ?...using model ?....can u send the code...

kallamjreddy-17301, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response