TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
suman goud
NA
176
53.8k
how to write sql server condition in jquery
Jul 19 2016 2:05 AM
i want to change color of tree view node if Type=Master, this is my jquery
<script type="text/javascript">
$(document).ready(function () {
$('.treeview').change(function () {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "/Treeview/GetTreeView",
data: "{ Type: '" + $('.treeview').val() + "'}",
dataType: "json",
success: function (data) {
$(".treeview").html(data.d);
}
});
});
});
</script>
GetTreeView
public JsonResult GetTreeView(string term)
{
TestDemoEntities db = new TestDemoEntities();
List<string> treeView;
treeView = db.MasterNodes.Where(x => x.Name.StartsWith(term)).Select(e => e.Name).Distinct().ToList();
return Json(treeView, JsonRequestBehavior.AllowGet);
}
my table name is MasterNode,
where Type=Master i want to change color
Reply
Answers (
2
)
Datatype for each column in datagridview C#?
c#, MVC 4 asp.Net, SQL