DataTable unable to post in MVC3 Html.BeginForm?
DataTable unable to post in MVC3 Html.BeginForm?
                    In an MVC3 project, I am using a datatable to display information from a list.
Here is the body:
[code]
@foreach (var event_ in Model)
{
using (Html.BeginForm("Index", "Events"))
{
            
                
                    
@event_.event_.EventDate
                
@event_.event_.Name
                
@event_.eventType.Name
                
@event_.event_.Description
                
@event_.event_.Location
                
@event_.event_.EventDuration
                
@event_.event_.MaxClassSize
                
@event_.event_.isOpen
                
@event_.event_.ContactName
                
@event_.event_.ContactEmail
                
@event_.event_.ContactPhone
                
                
                    
                        
                        
                        
                    
                
            
}
}
    
[/code]
However, when clicking on any of the submit buttons, it does not post back to the controller. If i remove the datatable class on the table, i am able to post to the controller.
Any ideas?
                            Here is the body:
[code]
@foreach (var event_ in Model)
{
using (Html.BeginForm("Index", "Events"))
{
@event_.event_.EventDate
@event_.event_.Name
@event_.eventType.Name
@event_.event_.Description
@event_.event_.Location
@event_.event_.EventDuration
@event_.event_.MaxClassSize
@event_.event_.isOpen
@event_.event_.ContactName
@event_.event_.ContactEmail
@event_.event_.ContactPhone
}
}
[/code]
However, when clicking on any of the submit buttons, it does not post back to the controller. If i remove the datatable class on the table, i am able to post to the controller.
Any ideas?
This discussion has been closed.