.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Can Someone help me with custome filtering

Posted By:      Posted Date: September 04, 2010    Points: 0   Category :ASP.Net
Hi I have table for players (containing skills field that can be just amature or professional)  and table for Contracts (just professional player can sign contract)i use Dynamic data Entities websitei need whene inserting or editing Contract select just players whom professionalsthank you all

View Complete Post

More Related Resource Links

GridView Filtering In ASP.NET

In this tutorial you will learn how to add a filter to a Grid View Control, To modify the query with a parameterized filter, the WHERE Clause, Parameter properties, Parameter Value Editor and To test filtering.

IIS request filtering module


Hi folks,

I have migrated my web application to iis 7.5 Now I am using windows 7 as dev machine.

the problem is it takes several seconds to download a single page into web browser now. It contains only 300 records.

Everything is ok on prod website though. Prod version contains up to 200000 records .I can't also use code profile tool of red gate to analyze possible bottlenecks since the software in question can't restart IIS. No errors in IIS logs. I am using ISAPI Rewrite 3 filter by Helicon to apply some URL rewriting rules. I am thinking about conflict between ISAPI rewriting rules and default IIS 7.5 request filtering rules, since the IIS request filtering module gets a higher priority than even the built-in IIS 7.5 rewriter module. Is it possible to tweak the module through web.config so that priority is given to ISAPI rewriting rules or something like that?

Frankly, I spent several days to figure out solution. No success...

I've also deployed the application on IIS 5.1. Everything works fine. Any ideas about possible solution for IIS 7.5?

HTTP Pipelines: Securely Implement Request Processing, Filtering, and Content Redirection with HTTP


ASP.NET is a flexible and extensible framework for server-side HTTP programming. While most people think of ASP.NET in terms of pages served, there is a lower-level infrastructure sitting beneath this page model. The underlying plumbing is based on a pipeline of app, module, and handler objects. Understanding how this pipeline works is key if you want to get the most out of ASP.NET as an HTTP server platform, while making your process more efficient, and keeping your server secure. This article introduces the architecture of the pipeline and shows how you can use it to add sophisticated functionality to an ASP.NET-based app.

Tim Ewald and Keith Brown

MSDN Magazine September 2002

Disable filtering on a Dynamic Data list view.


I have an entity set of NotificationTemplates, and each one of these has a collection of zero-many SmsTemplate entities. When editing or viewing a NotificationTemplate, I have a link to View SMS Templates. That link takes me to a List view for the SmsTemplates entity set, filtered for the NotificationTemplate I was viewing.

How can I prevent the user changing this filter to show SmsTemplates for another NotificationTemplate? That is, I want the filter, but it must be read only. The drop-down just mustn't drop down, it must just display the name of the NotificationTemplate that these SmsTemplates belong to. To view SmsTemplates for another NotificationTemplate, the user must click View SMS Templates from that other template.

This was originally asked by myself on SatckOverflow at: http://stackoverflow.com/questions/3514373/disable-filtering-on-a-dynamic-data-list-view

Filtering a grid column when the column is bound to a collection


My SetUp (I am using EF for my data):

1 Grid bound to a collection of Vehicle Objects

1 Combobox with multiselect enabled bound to a list of VehicleExtras.

Each vehicle has a collection of extras. 

My Problem:

What I need to do is have the Grid filter Vehicles based on whether those vehicles have the selected VehicleExtras from the Combobox

Can anyone point me in the right direction as to how this filtering should be done (if it is at all possible!)



Custom Filtering



I write a custom StringFilter to use as filter control for string properties, I use bellow code to "GetQueryable" method :

    public override IQueryable GetQueryable(IQueryable source)
        string selectedValue = TextBox1.Text;
        if (String.IsNullOrEmpty(selectedValue))
            return source;

        object value = selectedValue;
        if (DefaultValues != null)
            DefaultValues[Column.Name] = value;

        return ApplyEqualityFilter(source, Column.Name, value);
the disatvantage of this method is user must enter whoul string to find...
can any body help me to change this method to work such as sql "Like" method instead of equality ?


Filtering/selecting rows based on date


I have a gridview, based on thsi datasource:


<asp:SqlDataSource ID="SqlDataSourceAllLoads" runat="server" 
        ConnectionString="<%$ ConnectionStrings:tplatz_dk_dbConnectionString %>"               
        SelectCommand="SELECT DISTINCT DATEADD(day, 0, DATEDIFF(day, 0, tblDelivered.delivered_Date)) AS delivered_Date, tblDelivered.delivered_LoadNo, tblDelivered.delivered_TrailerNo, ISNULL(tblDeliveredInfo.deliveryInfo_FirmaNavn, N'?') AS Expr1 FROM tblDelivered FULL OUTER JOIN tblDeliveredInfo ON tblDelivered.delivered_LoadNo = tblDeliveredInfo.deliveryInfo_LoadNr ORDER BY delivered_Date DESC">

Using a dropdownlist, I can filter (by changing datasource) the results based on customer names in a dropdownlist. This datasource, working perfectly, looks like this:


