I'm trying to get search results to display in a tooltip window. I've got the tooltip working to pass my search text to my partial view, but it only works on the first call. Every time the tooltip loads again, the results are the same, because the content is never reloaded. Is there a way to not cache what comes back from the tooltips .LoadContentFrom function, so that I can pass new parameters back to the partial view each time?
Here is what I have for the tooltip.
What I'd like is that everytime the tooltip is show, the LoadContentFrom is called.
Here is what I have for the tooltip.
What I'd like is that everytime the tooltip is show, the LoadContentFrom is called.
@(Html.Kendo().Tooltip()
.For("#searchButton")
.LoadContentFrom("AllSearch", "Search", new { area = "" })
.ShowOn(TooltipShowOnEvent.Click)
.Position(TooltipPosition.Bottom)
.AutoHide(false)
.Width(600)
.Height(600)
.Callout(true)
.Animation(true)
.Events(e =>
{
e.RequestStart("requestStart");
})
)
<script>
function
requestStart(e) {
var
st = $(
"#searchText"
).val();
e.options.data = {
searchText: st
}
}
</script>