Directives change the behavior of HTML DOM.
Tuesday, July 28, 2020
Sunday, July 26, 2020
What is Angular ?
Angular is a Javascript Binding Framework which binds the HTML UI and Javascript Model.
This helps you to reduce your efforts on writing thos lengthy lines of code for binding.
Adding to it, it also helps you to build SPA by using the concept of routing.
It also has lot of other features like HTTP,DI,Input output because of which you do not need other frameworks.
Friday, March 10, 2017
Avoid Multiple time Submit button click event
<asp:Button ID="btnSubmit" runat="server" class="btn btn-success" OnClick="btnSubmit_Click"
ValidationGroup="Submit" Text="Submit" OnClientClick="if (!Page_ClientValidate()){ return false; } this.disabled = true; this.value = 'Saving...';"
UseSubmitBehavior="false"></asp:Button>
ValidationGroup="Submit" Text="Submit" OnClientClick="if (!Page_ClientValidate()){ return false; } this.disabled = true; this.value = 'Saving...';"
UseSubmitBehavior="false"></asp:Button>
Thursday, January 19, 2017
Entity Framework with LINQ aggregate to concatenate string
DataTypeID, Name, DataValue
1,"Data 1","Value1"
1,"Data 1","Value2"
2,"Data 1","Value3"
3,"Data 1","Value4"
var query = (from t in context.TestData
group t by new { DataTypeID = t.DataTypeID, Name = t.Name } into g
select new { DataTypeID = g.Key.DataTypeID, Name = g.Key.Name, Data = g.AsEnumerable()})
.ToList()
.Select (q => new { DataTypeID = q.DataTypeID, Name = q.Name, DataValues = q.Data.Aggregate ("", (acc, t) => (acc == "" ? "" :
acc + ",") + t.DataValue) });

1,"Data 1","Value1"
1,"Data 1","Value2"
2,"Data 1","Value3"
3,"Data 1","Value4"
var query = (from t in context.TestData
group t by new { DataTypeID = t.DataTypeID, Name = t.Name } into g
select new { DataTypeID = g.Key.DataTypeID, Name = g.Key.Name, Data = g.AsEnumerable()})
.ToList()
.Select (q => new { DataTypeID = q.DataTypeID, Name = q.Name, DataValues = q.Data.Aggregate ("", (acc, t) => (acc == "" ? "" :
acc + ",") + t.DataValue) });
