0
i'd suggest you to use some other property with every text box as its id. for example the field name for which you are creating the text box like the value of i can be used by you..
0
Jayant Rajwani sir I am Creating 5 TextBox and it is dynamic created and i want different Id For All Text Box
0
You can set ID of a textbox like this:
@Html.TextBoxFor(item => item.Category, new { id = "MyId" })
OR
@Html.TextBoxFor(item => item.Category, htmlAttributes: new { id = "MyId" })
This is how your output will look like:
<input ... id="MyId" name="Category" type="text" />