What Is ISAPI Or ISAPI Extension Or Filters
Feb 6, 2011What is ISAPI or ISAPI extension or filters? The more I read the more I am confused.
View 5 RepliesWhat is ISAPI or ISAPI extension or filters? The more I read the more I am confused.
View 5 RepliesI'm moving some ASP.NET projects from IIS to Cherokee/nginx and I need a solution for url rewriting. I'm using IIRF (great project) but this works only on IIS.
View 2 RepliesI have the following url which i want to write a helicon RewriteRule rule
it should check the pattern startat=/mypage.asp and then only executeOriginal urlhttp://www.test.com/welcome.asp?tartat=/mypage.asp&value1=23&value2=3434&value3=1&value4=someothervaluethe new url http://www.test.com/mynewpage.hcx?startat=/mypage.asp&value1=23&value2=3434&value3=1&value4=someothervalue
How to apply filters to a gridview control like filters in excel sheet?
View 2 RepliesI'm currently working on a highly configurable Database Viewer webpart for WSS 3.0 which we are going to need for several customized sharepoint sites. but i fear it's necessary to recap the whole issue. As background information and to describe my problem as good as possible, I'll start by telling you what the webpart shall do:
Basically the webpart contains an UpdatePanel, which contains a GridView and an SqlDataSource. The select-query the Datasource uses can be set via webbrowseable properties or received from a consumer method from another webpart. Now i wanted to add a filtering feature to the webpart, so i want a dropdownlist in the headerrow for each column that should be filterable. As the select-query is completely dynamic and i don't know at design time which columns shall be filterable, i decided to add a webbrowseable property to contain an xml-formed string with filter information.
So i added the following into OnRowCreated of the gridview:
void gridView_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
for (int i = 0; i < e.Row.Cells.Count; i++)
{
if (e.Row.Cells[i].GetType() == typeof(DataControlFieldHeaderCell))
{
string headerText = ((DataControlFieldHeaderCell)e.Row.Cells[i]).ContainingField.HeaderText;
// add sorting functionality
if (_allowSorting && !String.IsNullOrEmpty(headerText))
{
Label l = new Label();
l.Text = headerText;
l.ForeColor = Color.Blue;
l.Font.Bold = true;
l.ID = "Header" + i;
l.Attributes["title"] = "Sort by " + headerText;
l.Attributes["onmouseover"] = "this.style.cursor = 'pointer'; this.style.color = 'red'";
l.Attributes["onmouseout"] = "this.style.color = 'blue'";
l.Attributes["onclick"] = "__doPostBack('" + panel.UniqueID + "','SortBy$" + headerText + "');";
e.Row.Cells[i].Controls.Add(l);
}
// check if this column shall be filterable
if (!String.IsNullOrEmpty(filterXmlData))
{
XmlNode columnNode = GetColumnNode(headerText);
if (columnNode != null)
{
string dataValueField = columnNode.Attributes["DataValueField"] == null ? "" : columnNode.Attributes["DataValueField"].Value;
string filterQuery = columnNode.Attributes["FilterQuery"] == null ? "" : columnNode.Attributes["FilterQuery"].Value;
if (!String.IsNullOrEmpty(dataValueField) && !String.IsNullOrEmpty(filterQuery))
{
SqlDataSource ds = new SqlDataSource(_conStr, filterQuery);
DropDownList cbx = new DropDownList();
cbx.ID = "FilterCbx" + i;
cbx.Attributes["onchange"] = "__doPostBack('" + panel.UniqueID + "','SelectionChange$" + headerText + "$' + this.options[this.selectedIndex].value);";
cbx.Width = 150;
cbx.DataValueField = dataValueField;
cbx.DataSource = ds;
cbx.DataBound += new EventHandler(cbx_DataBound);
cbx.PreRender += new EventHandler(cbx_PreRender);
cbx.DataBind();
e.Row.Cells[i].Controls.Add(cbx);
}
}
}
}
}
}
}
GetColumnNode() checks in the filter property, if there is a node for the current column, which contains information about the Field the DropDownList should bind to, and the query for filling in the items.
In cbx_PreRender() i check ViewState and select an item in case of a postback. In cbx_DataBound() i just add tooltips to the list items as the dropdownlist has a fixed width.
Previously, I used AutoPostback and SelectedIndexChanged of the DDL to filter the grid, but to my disappointment it was not always fired. Now i check __EVENTTARGET and __EVENTARGUMENT in OnLoad and call a function when the postback event was due to a selection change in a DDL:
[Code]....
When i have two or more filters set which return zero rows, and i change back one filter to something that should return rows, the gridview remains empty (although the pager is rendered). I have to completly refresh the page to reset the filters. When debugging, i can see in the overridden CreateChildControls of the grid, that the base method indeed returns > 0, but anyway.the gridView.RowCount remains 0 after databinding. Anyone have an idea what's going wrong here?
Question:-
Page is a typical search page with few filters on it. When search for records based on filters, it shows result in Gridview. From grid view records, user can click on any record to see the details which takes the focus on new page. Its working fine so far.Now when user comes back from details page to search page. I am loosing selected filters values and no result in grid view.How can i display selected filters and its results in gridview when user is coming back on search page? Any example etc.?
am a bit unsure of the best way to go about this. I have a form where data is entered, date ranges, usernames, passwords etc and when the button is pressed on the form it searches a database and returns values which match the values entered.I can't think of the most efficient way to do this, could anyone give some pointers on where to start?I thought perhaps of writing a query and then just putting in the variables which pick up the entered values and reading it all in as one big string something like:
SELECT * FROM DB WHERE ProductID = "DateTxtBox" & "NameTxtBox"
I haven't checked the syntax but this is just to give you a idea of what I am thinking.
Will MVC3 make possible to use IOC with Action Filters? Is this on the roadmap?
View 1 RepliesAllowSorting="True" AutoGenerateColumns="False" DataSourceID="LinqDataSource1">
SortExpression="UserName" />
SortExpression="FullName" />
SortExpression="Email" />
SortExpression="LastLoginDate" DataFormatString="{0:dd MMMM yyyy}"/>
<asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="MyDataContextDataContext" onselecting="LinqDataSource_Selecting">
<WhereParameters>
<asp:Parameter Name="Subject" />
</WhereParameters>
</asp:LinqDataSource>
public void LinqDataSource1_Selecting(object sender, LinqDataSourceSelectEventArgs e)
{
this.LinqDataSource1.WhereParameters["Subject"].DefaultValue = this.txtSubject.Text;
e.Result = reporterRepo.GetInquiries();
Am running asp.net application with gridview.Am using filters to filter only one column.Now i want to filter two or more than two columns.How to i set the filters for that..if i give && or|| operators it is showing syntax error..
i given the code as;
"
ProviderName="<%$ ConnectionStrings:booksConnectionString.ProviderName %>"
SelectCommand="SELECT * FROM [book]"
FilterExpression="UserName Like '{0}%' || Password Like '{0}%'" >
I am new to ASP.NET MVC 2 and I am having a very hard time figuring out how to do even the most simple things. I have a couple of books on ASP.NET MVC as reference but I cannot find any answer to my question. Here is what I basicalyl have and need:
I am trying to create a page that shows me a table that contains some Product Statistics with columns such as Date, ProductCount, PriceCount. On the same page I want to add some filters such as "Product category" (dropdown) and a date from and date to (jquery ui datepicker). When a user clicks on "Filter" it should reload the page and in the Product Statistics it should show the statistics filtered by "Product Category" and the date range. At the same time I want to make sure that the selected Product Category from the dropdown list does not get lost, the same for the date pickers.
I have a GlobalReportController with two actions: "Index" and "Filter". I have also a GlobalReportIndexViewModel and a ReportFilter. In the "Index" action, I retrieve the complete list of statistics and product categories and fill up the ProductStatisticsIndexViewModel.
I am having a whole lot of problems trying to grasp how the ASP.NET MVC paradigm works exactly.
I have a table called Student with a lot foreign keys that will be used after to filter students(table rows).The structure of this table is like:
StudentId GenderId DegreeId NatioanlityId
1 2 2 3
....
As a student can speak one or more language,the Sudent Table is linked to language table like this
StudentId LangaugeId
1 1
1 2
1 3
And a student can chose one or many subjects for exam:
StudentId ExamId
1 1
1 2
....
In my asp.net page I would like to filter students via checkbox using ajax for example, student having female and male gender with Degree 1,speaking language 1,2... I filter rows in a stored proc using user defined table,and I have to use a lot of IF statements like this
if(EXISTS(SELECT GenderId FROM @GenderTable))
if(EXISTS(SELECT DegreeId FROM @DegreeTable))
if(....)
else
if(...)
How can I avoid all the IF statements? I have more than 5 filters.It's boring.
In Short: Does any know a way from the base controller to get a list of actionFilters being applied to the current executing action?
The Long:I am using ASP.NET MVC 1.0 framework. I have a "RequireSSL" actionFilter that I've recreated for checking out, however, if someone leaves the checkout and goes back to the store I would like to forward them back to non-secure version of the site.It would be helpful in the base controller (I am using a custom base controller that inherits from the default Controller) to find out what actionFilters are being applied to the current action.I could include this into the global.asax.cs
In previous versions of DynamicData you could override GetFilteredColumns method from FilterRepeater to manage which columns are used to generate filters.
But now FilterRepeater is obsolete, and his successor QueryableFilterRepeater don't have such method.
There is any way to override the columns used for filtering with QueryableFilterRepeater?
i want to create an search that uses ajax. here are the requirements
1)on initial page load return all search data
2)have textbox that when typed in filters out the none matching records
any good tutorials out there on this forgot to mention i'm using the telerik controls, using radgrid to display the results.
I have a radgrid with multiple filters including DateTimePicker for From DateTime To DateTime.
[Code]....
This is really frustrating. Upgraded report to Crystal 2008, and the filters on month/year are being ignored. This report is a simple cross-tab. We have a worker data table, with each row containing a date, a worker id, and various counts to be listed by worker, and then a summary for each row. The columns are the worker's name.Parameters are report month and year, so I have a group filter that month(report_date) = param month and same for year.The report does ask for the parameter input, but then ignores it and summarizes every record in the worker data across all time.So, for example, my user Frank has data in the worker table for each month from Janaury 2008 to December 2010, and he shows up when I run the report for January 2011.Prior to upgrading, the report worked great; it would filter out the records by input month and year and then summarize. I neither understand why this changed, nor the new right way to apply filters for cross-tabs.
View 2 Replieswhat it is i have a datagrid bound to a datatable.This datatable fills from a sql table. This datatable will have 2 columns which is 'part' and 'description'.What it is I want to have a couple of chk boxes next to the datagrid which will filter it by column 'part'.The issue is the datagrid will have about 1000 records so i dont want to do a for next loop searching for field part for a certain filter
View 1 RepliesI have a website developed in C# with Visual Studio 2010. I am using datalist to list the documents for monthly meetings. Each monthly meeting has 6 datalists representing each section of the monthly meeting. I am using row filters to filter the data for the respective month and section. I am using the Membership Provider model and am displaying the documents for the respective user. When a user clicks on the document link the document is marked and displayed as "read". This is all working as it should in my existing code.
However, I would like to be able to display this data programmatically. My oldest data is December 2009. I would like to dipslay this data programmatically based on todays's date and then looping back until December 2009. Today, I update the web form and the code behind on a monthly basis and I know that there is probably a better way to do this. I think this can be done but I am not certain if it can be done with row filters, because amongst other things I do not know how I can dynamically generate the datalist ids so that I can then bind the row filtered data.
Below is a sample of my code for one month of data.
[code]....
wondering if someone can possibly help me out with a gridview. I have data coming into a grid and I know how to filter the data using one dropdown, I'm trying to get a little more advanced now. I'd like to filter using three dropdowns.
This is what I have so far: I don't know how to hook the downlists to the query?
<asp:DropDownList runat="server" id="DropDownList1" Width="90px">
<asp:ListItem Value="item_num">Item #</asp:ListItem>
<asp:ListItem Value="lot_num">Lot #</asp:ListItem>
<asp:ListItem Value="production_code">Production Code
</asp:ListItem>
<asp:ListItem Value="batchcode">Batch Code</asp:ListItem>
<asp:ListItem Value="inbound_no">Inbound #</asp:ListItem>
<asp:ListItem Value="recv_date">Received Date</asp:ListItem>
<asp:ListItem Value="location">Location</asp:ListItem>
<asp:ListItem Value="category">Category</asp:ListItem>
</asp:DropDownList>
<asp:DropDownList runat="server" id="DropDownList2" Width="160px">
<asp:ListItem Value="=">is equal to</asp:ListItem>
<asp:ListItem Value="<=">is less than or equal to
</asp:ListItem>
<asp:ListItem Value=">=">is greater than or equal to
</asp:ListItem>
<asp:ListItem Value="<>">is not equal to</asp:ListItem>
<asp:ListItem Value="begins with">Begins With</asp:ListItem>
<asp:ListItem Value="Like">Ends With</asp:ListItem>
</asp:DropDownList>
<asp:TextBox runat="server" id="TextBox1" Width="150px">
</asp:TextBox>
<asp:Button runat="server" Text="Go" id="Button8" BackColor="Lime" />
<asp:Button runat="server" Text="Clear Filter" id="Button9" /><br />
<input name="Checkbox1" type="checkbox" /><label id="Label5">
Include Items containing "Zero on Hand" Quantity.<br />
Group by Fields: <input name="Checkbox2" type="checkbox" />
Item/Lot
<input name="Checkbox3" type="checkbox" /> Production Code
<input name="Checkbox4" type="checkbox" /> Batch Code</label><label id="Label4"></label><br />
<hr />
<asp:GridView runat="server" id="GridView1" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" Font-Size="Small" BorderStyle="None" BackColor="White" GridLines="Vertical" BorderColor="#999999" BorderWidth="1px" CellPadding="3" Font-Underline="False"
AllowSorting="True" AllowPaging="True" PageSize="20">
<RowStyle BackColor="#EEEEEE" ForeColor="Black" />
<Columns>
<asp:boundfield DataField="STATUS" HeaderText="Status" SortExpression="STATUS">
</asp:boundfield>
<asp:boundfield DataField="ITEM_NUM" HeaderText="Item #" SortExpression="ITEM_NUM">
</asp:boundfield>
<asp:boundfield DataField="LOT_NUM" HeaderText="Lot #" SortExpression="LOT_NUM">
</asp:boundfield>
<asp:boundfield DataField="LOT_EXT" HeaderText="Lot Ext" SortExpression="LOT_EXT">
</asp:boundfield>
<asp:boundfield DataField="RECV_DATE" HeaderText="Recv Dt" SortExpression="RECV_DATE">
</asp:boundfield>
<asp:boundfield DataField="PRODUCTION_CODE" HeaderText="Prod Code" SortExpression="PRODUCTION_CODE">
</asp:boundfield>
<asp:boundfield DataField="QTY_ONHAND" DataFormatString="{0:NO}" HeaderText="OnHand" SortExpression="QTY_ONHAND">
</asp:boundfield>
<asp:boundfield DataField="QTY_RESERV" HeaderText="Reserv" SortExpression="QTY_RESERV">
</asp:boundfield>
<asp:boundfield DataField="QTY_AVAIL" DataFormatString="{0:N}" HeaderText="Avail" SortExpression="QTY_AVAIL">
</asp:boundfield>
<asp:boundfield DataField="QTY_ADJUST" HeaderText="Adjust" SortExpression="QTY_ADJUST">
</asp:boundfield>
<asp:boundfield DataField="QTY_SHIP" HeaderText="Shipped" SortExpression="QTY_SHIP">
</asp:boundfield>
<asp:boundfield DataField="QTY_RECV" HeaderText="Recv" SortExpression="QTY_RECV">
</asp:boundfield>
<asp:boundfield DataField="PROD_DATE" HeaderText="Prod Date" SortExpression="PROD_DATE">
</asp:boundfield>
<asp:boundfield DataField="RELEASE_DATE" HeaderText="Release" SortExpression="RELEASE_DATE">
</asp:boundfield>
</Columns>
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
<PagerStyle HorizontalAlign="Center" BackColor="#999999" ForeColor="Black" />
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#000084" ForeColor="White" Font-Bold="True" />
<AlternatingRowStyle BackColor="#DCDCDC" />
</asp:GridView>
<asp:SqlDataSource runat="server" id="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:RemoteRooster %>" SelectCommand="SELECT * FROM [INVENTRY] WHERE OWNER = 'CompanyName' AND QTY_ONHAND > '0'">
</asp:SqlDataSource>
I am trying to create a stored procedure that filters data from sql server by date but i get this error:
Conversion failed when converting datetime from character string.
my stored procedure is like:
[Code]....
the parameters are passed to the stored procedures as dateTime variables from c# code...
Is it possible to use dynamic query filters with a gridview using a stored procedure as a data source? What I'm thinking of is a search page where there are multiple controls to enter in a search string and a radio button for the AND/OR query filters between the various controls. If not, what would be the best way to allow a user to select an AND / OR with a group of different query controls?
Here is the page I have created thus far using a view and no AND/OR option. I but I can't get it to work with my SP, also listed below:
[code]....
I have a static method that I use to control REST styled HTTP codes when my mvc application encounters an exception.
The method looks like:
[Code]....
This is static becuase then I can call it within an action or inside a filter. The problem I am having is that when I call RaiseException inside a filter, it stills goes into the requested action. Response.End() doesn't seem to have any effect. Any clues on how I can get Response.End() to work when called?
Who does know what is the best file extension for RSS feed on the site (for SEO):
(XML) mysite.com/rss.xml
(RSS) mysite.com/rss.rss
(HTML) mysite.com/rss.html
(ASPX, PHP, etc) mysite.com/rss.aspx
(with url params) mysite.com/rss.aspx?param1=val1¶m2=val2
some other
I'm going to use (3) html on my site, is it ok?
I've looked at a few files this AM, all have .xap, and all are throwing errors as I try to debug each of these projects. Here is an excellent example:
http://www.codeproject.com/KB/silverlight/TallColumns.aspx
I'd like to learn how this project works, but each time I try to debug, it throws an error saying 'Error creating control xaml1, unknown server tag asp.SilverLight'. what does this mean? What do I need to do to make this work?
I'm using VWD 2008 Express.