c# - Concatenation of two string in razor view -
i have cshtml problem: have snippet:
@for (int = 0; < 25; i++) { <tr> <td> <input class="mycell" type="text" name ="num"@i/> </td> <td> <input class="mycell" type="text" name="client"@i/> </td> <td> <input class="mycell" type="date" name ="reception"@i/> </td> <td> <input class="mycell" type="date" name="cloture"@i/> </td> </tr> } and i'd rename first inputs num0, client0..... until last inputs num23, client23 ..., try snippet above didn't work.
why code didn't work? how can fix it?
it sounds want write
name="num@(i)" the parentheses necessary prevent razor thinking it's email address , ignoring it.
Comments
Post a Comment