Click here to Skip to main content
15,906,463 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionASP.Net Pin
Member 1235142825-Feb-16 3:05
Member 1235142825-Feb-16 3:05 
AnswerRe: ASP.Net Pin
ZurdoDev25-Feb-16 4:09
professionalZurdoDev25-Feb-16 4:09 
AnswerRe: ASP.Net Pin
F-ES Sitecore25-Feb-16 21:52
professionalF-ES Sitecore25-Feb-16 21:52 
AnswerRe: ASP.Net Pin
Nathan Minier26-Feb-16 1:29
professionalNathan Minier26-Feb-16 1:29 
AnswerRe: ASP.Net Pin
Manas_Kumar26-Feb-16 7:17
professionalManas_Kumar26-Feb-16 7:17 
AnswerRe: ASP.Net Pin
aarif moh shaikh26-Feb-16 21:00
professionalaarif moh shaikh26-Feb-16 21:00 
QuestionPass ViewModel to view twice Pin
Member 1204569224-Feb-16 23:29
Member 1204569224-Feb-16 23:29 
AnswerRe: Pass ViewModel to view twice Pin
Nathan Minier25-Feb-16 1:53
professionalNathan Minier25-Feb-16 1:53 
You do this in a lot of ways.

If you want to use server-side code (namely Razor) to build your view and absolutely have to embed your reports in the homeIndexModel, then you'll need to perform a postback and add an optional search term to your Index action (or whatever you have your default action named).
C#
public ActionResult Index(string searchVal = null, string searchParam = null)
{
...
   var homeIndexModel = new HomeIndexModel()
{
    ActiveTasks = tasks.Where(
        task =>
            task.TaskStatus != TaskStatusEnum.Deferred &&
            task.TaskStatus != TaskStatusEnum.Verified && task.TaskStatus != TaskStatusEnum.Resolved),
    ClosedTasks = tasks.Where(
            task =>
                task.TaskStatus == TaskStatusEnum.Resolved),
    DeferredTasks = tasks.Where(
        task =>
            task.TaskStatus == TaskStatusEnum.Verified ||
            task.TaskStatus == TaskStatusEnum.Deferred),
    Rules = m_errandSvc.GetAllRules(),
    Sources =
        Enum.GetValues(typeof(TaskSourceEnum)).Cast<TaskSourceEnum>().AsEnumerable().OrderBy(taskSource => taskSource.AsString()),
    Types =
        Enum.GetValues(typeof(TaskTypeEnum)).Cast<TaskTypeEnum>().AsEnumerable().OrderBy(taskSource => taskSource.AsString()),
    Counties = counties,
    Reports = (val == null || parameters == null)
         ? null
         : m_errandSvc.GetReportSearch(searchVal, searchParam).ToList();
};
return View(homeIndexModel);
}

You could also decouple the reports from the HomeIndexModel and send it down as a partial view, if you prefer to use AJAX but still want to use Razor.
QuestionGet file size from File Upload from IE and Chrome Pin
indian14324-Feb-16 15:49
indian14324-Feb-16 15:49 
AnswerRe: Get file size from File Upload from IE and Chrome Pin
F-ES Sitecore25-Feb-16 0:46
professionalF-ES Sitecore25-Feb-16 0:46 
QuestionSet the file upload value Pin
indian14324-Feb-16 11:24
indian14324-Feb-16 11:24 
AnswerRe: Set the file upload value Pin
Richard Deeming25-Feb-16 2:21
mveRichard Deeming25-Feb-16 2:21 
Questionfile upload, restricting size and type of files Pin
indian14324-Feb-16 7:43
indian14324-Feb-16 7:43 
AnswerRe: file upload, restricting size and type of files Pin
Richard Deeming24-Feb-16 7:56
mveRichard Deeming24-Feb-16 7:56 
GeneralRe: file upload, restricting size and type of files Pin
indian14324-Feb-16 12:54
indian14324-Feb-16 12:54 
AnswerRe: file upload, restricting size and type of files Pin
F-ES Sitecore25-Feb-16 0:43
professionalF-ES Sitecore25-Feb-16 0:43 
QuestionHow to filter data in DataTable using like operator ? Pin
Member 1228492023-Feb-16 19:04
Member 1228492023-Feb-16 19:04 
QuestionRe: How to filter data in DataTable using like operator ? Pin
Richard MacCutchan23-Feb-16 21:32
mveRichard MacCutchan23-Feb-16 21:32 
AnswerRe: How to filter data in DataTable using like operator ? Pin
aarif moh shaikh26-Feb-16 21:04
professionalaarif moh shaikh26-Feb-16 21:04 
Questionhow to bind Database field value in textbox based on choosing dropdownlist selected value in asp.net MVC Pin
Nithu Nithiya23-Feb-16 18:06
professionalNithu Nithiya23-Feb-16 18:06 
AnswerRe: how to bind Database field value in textbox based on choosing dropdownlist selected value in asp.net MVC Pin
John C Rayan27-Feb-16 21:39
professionalJohn C Rayan27-Feb-16 21:39 
QuestionDownload file from memorystream by client side click Pin
indian14323-Feb-16 13:33
indian14323-Feb-16 13:33 
AnswerRe: Download file from memorystream by client side click Pin
Richard MacCutchan23-Feb-16 21:29
mveRichard MacCutchan23-Feb-16 21:29 
GeneralRe: Download file from memorystream by client side click Pin
indian14324-Feb-16 7:21
indian14324-Feb-16 7:21 
QuestionDropdownlist with Model (MVC4,C#, ASP.Net2015,Razor) Pin Pin
bl4ckeagle23-Feb-16 8:12
bl4ckeagle23-Feb-16 8:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.