I am trying to get the values of a razor variable @item.name.It contains two names:name1 and name2.But when i use the following code i am getting only the first value ie,name1 in the javascript variable'nameVariable'
foreach (var item in CurrentPage.Children().Where("Visible"))
the div 'nameDiv' is repeating two times with the same value.I checked the values of @item.name ,it displays the two values but only first name is pushing into the 'nameVariable'.How can I get the solution??
access razor variable values in jQuery
hi,
I am trying to get the values of a razor variable @item.name.It contains two names:name1 and name2.But when i use the following code i am getting only the first value ie,name1 in the javascript variable'nameVariable'
foreach (var item in CurrentPage.Children().Where("Visible"))
{
@item.name
}
the div 'nameDiv' is repeating two times with the same value.I checked the values of @item.name ,it displays the two values but only first name is pushing into the 'nameVariable'.How can I get the solution??
Hi ,
Are you using a textString for the name1 and name 2 ? Or are you using the multiple textString from uComponents ?.
If so try doing something like this
is working on a reply...