This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Entity Framework | |
public ActionResult GetBokaroStudentEF() | |
{ | |
var db = GetFromDbContext(); | |
var data = db.Students.Where(i => i.City == "Bokaro"); | |
return View(data); | |
} | |
// LINQ | |
public ActionResult GetBokaroStudentLINQ() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step 1. Install AngularJS using install-package angularjs or using NuGet Package Manager | |
Step 2. Insert JS code references on web page or _Layout.cshtml page | |
<script src="~/Scripts/jquery-1.11.1.min.js"></script> | |
<script src="~/Scripts/angular.min.js"></script> | |
<script src="~/Scripts/AngularImp/EnquiryService.js"></script> | |
<script src="~/Scripts/AngularImp/EnquiryCtrl.js"></script> | |
Step 3. Create View Page as given below |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
function SaveMember() { | |
var ID = document.getElementById('<%=hfID.ClientID %>').value; | |
var OrderStatus = document.getElementById('<%=ddlOrderStatus.ClientID %>').value; | |
var PaymentStatus = document.getElementById('<%=ddlPaymentStatus.ClientID %>').value; | |
var DispatchDateTime = document.getElementById('<%=txtDispatchDateTime.ClientID %>').value; | |
var CourierCompany = document.getElementById('<%=ddlCourierCompany.ClientID %>').value; | |
var ConsignmentNumber = document.getElementById('<%=txtConsignmentNumber.ClientID %>').value; | |
var DeliveryDetails = document.getElementById('<%=txtDeliveryDetails.ClientID %>').value; | |
var Status = document.getElementById('<%=ddlStatus.ClientID %>').value; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model IEnumerable<MvcFileUploadToDB.Models.FileUploadDBModel> | |
@{ | |
ViewBag.Title = "Index"; | |
} | |
<h2>Index</h2> | |
<p> | |
@Html.ActionLink("Upload New", "Index") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model IEnumerable<MvcFileUploadToDB.Models.FileUploadDBModel> | |
@{ | |
ViewBag.Title = "Index"; | |
} | |
<h2>Index</h2> | |
<p> | |
@Html.ActionLink("Upload New", "Index") |
NewerOlder