Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
119 lines (116 sloc) 5.05 KB
@{
ViewData["Title"] = "Home-2.0";
}
<div class="row">
<div class="col-md-4">
<h2>What can this Site do?</h2>
<ul>
<li>Sample ASP.NET Core MVC for Demo..</li>
<li>Search text from local stored data..</li>
<li>Search results from other system API..</li>
</ul>
</div>
<div class="col-md-4">
<h2>Search</h2>
<div class="input-group">
<span class="input-group-addon">Keyword:</span>
<input id="keyword" type="text" class="form-control" name="keyword" placeholder="Enter a keyword">
</div>
<div class="input-group">
<span class="input-group-addon">Service:</span>
<input id="svcUrl" type="text" class="form-control" name="svcUrl" placeholder="Enter Service Url">
</div>
<div class="input-group">
<div class="pull-right">
<button type="submit" id="searchLocal" class="btn btn-primary" onclick="javascript: localSearchValue();">Search Local</button>
<button type="submit" id="searchService" class="btn btn-warning" onclick="javascript: serviceSearchValue();">Search Service</button>
</div>
</div>
<div id="LocalSearchResult"></div>
<div id="ServiceSearchResult"></div>
</div>
<div class="col-md-4">
<h2>Search data-source</h2>
<ul>
@foreach (var kv in Model.keyValues)
{
<li>@kv.Key <span>--> @kv.Value</span></li>
}
</ul>
</div>
</div>
<!-- <div id="myCarousel" class="carousel slide" data-ride="carousel" data-interval="6000">
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
<li data-target="#myCarousel" data-slide-to="3"></li>
</ol>
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="~/images/banner1.svg" alt="ASP.NET" class="img-responsive" />
<div class="carousel-caption" role="option">
<p>
Learn how to build ASP.NET apps that can run anywhere.
<a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkID=525028&clcid=0x409">
Learn More
</a>
</p>
</div>
</div>
<div class="item">
<img src="~/images/banner2.svg" alt="Visual Studio" class="img-responsive" />
<div class="carousel-caption" role="option">
<p>
There are powerful new features in Visual Studio for building modern web apps.
<a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkID=525030&clcid=0x409">
Learn More
</a>
</p>
</div>
</div>
<div class="item">
<img src="~/images/banner3.svg" alt="Package Management" class="img-responsive" />
<div class="carousel-caption" role="option">
<p>
Bring in libraries from NuGet, Bower, and npm, and automate tasks using Grunt or Gulp.
<a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkID=525029&clcid=0x409">
Learn More
</a>
</p>
</div>
</div>
<div class="item">
<img src="~/images/banner4.svg" alt="Microsoft Azure" class="img-responsive" />
<div class="carousel-caption" role="option">
<p>
Learn how Microsoft's Azure cloud platform allows you to build, deploy, and scale web apps.
<a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkID=525027&clcid=0x409">
Learn More
</a>
</p>
</div>
</div>
</div>
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div> -->
<script type="text/javascript">
var localSearchurl = '@Url.Action("DisplayLocalSearchResult", "Home")';
var svcSearchurl = '@Url.Action("DisplayServiceSearchResult", "Home")';
function localSearchValue() {
var keyWord = $('#keyword').val();
$('#LocalSearchResult').load(localSearchurl, { searchText: keyWord });
}
function serviceSearchValue() {
var keyWord = $('#keyword').val();
var svcUrl = $('#svcUrl').val();
$('#ServiceSearchResult').load(svcSearchurl, { searchText: keyWord, serviceUrl: svcUrl });
}
</script>
You can’t perform that action at this time.