I have a list of about 20 products, each with up to 30 possible attributes. I'm trying to figure out the best way to use checkboxes (representing the 30 possible attributes) on a form to filter the products, so that only products with the matching attributes would be shown. I can use SQL Server 2005, but it seems like that might be overkill.
(Additional) Edit: Ok, given the data structure below, how would you query the database to return products that have ALL of the matching features? Say Product #1 has features 1, 2 and 3. Product # 2 has features 2, 3 and 4. A query for features 1 and 3 should return Product #1, but not Product #2.
Products table productID int productname nvarchar(50) Features table featureID int featurename nvarchar(50) FeatureMap table featuremapID int productID_fk int featureID_fk int
I am new to ms sql server, i need a query for multiple selection of check boxes like flipkart. The below images shows how the filters works suppose if we selected fastrack, fcuk in Brand and price as rs 1001 - rs 2000 and strap as leather only that selected check box will be show. if all are unchecked all brands and prices will show same like that ms sql query filters i need it.
How to Filter Data/row from Repeater control in C.#Repeater control :---------------------All (15)shoes (3)shirts (12).Actually on click i want to filter data/row (posts) from Repeater control. Example: if i click on shoes 3 posts should display only but by default all 15 posts should display.
In securing actions/controllers, do I have to create a custom filter or use MVC built-in filter?
To use the built-in attribute Authorize() on an action/controller or create a separate class that inherits the ActionFilterAttribute which has a method (OnActionExecuting) to override and do the authentication there?
In my organization we use nested groups. For a particular usage, we have a group (let's assume that the group name "kuku"), and the names of all the nested groups under it contains "kuku" as well.
We may assume that no other group in the LDAP has "kuku" in the name.
I need to create a filter which will return all the users which belong to one of the "kuku"s group.
Obviously, using this filter will bring only the head kukus
(&(&(objectclass=user)(objectclass=person))(memberOf=CN=kuku,cn=...rest of the group DN...))
How can I use wild card to fetch all users which belong to any kuku?
For example: (&(&(objectclass=user)(objectclass=person))(memberOf=CN=.*kuku.*))
I have decorated my base controller with a couple of action filters. They work fine.
One of those filters sets up the request - does things like set the culture based on the domain, etc.
I also have a handful of actions that require authorization using the Authorize attribute.
My problem is that when an user attempts to request a page they are not authorized to access, the authorization filter kicks in and redirects them to a page telling them that they cannot vie the page.
The issue is that the action filters never run so the culture and other request data is never set. This effectively causes language to be wrong in the view and other data to be missing.
I know that authorization filters run first but my question is this: How can I design this such that I can ensure that certain methods are always run before the view is returned, regardless of the authorization.
I know that people have had some trouble with undefined CssClass values when using partial classes in ASP.NET MVC. My project is not MVC, however, and I am including a .css file that is in the root folder of my project, yet a referenced class value still results in a warning in VS 2008.
The only way I can see to do it, is hooking to the RowDataBound event:
[Code]....
I just feel like there must be a neater way. What happens if I add/remove columns, I'll have to come back here and remember to change column 6...
I tried using a TemplateColumn and a usual asp:Button - This worked, but then clicking it did not fire the ItemCommand event of the grid which I need to fire.
I have a SiteMap navigation using an asp:repeater control databound to a SiteMapDataSource. The repeater contains an asp:hyperlink for each node, and the CssClass is explicitly defined:
[Code]....
How would I cause the item that corresponds to the current node on the sitemap tree to have a different CssClass? I've had a few unsuccessful attempts (stab in the dark in all honesty) using the ItemDataBound event handler and inline code.
I include the global style sheet file on the master page's 'head' section, but the child pages show an underline on the class parameters I put on the HTML elements (and they show as 'warnings' in the error list). It still works and the styles do get applied, but how do I tell the pages that their master page has the style definition? (and I don't really want to add the global CSS file to every child page, that should be one of the perks of the Master pages)
I have a multiview, with constant back and next imagebuttons, that are positioned and characterized by an external css style sheet. One of my views however are of different widths from the others so this view needs to have the buttons positioned accordingly. I am trying to do this in my pagebehind VB.NET code with Visual Studio 2008 3.5, of assigned similar Imagebutton.CssClass = "~/css/classname" where classname is the name of the class I wish to set dynamically to the buttons.
Public Sub FwdDetermineMultiView() If mvAddReferral.ActiveViewIndex = 0 Then BuildReferralInfo() mvAddReferral.ActiveViewIndex = 1 ibtnPersonalInfoBack.Visible = True ElseIf mvAddReferral.ActiveViewIndex = 1 Then BuildContactInfo() mvAddReferral.ActiveViewIndex = 2 ibtnPersonalInfoBack.CssClass = "~/css/mvPanelNavbtnLeft1245" ElseIf mvAddReferral.ActiveViewIndex = 2 Then ICategories.CategoryList = CountChecks(lbCategories) If atLeastOneRowSelected() = True Then ICategories.Category = GetCategoryNames(ICategories.CategoryList) Session("Categories") = ICategories mvAddReferral.ActiveViewIndex = 3 Else MsgBox("You must assign at least one category", MsgBoxStyle.Exclamation, Wrn) mvAddReferral.ActiveViewIndex = 2 End If ElseIf mvAddReferral.ActiveViewIndex = 3 Then Response.Redirect("~/aacess/Referral/ReferralSummary.aspx?") End If End Sub
I need to assign display style (CssClass) to every CheckBox within CheckBoxList. I would like to do it separately for every CheckBox. And the last requirement is that I have to do it on server side within my .net code.
'm writing a ServerControl in ASP.NET 3.5, and I'm exposing CssClass, so the user can manipulate the visual appearance of the control. My problem is that I want to establish reasonable defaults, so that the user doesn't have to configure CSS unless he wants to change the defaults.My specific problem is that my control is emitting html divs, that need to display background images. I want the user to be able to specify a different image in CSS, but I want to display a default background image, and I can't make that work.The entire server control is emitted as a div, with a class name set to the value the user provided in CssClass. The div that needs the background image is enclosed within this outer div, with a class name of its own. I am currently setting the background image in CSS on the page that contains the control:
I've got a simple user control in my ASP.NET Webforms project which inherits from the LinkButton. It's got a property to change the size, which just adds some predefined CSS classes to the control.
Protected Overrides Sub CreateChildControls() Dim SizeClass As String = String.Empty If Size = SizeEnum.Large Then SizeClass = "large"
[Code]....
So when it renders the class property is something like class="button small".
When this control is placed inside an update panel along with some other things, when the update panel updates the class property for every one of these controls becomes class=" button small button small button small button small button small button small button small button small button small button small button small button small button small"
It takes the static styles but not the styles for .siteMapCss. i have checked in IE and i can find reference to .siteMapCss. but in chome its not there. IE:................
I have a large application in which I have lots of Submit - Delete - Cancel - Add and .. buttons. All of them use a same .Button CssClass.
I decided to reach the interface so that I want to differise buttons interface.
How to Apply a CSSClass to a series of similar objects with a different ID
I should Have similar Delete / Submit / Cancel or ... Button interface all over the application
All of the Delete button id are btnDelete and the same for the rest. (btnSubmit - btnCancel ...)
Note that they are Asp control so that only the last part of their name are btnDelete or ... and before Name, you have a client ID like (MainPage_MainControl_TheSimpleForm_btnDelete)