Asign Class with Class Name in Razor
or Show Class with Class Name in Razor
or show Class Attribute with Class Name in Razor
@(i==0?"class=active":"")
Asign Class with Class Name in Razor
or Show Class with Class Name in Razor
or show Class Attribute with Class Name in Razor
@(i==0?"class=active":"")
1. Index in foreach loop in c#
foreach ((var item, Int32 i) in data_banner.Select((value, i) => (value, i)))
{
Console.WriteLine("I am at index" + i + " and I can find the value on val : " + item.Heading_Name);
}
2. Index in foreach loop in razor
@foreach ((var item, Int32 i) in data_banner.Select((value, i) => (value, i)))
{
Console.WriteLine("I am at index" + i + " and I can find the value on val : " + item.Heading_Name);
}
1. javascript event fire or Java Script Click Event fire,
1. Fontawesome or font awesome or font owesome
https://fontawesome.com/v4.7.0/icons/
2. html graph or svg graph or canvas graph, js graph
https://www.rgraph.net/demos/bar-adjustable.html
1.
var list = new List<Tuple<double, double>>();
for (int i = 0; i < 5; i++)
{
list.Add(new Tuple<double, double>(i, i * 3));
}
foreach (var item in list)
{
double dd = item.Item1;
double dd2 = item.Item2;
}
*. Return view with another folder
*. Return view with another conroller
1. $.ajax({ type: "POST", url: "/Atrb_SubCategory/Create2", data: { Sub_Name: $("#Sub_Name").val(), Sort: $("#Sort").val() }, success: function (data) { //alert(data); var jsonObj = JSON.parse(data); $("#ctrl_code").html(jsonObj[0].Sub_Code); }, error: function (data) { alert("error : " + data); }, failed: function (data) { alert("failed : " + data); } });
@Url.Action("{action}", "{controller}", new { Area = "areaname" });
@Html.ActionLink("LinkName", "{action}", "{controller}", new { area = "{areaname}"},
new { @class = "btn btn-cool" })
(Expression<Func<T, bool>> filter)