<asp:SqlDataSource ID="sqldataSourceKundeLoads" runat="server" 
        ConnectionString="<%$ ConnectionStrings:tplatz_dk_dbConnectionString %>" 
        SelectCommand="SELECT  DATEADD(day, 0, DATEDIFF(day, 0, tblDelivered.delivered_Date)) AS delivered_Date, tblDelivered.delivered_LoadNo, tblDelivered.delivered_TrailerNo, ISNULL(tblDeliveredInfo.deliveryInfo_FirmaNavn, N'?&#

Form authentication and custome provider

hello frndsi am developing security module in asp.neti am using form authentication along with login control and create user control provided by asp.net.Now, as u guys know that form authentication create aspnet_users table in the database which have limited columns.i also want to maintain additional user information such as address, city etc in the database.how can i achive this?shall i use another user table? if yes then how? and how to synchronize it with aspnet_users table?if instead of aspnet_users table, i should use only user table then how to validate user from login control provided by asp.net?Please guide me or provide me with an example, how to implement this.Thanks in advanceRegardsVipul 

does SPD support filtering of the mail title/body we send to a list/library?

for example, if we send a mail with the title of "%hostname% %ipaddress%" to a list. can SPD WF filter the title and get %hostname% to a new variable? the reason to ask this is i want to send a well-formated mail to sharepoint and the automatical WF can recognize the change of the list items and update the relevant columns by the filtered content from mail title or body. thanks!

Sharepoint filtering

Hey,  So i will start by describing what i have .. i have a data view  in a table and i want to filter the data i want that were last modified on a specific date. for example i specify from dropdown list that i want the date : 21\08\2010 . and the data view will filter to me the data which has been modified in that date. i hope u can help me  thanks a lot for ur time best regards,

gridview filtering using a codebehind (textbox + search button)

i am trying to replicate the following sequence: input text into text box > press search button > search a database using LIKE operator > display using a gridview or listview. this sequence is fairly easy to do using the drag and drop then sqldatasource options, but i am trying to do the same result using a codebehind.  here is my code:   ____________________________________________________________________________________________________________ SqlConnection myConn; myConn = new SqlConnection(@"Data Source=.\SQLEXPRESS; AttachDbFilename=|DataDirectory|\projectDB.mdf; Integrated Security=True;User Instance=True"); myConn.Open(); string strSQL; strSQL = "SELECT * FROM Message";       //strSQL = "SELECT * FROM Message WHERE Message LIKE '" + txtSearch.Text + "'"; SqlDataAdapter da = new SqlDataAdapter(strSQL, myConn); DataSet ds = new DataSet(); da.Fill(ds, "Message"); GridView1.DataSource = ds; GridView1.DataBind(); myConn.Close(); _____________________________________________________________________________________________________________  now, if I use this code inside a page_load event, it does work. if I put it inside a button_click event i get nothing. i am mystified by this.. any help? why can't i use a button to display my gridview1 when i'm using a code behind.  

Filtering GridView?

I have a web page with a GridView control populated from a database.  I want to have a form that users can use to filter the results presented in the GridView.  For example, it might have fields for last name, first name, department, wages, date of hire, etc. that the user can fill out to filter the results.  Is there an elegant way of doing this?  The only thing that comes to mind is to test the value of each field and then have a database query string for every outcome.  For example, if the user only inputs a last name, the query might be SELECT * FROM EMPLOYEE ... WHERE LastName = @LastName.  If they input both last name and department, the query would be SELECT * FROM EMPLOYEE ... WHERE LastName = @LastName AND Department = @Department.  This seems like it would get unwieldy very quickly.  Any suggestions on a better method? 

Multiple selection filtering

I have a document library and I am unable to do multiple selections filtering for a column. Is it possible to enable this?

ASP.NET Dynamic Data Filtering not working

 Hello. I am trying to use this DLL to make searches on dynamic data pageshttp://www.codeplex.com/DynamicDataFilteringI pasted the following code, but nothing happens    <cc1:DynamicFilterForm ID="DynamicFilterForm1" DataSourceID="GridDataSource" runat="server">             <FilterTemplate>                                             <table>                <tr>                    <td>                        Nombre activo</td>                    <td>                          <cc1:DynamicFilterControl ID="DynamicFilterControl3

filtering a role playing dimension

I have a role playing dimension and need to run a query that will select the intersection of members that are common on a single attribute...    So Dim1 and Dim2, they both have the attribute [Name] (though the fact table has two different foreing keys mapping to the single primary key on the dimension table) I need to select the members where both foreign keys on the fact table map to the same member in the dimension table so for example,  Dim1.Name = 'John Smith' and Dim2.Name = 'John Smith' Any ideas? Javier Guillen

Regular expression usage for filtering purpose

Hi, I would like to use regular expression in following situation: My input record has attribute name and value separated by white space and multiple attribute is separated by new line (something like this): name john phone 6591120 email john@msn.com and I would like to define some rules which may contains AND/OR relatiosn like: rule 1 : (name like %oh% and phone  like %5911%) or email like john% rule 2 : (name like abc% and phone  like %5911%)  ... Rule n  I may have hundreds of such rules and I want to validate my input records against these rules and I want list of all rules which satisfied by input record. I am getting this records at very high rate from pipe and I want to pass them through defined rules. Is it possible to combine above rules into some efficient data structure and pass input record through it? can I use .Net regular expression technology to do my job efficiently in this situation? Any idea will be really appreciated? Thanks in advance...    
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend