Index: branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Controllers/ChartController.cs
===================================================================
--- branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Controllers/ChartController.cs	(revision 6301)
+++ branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Controllers/ChartController.cs	(revision 6303)
@@ -31,12 +31,14 @@
 
       // Later, we will get the runs from the session ...
-      QueryServiceClient client = Query.GetClientFactory("okbtester", "okbtester");
-
-      long[] runIds = new long[104];
-      for (int i = 0; i < 104; i++) {
-        runIds[i] = i;
-      }
-      Run[] runs = client.GetRuns(runIds, false);
-      //cm.Runs = runs;
+      QueryServiceClient client = Query.GetClientFactory();
+
+      //long[] runIds = new long[104];
+      //for (int i = 0; i < 104; i++) {
+      //  runIds[i] = i;
+      //}
+      long[] runIds = client.GetRunIds((CombinedFilter)Session["Content"]);
+        Run[] runs = client.GetRuns(runIds,false);
+      //  Run[] runs = Session[""];
+      cm.Runs = runs;
       cm.UpdateRunCollection(runs);
       cm.UpdateBubbleChart(selectedAxisY, selectedAxisX, selectedBubbleSize);
Index: branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Controllers/FilterController.cs
===================================================================
--- branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Controllers/FilterController.cs	(revision 6301)
+++ branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Controllers/FilterController.cs	(revision 6303)
@@ -8,4 +8,5 @@
 using HLWebOKBQueryPlugin.OKBQueryService;
 using System.Web.Routing;
+using HLWebOKBQueryPlugin.Models;
 
 namespace HLWebOKBQueryPlugin.Controllers
@@ -20,17 +21,20 @@
         /// </summary>
         /// <returns></returns>
