formcollection not see me all inputs

Posted by sanfra1983 on Stack Overflow See other posts from Stack Overflow or by sanfra1983
Published on 2010-04-01T17:54:56Z Indexed on 2010/04/01 18:33 UTC
Read the original article Hit count: 489

Filed under:
|

Hi, I have a View where some input text to be added dynamica using jquery, I mean everything funzona, and when I go to add these inputs and do right button on the browser I'm not seeing the added input.

function addPerson () (

current + +; 

StrToAdd var = '<table id="compo" name="compo"' + current +'> <tr> <td> <label for="firstname"' + current +'"> Name </ label> <input id = 'firstname' + current + '"name =" Componenti.Nome_ "' +" "+ current +" "+ '" size = "29" /> </ td> <td> <label for = "lastname"' current + + '"> Name </ label> <input id="lastname''" name="Componenti.Cognome_"' + + + current + current'" size="29" /> </ td>' 

StrToAdd + = '<td> <label for="luogonascita"' + current +'"> LuogoNascita </ label> <input id = "luogodinascita' + current + '" name = "Componenti.Luogonascita_"' + "" + current + "" + '"size =" 29 "/> </ td>' 

StrToAdd + = '<td> <label for="datanascita"' + current +'"> DataNacita </ label> <input id = "dateOfBirth' + current + '" name = "Componenti.datanascita_"' + current + ' "size =" 29 "/> </ td> </ tr> </ table> ' 

StrToAdd + = '<script type="text/javascript"> jQuery (function ($) {$("# dateOfBirth' + current + '). mask ("' + mask +'")});</ script > '; 

$ ('# Components'). Append (StrToAdd); 

)

The problem is that when I pass the data via post in the action, and I go to create the education

var valueProvider= formanagrafica.ToValueProvider();

valueProvider I find all the input I have added only one and that therefore there are more than one gives me the values separated by commas.

How can I retrieve the values of a line of input text? I hope I explained correctly.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about mvc