0

I am using Hiddenvariable here and it is passed to controller from view.

        @(Html.Search("ConfigurationSearch").Form("ConfigurationForm").Grid("gridConfiguration").ShowUnSelectAll(false))
        <div id="gridConfiguration"></div>
    </div>


    @Html.Hidden("hidSearchText")
    
     $(function () {
        $('#searchText_ConfigurationSearch').val("@TempData["SearchText"]");
    });

    $('.k-block').click(function () {
       $("#hidSearchText").val($("#searchText_ConfigurationSearch").val());
    });

Without using hiddenvariable Can we Implement this,Please suggest me?!

prajna
  • 9
  • 6
  • add proper tags – Amit Jun 01 '18 at 04:37
  • This same question has been asked before. Take a look here and see if that helps. https://stackoverflow.com/questions/32596194/mvc-how-to-keep-search-value-when-navigating-between-pages – Matt Jun 01 '18 at 04:40
  • I have used Temp Variable in controller its working ...but I want Generic code for all the searchbox. – prajna Jun 01 '18 at 06:06

0 Answers0