-        public void GetRuns()
-        {
-            FilterModel qm = new FilterModel();
-            qm.Content = (CombinedFilter)Session["Content"];
-
-            QueryServiceClient client = Query.GetClientFactory("okbtester", "okbtester");
-
-
-            long[] ids = client.GetRunIds(qm.Content);
+        public ActionResult GetRuns()
+        {
+            Session["SelectedSubMenu"] = "Filter";
+
+            FilterModel fm = new FilterModel();
+            fm.Content = (CombinedFilter)Session["Content"];
+
+            QueryServiceClient client = Query.GetClientFactory();
+
+
+            long[] ids = client.GetRunIds(fm.Content);
 
             Response.Write("Found <" + ids.Count() + "> Runs.");
-
-          //  return View("Index", qm); // name of usercontrol
+            QueryModel qm = new QueryModel();
+            qm.Runs = ids;
+            return View("Results", qm); // name of usercontrol
         }
 
@@ -51,28 +55,30 @@
         /// <param name="collection"></param>
         /// <returns></returns>
-        public ActionResult AddFilterAnd(string submitButton, FormCollection collection)
+        public ActionResult AddFilter(FormCollection collection)
         {
             FilterModel fm = new FilterModel((CombinedFilter)Session["Content"]);
-
-            Response.Write("Submit:" + submitButton);
+            string submitAction = collection.Get("action");
+            Response.Write("Submit:" + submitAction);
             
             //update model with form data
             UpdateModel(collection, fm);
 
-            if (submitButton.StartsWith("+"))
-            {
-                string stringid = submitButton.Substring(2);
+            if ("add".Equals(submitAction))
+            {
+               // string stringid = submitButton.Substring(2);
+                string stringid = collection.Get("selectedFilter");
                 AddNewFilter(collection, fm, stringid);
             }
-            else if (submitButton.StartsWith("-"))
-            {
-                string stringid = submitButton.Substring(2);
+            else if ("delete".Equals(submitAction))
+            {
+               string stringid= collection.Get("selectedFilter");
+               // string stringid = submitButton.Substring(2);
                 DeleteFilter(new Guid(stringid));
             }
-            else if (submitButton.Equals("runs"))
-            {
-                GetRuns();
-            }
-            else if (submitButton.Equals("or"))
+            else if ("runs".Equals(submitAction))
+            {
+                return GetRuns();
+            }
+            else if ("or".Equals(submitAction))
             {
                 AddFilterOr( fm);
Index: branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Controllers/QueryController.cs
===================================================================
--- branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Controllers/QueryController.cs	(revision 6301)
+++ branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Controllers/QueryController.cs	(revision 6303)
@@ -11,5 +11,5 @@
 using System.Reflection;
 using System.Text;
-using HLWebPluginHost.Models;
+using HLWebOKBQueryPlugin.Models;
 using HLWebOKBQueryPlugin.OKBQueryService;
 using HLWebOKBQueryPlugin.Helpers;
@@ -43,6 +43,16 @@
 
         public ActionResult RunCollectionTable() {
+
+            // Get runs from filter
+            
+
+            QueryServiceClient client = Query.GetClientFactory();
+
+
+            long[] ids = client.GetRunIds((CombinedFilter)Session["Content"]);
+
             QueryModel qm = new QueryModel();
-            Session["QueryRuns"] = qm.getTestRuns();
+            qm.Runs = ids;
+            Session["QueryRuns"] = qm.RunCollection;
             return View(qm);
         }
Index: branches/WebApplication/MVC2/HLWebOKBQueryPlugin/HLWebOKBQueryPlugin.csproj
===================================================================
--- branches/WebApplication/MVC2/HLWebOKBQueryPlugin/HLWebOKBQueryPlugin.csproj	(revision 6301)
+++ branches/WebApplication/MVC2/HLWebOKBQueryPlugin/HLWebOKBQueryPlugin.csproj	(revision 6303)
@@ -108,5 +108,5 @@
     <Compile Include="ViewModels\ComparisonItem.cs" />
     <Compile Include="ViewModels\ComparisonsHelper.cs" />
-    <Compile Include="ViewModels\FilterModel.cs" />
+    <Compile Include="Models\FilterModel.cs" />
     <Compile Include="Models\QueryModel.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
@@ -161,4 +161,5 @@
     <Content Include="Views\Chart\Index.aspx" />
     <Content Include="Views\Filter\Index.aspx" />
+    <Content Include="Views\Filter\Results.aspx" />
     <Content Include="Views\Home\About.aspx" />
     <Content Include="Views\Home\Index.aspx" />
@@ -213,5 +214,4 @@
     <Folder Include="App_Data\" />
     <Folder Include="App_LocalResources\" />
-    <Folder Include="Views\AlgorithmClass\" />
   </ItemGroup>
   <ItemGroup>
Index: branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Models/FilterModel.cs
===================================================================
--- branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Models/FilterModel.cs	(revision 6303)
+++ branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Models/FilterModel.cs	(revision 6303)
@@ -0,0 +1,368 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using HLWebOKBQueryPlugin.OKBQueryService;
+using HLWebOKBQueryPlugin.Helpers;
+using HLWebOKBQueryPlugin.ViewModels;
+using System.ComponentModel.DataAnnotations;
+
+namespace HLWebOKBQueryPlugin.Models
+{
+    /// <summary>
+    /// Model for Filter Data.
+    /// Current Filters (selected),
+    /// and available Filters. 
+    /// </summary>
+    public class FilterModel
+    {
+
+
+
+        public static string ComboboxName { get { return "filtersCombobox"; } }
+        public static string ParentIdName { get { return "parentId"; } }
+        public static string ValueTextbox { get { return "valueTextbox"; } }
+        public static string ValueDropDownList { get { return "valueDropDownList"; } }
+        public static string ComparisonDropDownList { get { return "comparisonDropDownList"; } }
+
+        [Required(ErrorMessage = "Field is required!")]
+        [StringLength(50, ErrorMessage = "Maximum 50 characters allowed!")]
+        public string IntValue { get; set; }
+
+        /// <summary>
+        /// Constructor
+        /// </summary>
+        public FilterModel()
+        {
+
+        }
+
+        public FilterModel(CombinedFilter filter)
+        {
+            Content = filter;
+        }
+
+        /// <summary>
+        /// Get Bool States.
+        /// </summary>
+        public List<Boolean> BoolStates
+        {
+            get
+            {
+                List<Boolean> boolStates = new List<Boolean>();
+
+                boolStates = new List<Boolean>();
+                boolStates.Add(true);
+                boolStates.Add(false);
+
+                return boolStates;
+            }
+        }
+
+
+        public static List<ComparisonItem> BoolComparisons
+        {
+            get { return ComparisonsHelper.boolComparisons; }
+        }
+
+        public static List<ComparisonItem> OrdinalComparisons
+        {
+            get { return ComparisonsHelper.ordinalComparisons; }
+        }
+
+        public static List<ComparisonItem> StringComparisons
+        {
+            get { return ComparisonsHelper.stringComparisons; }
+        }
+
+
+
+
+        /// <summary>
+        /// Available Filters
+        /// </summary>
+        public List<Filter> AvailableFilters
+        {
+            get
+            {
+                QueryServiceClient client = Query.GetClientFactory("okbtester", "okbtester");
+                Filter[] filters = client.GetFilters();
+
+                if (filters == null)
+                {
+                    return new List<Filter>();
+                }
+                return filters.ToList<Filter>();
+            }
+        }
+
+
+        /// <summary>
+        /// Available Filters without AND and OR.
+        /// </summary>
+        public List<Filter> AvailableFilterForCombobox
+        {
+            get
+            {
+                List<Filter> filters = AvailableFilters;
+
+                filters.Remove(filters.OfType<CombinedFilter>().Where(x => x.Operation == BooleanOperation.Or).FirstOrDefault());
+                filters.Remove(filters.OfType<CombinedFilter>().Where(x => x.Operation == BooleanOperation.And).FirstOrDefault());
+
+                return filters;
+            }
+        }
+
+        /// <summary>
+        /// Content
+        /// </summary>
+        public CombinedFilter Content { get; set; }
+
+
+
+        /// <summary>
+        /// Delete a filter with given id.
+        /// </summary>
+        /// <param name="id">filter id</param>
+        internal bool RemoveFilter(Guid id)
+        {
+            bool removed = false;
+            List<Filter> orFilters = Content.Filters.ToList<Filter>();
+
+            foreach (CombinedFilter f in orFilters)
+            {
+                Filter deleteFilter = f.Filters.Where(x => x.Id == id).FirstOrDefault();
+                if (deleteFilter != null)
+                {
+                    List<Filter> masterFilters = f.Filters.ToList<Filter>();
+                    masterFilters.Remove(deleteFilter);
+                    f.Filters = masterFilters.ToArray<Filter>();
+                    removed = true;
+                    break;
+                }
+            }
+
+            Content.Filters = orFilters.ToArray<Filter>();
+            return removed;
+        }
+
+        /// <summary>
+        /// Add a new filters
+        /// </summary>
+        /// <param name="filterTypeName">type name</param>
+        /// <param name="parentId">parent filter id</param>
+        internal void AddFilter(string filterTypeName, Guid parentId)
+        {
+
+            // get selected filter (combobox)
+            Filter filter = AvailableFilters.Where(x => x.FilterTypeName.Equals(filterTypeName)).FirstOrDefault();
+
+
+            // find the partent filterr
+            List<Filter> orFilters = Content.Filters.ToList<Filter>(); ;
+            CombinedFilter parentFilter = (CombinedFilter)orFilters.Where(e => e.Id.Equals(parentId)).FirstOrDefault();
+
+            // remove
+            orFilters.Remove(parentFilter);
+
+            List<Filter> filterList = parentFilter.Filters.ToList<Filter>();
+
+
+            // Add the new filter
+            filterList.Add(filter);
+            //Response.Write("addx:" + filter.Id);
+
+            parentFilter.Filters = filterList.ToArray<Filter>();
+
+            // Add the current filter (AND)
+            orFilters.Add(parentFilter);
+
+            Content.Filters = orFilters.ToArray<Filter>();
+        }
+
+        /// <summary>
+        /// Update existing filters with posted value
+        /// </summary>
+        /// <param name="parentId">parent filter id</param>
+        /// <param name="postValues">dictionary with posted values</param>
+        internal void UpdateWithPostValues(Dictionary<Guid, Dictionary<string, string>> postValues)
+        {
+            // Set values for the existing Filters
+            foreach (CombinedFilter cf in Content.Filters)
+            {
+                foreach (Filter f in cf.Filters)
+                {
+
+                    Dictionary<string, string> dict = postValues.Where(x => x.Key.Equals(f.Id)).FirstOrDefault().Value;
+                    if (dict != null)
+                    {
+
+                        foreach (KeyValuePair<string, string> kvp in dict)
+                        {
+                            if ("StringComparisonFilter".Equals(f.GetType().Name))
+                            {
+                                if (kvp.Key.Equals(FilterModel.ValueTextbox))
+                                {
+                                    ((StringComparisonFilter)f).Value = kvp.Value;
+                                    IntValue = kvp.Value;
+                                }
+                                else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList))
+                                {
+                                    ((StringComparisonFilter)f).Comparison = ComparisonsHelper.GetStringComparisonForValue(kvp.Value);
+                                }
+                            }
+                            else if ("NameStringComparisonFilter".Equals(f.GetType().Name))
+                            {
+                                if (kvp.Key.Equals(FilterModel.ValueTextbox))
+                                {
+                                    ((NameStringComparisonFilter)f).Value = kvp.Value;
+                                }
+                                else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList))
+                                {
+                                    ((NameStringComparisonFilter)f).Comparison = ComparisonsHelper.GetStringComparisonForValue(kvp.Value);
+                                }
+                            }
+                            else if ("StringComparisonAvailableValuesFilter".Equals(f.GetType().Name))
+                            {
+                                if (kvp.Key.Equals(FilterModel.ValueTextbox))
+                                {
+                                    ((StringComparisonAvailableValuesFilter)f).Value = kvp.Value;
+                                }
+                                else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList))
+                                {
+                                    ((StringComparisonAvailableValuesFilter)f).Comparison = ComparisonsHelper.GetStringComparisonForValue(kvp.Value);
+                                }
+                            }
+                            else if ("NameStringComparisonAvailableValuesFilter".Equals(f.GetType().Name))
+                            {
+                                if (kvp.Key.Equals(FilterModel.ValueTextbox))
+                                {
+                                    ((NameStringComparisonAvailableValuesFilter)f).Value = kvp.Value;
+                                }
+                                else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList))
+                                {
+                                    ((NameStringComparisonAvailableValuesFilter)f).Comparison = ComparisonsHelper.GetStringComparisonForValue(kvp.Value);
+                                }
+                            }
+                            else if ("NameEqualityComparisonByteArrayFilter".Equals(f.GetType().Name))
+                            {
+                                //TODO not supported
+                            }
+                            else if ("NameEqualityComparisonBoolFilter".Equals(f.GetType().Name))
+                            {
+                                if (kvp.Key.Equals(FilterModel.ValueDropDownList))
+                                {
+                                    ((NameEqualityComparisonBoolFilter)f).Value = Boolean.Parse(kvp.Value);
+                                }
+                                else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList))
+                                {
+                                    ((NameEqualityComparisonBoolFilter)f).Comparison = ComparisonsHelper.GetEqualityComparisonForValue(kvp.Value);
+                                }
+                            }
+                            else if ("NameOrdinalComparisonIntFilter".Equals(f.GetType().Name))
+                            {
+                                if (kvp.Key.Equals(FilterModel.ValueTextbox))
+                                {
+                                    try
+                                    {
+                                        ((NameOrdinalComparisonIntFilter)f).Value = Int32.Parse(kvp.Value);
+                                    }
+                                    catch (Exception)
+                                    {
+                                        //TOOD Fehler ausgeben
+                                    }
+                                }
+                                else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList))
+                                {
+                                    ((NameOrdinalComparisonIntFilter)f).Comparison = ComparisonsHelper.GetOrdinalComparisonForValue(kvp.Value);
+                                }
+                            }
+                            else if ("NameOrdinalComparisonLongFilter".Equals(f.GetType().Name))
+                            {
+                                if (kvp.Key.Equals(FilterModel.ValueTextbox))
+                                {
+                                    try
+                                    {
+                                        ((NameOrdinalComparisonLongFilter)f).Value = Int64.Parse(kvp.Value);
+                                    }
+                                    catch (Exception)
+                                    {
+                                        //TOOD Fehler ausgeben
+                                    }
+                                }
+                                else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList))
+                                {
+                                    ((NameOrdinalComparisonLongFilter)f).Comparison = ComparisonsHelper.GetOrdinalComparisonForValue(kvp.Value);
+                                }
+                            }
+                            else if ("NameOrdinalComparisonFloatFilter".Equals(f.GetType().Name))
+                            {
+                                if (kvp.Key.Equals(FilterModel.ValueTextbox))
+                                {
+                                    try
+                                    {
+                                        ((NameOrdinalComparisonFloatFilter)f).Value = float.Parse(kvp.Value);
+                                    }
+                                    catch (Exception)
+                                    {
+                                        //TOOD Fehler ausgeben
+                                    }
+                                }
+                                else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList))
+                                {
+                                    ((NameOrdinalComparisonFloatFilter)f).Comparison = ComparisonsHelper.GetOrdinalComparisonForValue(kvp.Value);
+                                }
+                            }
+                            else if ("OrdinalComparisonDateTimeFilter".Equals(f.GetType().Name))
+                            {
+                                if (kvp.Key.Equals(FilterModel.ValueTextbox))
+                                {
+                                    try
+                                    {
+                                        ((OrdinalComparisonDateTimeFilter)f).Value = DateTime.Parse(kvp.Value);
+                                    }
+                                    catch (Exception)
+                                    {
+                                        //TOOD Fehler ausgeben
+                                    }
+                                }
+                                else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList))
+                                {
+                                    ((OrdinalComparisonDateTimeFilter)f).Comparison = ComparisonsHelper.GetOrdinalComparisonForValue(kvp.Value);
+                                }
+                            }
+                            else if ("NameOrdinalComparisonDoubleFilter".Equals(f.GetType().Name))
+                            {
+                                if (kvp.Key.Equals(FilterModel.ValueTextbox))
+                                {
+                                    try
+                                    {
+                                        ((NameOrdinalComparisonDoubleFilter)f).Value = Double.Parse(kvp.Value);
+                                    }
+                                    catch (Exception)
+                                    {
+                                        //TOOD Fehler ausgeben
+                                    }
+                                }
+                                else if (kvp.Key.Equals(FilterModel.ComparisonDropDownList))
+                                {
+                                    ((NameOrdinalComparisonDoubleFilter)f).Comparison = ComparisonsHelper.GetOrdinalComparisonForValue(kvp.Value);
+                                }
+                            }
+
+
+                            else
+                            {
+                                // To this for all filters
+                            }
+
+
+                        }
+
+
+                    }
+                }
+            }
+        }
+    }
+}
Index: branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Models/QueryModel.cs
===================================================================
--- branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Models/QueryModel.cs	(revision 6301)
+++ branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Models/QueryModel.cs	(revision 6303)
@@ -8,8 +8,12 @@
 using HLWebOKBQueryPlugin.Helpers;
 
-namespace HLWebPluginHost.Models {
+namespace HLWebOKBQueryPlugin.Models
+{
     public class QueryModel {
 
         public String SelectedSubMenu { get; set; }
+        private long[] runs;
+
+
 
         public IList<Filter> QueryFilterGetAll() {
@@ -41,26 +45,61 @@
         }
 
+
+        public long[] Runs
+        {
+            get
+            {
+                return this.runs;
+            }
+            set
+            {
+                this.runs = value;
+            }
+
+        }
+
+
+        public IList<RunCollectionData> RunCollection
+        {
+            get
+            {
+                QueryServiceClient client = Query.GetClientFactory();
+                if (client != null)
+                {
+                    IList<RunCollectionData> runCollection = new List<RunCollectionData>();
+
+                    IList<Run> runList = client.GetRuns(runs, false).ToList<Run>();
+
+                    foreach (Run r in runList)
+                        runCollection.Add(new RunCollectionData(r));
+
+                    return runCollection;
+                }
+                return new List<RunCollectionData>();
+            }
+        }
+
         // just 4 testing
-        public IList<RunCollectionData> getTestRuns() {
+        //public IList<RunCollectionData> getTestRuns() {
 
-            QueryServiceClient client = Query.GetClientFactory();
+        //    QueryServiceClient client = Query.GetClientFactory();
 
-            if (client != null) {
-                IList<RunCollectionData> runs = new List<RunCollectionData>();
+        //    if (client != null) {
+        //        IList<RunCollectionData> runs = new List<RunCollectionData>();
 
-                //long[] runIds = client.GetRunIds(new Filter());
-                //if (runIds.Length < cnt) cnt = runIds.Length;
+        //        //long[] runIds = client.GetRunIds(new Filter());
+        //        //if (runIds.Length < cnt) cnt = runIds.Length;
 
-                long[] getRuns = new long[2] { 1, 2 };
+        //        long[] getRuns = new long[2] { 1, 2 };
 
-                IList<Run> runList = client.GetRuns(getRuns, false).ToList<Run>();
+        //        IList<Run> runList = client.GetRuns(getRuns, false).ToList<Run>();
 
-                foreach (Run r in runList)
-                    runs.Add(new RunCollectionData(r));
+        //        foreach (Run r in runList)
+        //            runs.Add(new RunCollectionData(r));
 
-                return runs;
-            }
-            return new List<RunCollectionData>();
-        }
+        //        return runs;
+        //    }
+        //    return new List<RunCollectionData>();
+        //}
 
     }
Index: branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Properties/AssemblyInfo.cs
===================================================================
--- branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Properties/AssemblyInfo.cs	(revision 6301)
+++ branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Properties/AssemblyInfo.cs	(revision 6303)
@@ -2,7 +2,7 @@
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
-using HLWebPluginHost.PluginLib;
 using System.Web.UI;
 using System.Collections;
+using HLWebPluginHost.PluginLib;
 
 // General Information about an assembly is controlled through the following 
Index: branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Views/Filter/Filters.ascx
===================================================================
--- branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Views/Filter/Filters.ascx	(revision 6301)
+++ branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Views/Filter/Filters.ascx	(revision 6303)
@@ -8,27 +8,44 @@
 <script src="/Scripts/MicrosoftMvcValidation.js" type="text/javascript"></script>
 
+<script type="text/javascript">
+    function setAction(action, id) {
+        document.getElementById('selectedFilter').value = id;
+        document.getElementById('action').value = action;
+        document.filterForm.submit();
+    }
+</script>
+
+
 <% Html.EnableClientValidation(); %>
+ <% using (Html.BeginForm("AddFilter", "Filter", FormMethod.Post, new { Name = "filterForm" })) %>
+    <% {  %>  
+<!-- Put all into a form that calls the "AddFilter" Action-->
 
-<!-- Put all into a form that calls the "AddFilter" Action-->
-<div><table>
+    <%
+     CombinedFilter topFilter = ((FilterModel)Model).Content;
+    %>
+    <div><table>
 <tr><td>A<br />N<br />D</td><td>
-<p>
-    <%
-        CombinedFilter topFilter = ((FilterModel)Model).Content;
+
+
+   
+           <%
+     foreach (Filter fNode in topFilter.Filters)
+     {
+
+         CombinedFilter currentFilter = (CombinedFilter)fNode;
+         string comboboxName = FilterModel.ComboboxName + "." + currentFilter.Id;
+         string hiddenName = FilterModel.ParentIdName + "." + currentFilter.Id;
     %>
-    <% using (Html.BeginForm("AddFilterAnd", "Filter", FormMethod.Post, new { id = topFilter.Id, name = topFilter.Id })) %>
-    <% {    
-           
-            foreach (Filter fNode in topFilter.Filters)
-            {
-
-                CombinedFilter currentFilter = (CombinedFilter)fNode;
-                string comboboxName = FilterModel.ComboboxName + "." + currentFilter.Id;
-                string hiddenName = FilterModel.ParentIdName + "." + currentFilter.Id;
-    %>
-    <%: Html.Hidden(hiddenName,currentFilter.Id.ToString()) %>
-    <%: Html.DropDownList( comboboxName, new SelectList(((FilterModel)Model).AvailableFilterForCombobox, "FilterTypeName", "Label"))%>
-    <input type="submit" name="submitButton" value="+.<%:currentFilter.Id%>" />
-</p>
+    <table border="0"><tr><td>
+    <%: Html.Hidden(hiddenName, currentFilter.Id.ToString())%>
+      <%: Html.Hidden("selectedFilter",null, new { Id = "selectedFilter" })%>
+       <%: Html.Hidden("action", null, new { Id = "action" })%>
+    <%: Html.DropDownList(comboboxName, new SelectList(((FilterModel)Model).AvailableFilterForCombobox, "FilterTypeName", "Label"))%>
+   
+   
+    <input type="button" name="submitButton" value="+" class="hl-button-text-plus"   onClick="setAction('add','<%: currentFilter.Id%>');" />
+   <!-- <input type="submit" name="submitButton" value="+.<%:currentFilter.Id%>"  />-->
+</td></tr><tr><td>
 <!-- Build the selected filters. The filtesr will be stored in the session and the
 Controller puts the current filters from the session into the model. Selected Filters
@@ -42,46 +59,46 @@
            {  %>
 
-           <table border="0"><tr><td>
+           <tr><td>
     <%
            
 
-if ("StringComparisonFilter".Equals(f.GetType().Name))
-{  %>
+     if ("StringComparisonFilter".Equals(f.GetType().Name))
+     {  %>
     <% StringComparisonFilter filter = ((StringComparisonFilter)f); %>
     <%: Html.Label(filter.Label)%>
-    <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.StringComparisons, "Value", "Text",(int)filter.Comparison))%>   
+    <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.StringComparisons, "Value", "Text", (int)filter.Comparison))%>   
     <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, (filter.Value))%>
-    <%: Html.TextBoxFor(model => ((FilterModel)Model).IntValue, (filter.Value)) %>
-    <%: Html.ValidationMessageFor(model => ((FilterModel)Model).IntValue) %>
+    <%: Html.TextBoxFor(model => ((FilterModel)Model).IntValue, (filter.Value))%>
+    <%: Html.ValidationMessageFor(model => ((FilterModel)Model).IntValue)%>
     <% }
-else if ("NameStringComparisonFilter".Equals(f.GetType().Name))
-{ %>
+     else if ("NameStringComparisonFilter".Equals(f.GetType().Name))
+     { %>
     <% NameStringComparisonFilter filter = ((NameStringComparisonFilter)f); %>
     <%: Html.Label(filter.Label)%>
-    <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.StringComparisons, "Value", "Text",(int)filter.Comparison))%>   
+    <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.StringComparisons, "Value", "Text", (int)filter.Comparison))%>   
     <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%>
     <% }
-else if ("StringComparisonAvailableValuesFilter".Equals(f.GetType().Name))
-{ %>
+     else if ("StringComparisonAvailableValuesFilter".Equals(f.GetType().Name))
+     { %>
     <% StringComparisonAvailableValuesFilter filter = ((StringComparisonAvailableValuesFilter)f); %>
     <%: Html.Label(filter.Label)%>
-    <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.StringComparisons, "Value", "Text",(int)filter.Comparison))%>   
+    <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.StringComparisons, "Value", "Text", (int)filter.Comparison))%>   
     <%: Html.DropDownList(f.Id + "." + FilterModel.ValueTextbox, new SelectList(filter.AvailableValues, filter.Value))%>
     <% }
-else if ("NameEqualityComparisonByteArrayFilter".Equals(f.GetType().Name))
-{ %>
+     else if ("NameEqualityComparisonByteArrayFilter".Equals(f.GetType().Name))
+     { %>
     <% NameEqualityComparisonByteArrayFilter filter = ((NameEqualityComparisonByteArrayFilter)f); %>
     <%: Html.Label(filter.Label)%>
     <%: Html.Label("not supported")%>
     <% }
-else if ("NameEqualityComparisonBoolFilter".Equals(f.GetType().Name))
-{ %>
+     else if ("NameEqualityComparisonBoolFilter".Equals(f.GetType().Name))
+     { %>
     <% NameEqualityComparisonBoolFilter filter = ((NameEqualityComparisonBoolFilter)f);   %>
     <%: Html.Label(filter.Label)%>
-    <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.BoolComparisons, "Value", "Text",(int)filter.Comparison))%>      
+    <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.BoolComparisons, "Value", "Text", (int)filter.Comparison))%>      
     <%: Html.DropDownList(f.Id + "." + FilterModel.ValueDropDownList, new SelectList(((FilterModel)Model).BoolStates, filter.Value))%>
     <% }
-else if ("NameOrdinalComparisonIntFilter".Equals(f.GetType().Name))
-{ %>
+     else if ("NameOrdinalComparisonIntFilter".Equals(f.GetType().Name))
+     { %>
     <% NameOrdinalComparisonIntFilter filter = ((NameOrdinalComparisonIntFilter)f);   %>
     <%: Html.Label(filter.Label)%>
@@ -89,13 +106,13 @@
     <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%>
     <% }
-else if ("NameStringComparisonAvailableValuesFilter".Equals(f.GetType().Name))
-{ %>
+     else if ("NameStringComparisonAvailableValuesFilter".Equals(f.GetType().Name))
+     { %>
     <% NameStringComparisonAvailableValuesFilter filter = ((NameStringComparisonAvailableValuesFilter)f);   %>
     <%: Html.Label(filter.Label)%>
-    <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.StringComparisons, "Value", "Text",(int)filter.Comparison))%>   
+    <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.StringComparisons, "Value", "Text", (int)filter.Comparison))%>   
     <%: Html.DropDownList(f.Id + "." + FilterModel.ValueDropDownList, new SelectList(filter.AvailableValues, filter.Value))%>
     <% }
-else if ("NameOrdinalComparisonDoubleFilter".Equals(f.GetType().Name))
-{ %>
+     else if ("NameOrdinalComparisonDoubleFilter".Equals(f.GetType().Name))
+     { %>
     <% NameOrdinalComparisonDoubleFilter filter = ((NameOrdinalComparisonDoubleFilter)f);   %>
     <%: Html.Label(filter.Label)%>
@@ -103,6 +120,6 @@
     <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%>
     <% }
-else if ("NameOrdinalComparisonFloatFilter".Equals(f.GetType().Name))
-{ %>
+     else if ("NameOrdinalComparisonFloatFilter".Equals(f.GetType().Name))
+     { %>
     <% NameOrdinalComparisonFloatFilter filter = ((NameOrdinalComparisonFloatFilter)f);   %>
     <%: Html.Label(filter.Label)%>
@@ -110,6 +127,6 @@
     <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%>
     <% }
-else if ("NameOrdinalComparisonLongFilter".Equals(f.GetType().Name))
-{ %>
+     else if ("NameOrdinalComparisonLongFilter".Equals(f.GetType().Name))
+     { %>
     <% NameOrdinalComparisonLongFilter filter = ((NameOrdinalComparisonLongFilter)f);   %>
     <%: Html.Label(filter.Label)%>
@@ -117,6 +134,6 @@
     <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%>
     <% }
-else if ("OrdinalComparisonDateTimeFilter".Equals(f.GetType().Name))
-{ %>
+     else if ("OrdinalComparisonDateTimeFilter".Equals(f.GetType().Name))
+     { %>
     <% OrdinalComparisonDateTimeFilter filter = ((OrdinalComparisonDateTimeFilter)f);   %>
     <%: Html.Label(filter.Label)%>
@@ -126,20 +143,24 @@
                   
     %>
-
-    <input type="submit" name="submitButton" value="-.<%:f.Id%>"    />
+       <!-- <input type="submit" name="submitButton" value="-.<%:f.Id%>"  class="hl-icon-delete"  style="text-indent:-999em;"  />
+       -->
+    <input type="button" name="submitButton" value="-"  class="hl-icon-delete"  onClick="setAction('delete','<%: f.Id%>');" />
    
 <% }%>
-    </td></tr></table>
+    </td></tr>
     <% } %>
+     </table></td></tr>
  <%  }%>
    <% }%>
- <input type="submit" name="submitButton"  value="or" />
+
+
+
+ 
+  </table> <input type="button" name="submitButton"  value="or"  onClick="setAction('or','');"  />
  </br>
- <input type="submit" name="submitButton" value="runs" />
-
-  
-
-<% }
-      
-%> </td></tr>
-</table></div>
+ <input type="button" name="submitButton" value="runs"  onClick="setAction('runs','');" />
+ 
+ 
+<% }    
+%>
+ </div>
Index: branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Views/Filter/Results.aspx
===================================================================
--- branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Views/Filter/Results.aspx	(revision 6303)
+++ branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Views/Filter/Results.aspx	(revision 6303)
@@ -0,0 +1,49 @@
+﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
+
+<%@ Import Namespace="HLWebOKBQueryPlugin.Models" %>
+<%@ Import Namespace="HLWebOKBQueryPlugin.OKBQueryService" %>
+<%@ Import Namespace="HLWebOKBQueryPlugin.Helpers" %>
+
+<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
+    Results
+</asp:Content>
+<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
+    <h2>
+        Results</h2>
+    <table class="hl-dataTable">
+        <thead>
+            <tr>
+                <th>
+                    Number of Run
+                </th>
+                <th>
+                    Action
+                </th>
+            </tr>
+        </thead>
+        <tbody>
+            <%
+         
+                QueryModel model = (QueryModel)Model;
+
+                if (model != null && model.RunCollection != null)
+                {
+                    int i = 0;
+                    foreach (RunCollectionData rc in model.RunCollection)
+                    {
+                        i++;
+            %><tr>
+                <td>
+                    <%= i %>
+                </td>
+                <td>
+                    <%: Html.ActionLink("details", "Details", "Query", rc, null)%>
+                </td>
+            </tr>
+            <%
+}
+        }
+            %>
+        </tbody>
+    </table>
+</asp:Content>
Index: branches/WebApplication/MVC2/HeuristicLabWeb.PluginHost/HLWebPluginHost/Web.config
===================================================================
--- branches/WebApplication/MVC2/HeuristicLabWeb.PluginHost/HLWebPluginHost/Web.config	(revision 6301)
+++ branches/WebApplication/MVC2/HeuristicLabWeb.PluginHost/HLWebPluginHost/Web.config	(revision 6303)
@@ -13,4 +13,8 @@
   </connectionStrings>
   ImplementedEND-->
+  <appSettings>
+    <add key="ChartImageHandler" value="storage=memory;deleteAfterServicing=true;"/>
+  </appSettings>
+
 
   <system.web>
@@ -103,7 +107,7 @@
       <add name="ChartImageHandler"
          preCondition="integratedMode" 
-         verb="GET,HEAD"
+         verb="GET,HEAD,POST"
          path="ChartImg.axd"
-         type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
+         type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
 
 
@@ -172,6 +176,6 @@
           </security>
         </binding>
-        <binding name="QueryService" closeTimeout="00:01:00" openTimeout="00:01:00"
-          receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false"
+        <binding name="QueryService" closeTimeout="00:03:00" openTimeout="00:03:00"
+          receiveTimeout="00:10:00" sendTimeout="00:03:00" bypassProxyOnLocal="false"
           transactionFlow="false" hostNameComparisonMode="StrongWildcard"
           maxBufferPoolSize="524288" maxReceivedMessageSize="99999999" messageEncoding="Text"
