I just created a small site with form authentication with route handling. Without forms authentication, the pages route just fine. With forms, it returns back to the login page as it is not one of my allowed locations specified in my web.config file.
I know I probably need to write a custom route handler. Does anyone have an example I can follow for this?
Was looking at asp.net mvc complex routing for tree path as an example of how to define a custom route handler for my MVC app. Essentially, I want to give the end user ultimate flexibility in defining the URL for any given page, so I provide them with a field in the interface to specify their own custom URL.
My custom route handler is basically a wild-card handler. It will do a lookup and if it finds a match, map it accordingly. However, if no match is found, I want it to fall back and find the next rule that matches in the global.asax. Is that possible? Or do I essentially need to code the mappings that used to exist in my global.asax into my custom route handler?
having trouble defining bindings using ninject.I am in a standard ASP.NET WebForms application. I have defined an http handler to Inject dependencies in pages and controls (Property injection).Here is what I am trying to do:I am creating a custom combobox usercontrol. Based on the value of an enum on that combobox, I want to be able to Inject a different object in a property (What I am trying to do is a bit more involved than that, but answer to this should be enough to get me going).
I recently upgraded from VS2005 to VS2008. I did a full install of VS2008, then opened my existing project in it. This launched the conversion wizard which successfully converted my VS2005 project to VS2008 and it opened in VS2008 owever, when I first tried to build the solution in VS2008, I got an error on a page defining a web service saying
My following sql query giving me the following error, What does it mean. Am i defining the alias fir column in wring way. Please help me out with this. My error is this and i am putting query just below the error. Error in SELECT clause: expression near 'Year'. Missing FROM clause. Unable to parse query text.
SELECT [tbl_students].passing_year as Passing Year,[tbl_branch].branch_name as Branch_Name FROM [tbl_students], [tbl_course], [tbl_branch] WHERE [tbl_students].course_id=@courseId AND [tbl_students].branch_id IN(64) AND [tbl_students].course_id=[tbl_course].course_id AND [tbl_students].branch_id=[tbl_branch].branch_id AND (@firstYrPercent is null OR [tbl_students].first_year_percent>=@firstYrPercent) AND (@secondYrpercent is null OR [tbl_students].second_year_percent>=@secondYrPercent) AND (@thirdYrPercent is null OR[tbl_students].third_year_percent>=@thirdYrPercent) AND (@finalYearpercent is null OR [tbl_students].final_year_percent>=@finalYearpercent) AND (@currentDegeePercentage is null OR [tbl_students].current_degree_percent>=@currentDegeePercentage) AND (@passoutYear is null OR [tbl_students].passing_year>=@passoutYear) AND (@currentBacklog is null OR [tbl_students].current_backlog=@currentBacklog) AND (@sex is null OR [tbl_students].gender=@sex) AND (@eGap is null OR [tbl_students].gapin_education<=@eGap) AND (@highSchoolPercentge is null OR [tbl_students].highschool_percentage>=@highSchoolPercentge) AND (@higherSchoolPercentage is null OR [tbl_students].ssc_percentage>=@higherSchoolPercentage) AND (@grauationPercentage is null OR [tbl_students].graduation_percentage>=@grauationPercentage) AND (@diplomaPercentage is null OR [tbl_students].diploma_percentage>=@diplomaPercentage) AND (@noOfAtkt is null OR [tbl_students].number_of_ATKT<=@noOfAtkt) AND (@validDate is null OR [tbl_students].DOB>=@validDate)
On one of our tables, a default clustered index is defined on the primary key by sql server 2005. The table also contains forign key columns and has got over 2 million rows. There are very frequent INSERT, UPDATE and DELETE functions on this table. Recently some of the SELECT queries which primary operate on the forign keys have become very slow (resulting in application timeout). To fix the problem, I defined an index on one of the primary keys which gave me very quick results. I don't know much about indexes.
1. Since I defined a new index (on the forign key) in addition to the existing default index, what kind of index (clustered or non-clustered) have I defined?
2. What performance impact does it have on the rest of the system? Is it going to break something else?
3. I read about fill factor. What is this and how does it effect the system?
4. Is the new index physically going to make any changes?
5. In case I delete this index later on, will the database return to the existing state or it will be a different state from now?
i am just trying to make a menu "manually" by defining menu items, i am also using css adapter for easy styling. I am facing a problem on postback, i am not getting the selected item (there is no item with class AspNet-Menu-Selected), even without css adapter i think. My menu is simple, there is master page, a couple of pages, the menu is on master page. why, and how can i solve this.
I have an application which has rows of data in a relation database the table needs a status which will always be either Not Submitted, Awaiting Approval, Approved, Rejected Now since these will never change I was trying to decide the best way to implement them I can either think of a Status enum with the values and an int assigned where the int is placed into the status column on the table row.
Or a status table that linked to the table and the user select one of these as the current status.
I can't decide which is the better option as I currently have a enum in place with these values for the approval pages to populate the dropdown etc and setup the sql (as it currently using to Approved and submitted for approval but this is dirty for various reasons and needs changed).
Wondering what your thought on this were and whether I should go for one or the other.
If it makes any difference I am using Entity framework.
I need to defining the Series parameters for an MS Chart.
Using the sample data below is it possible to set the X & Y value types for a graph with all days for the month on the X axis and the total number of visits for each day on the Y. Are MS Charts capable of auto generating the X axis based on the extents of the data dates as well a counting the daily instances?
I have a small windows forms application that uses the membership provider that is defined in my app.config file. I want to get rid of my app.config file and initialize the membership provider completely from code. The reason behind this is because I want to be able to dynamically connect to different databases containing asp.net user tables and I want the user to be able to enter the desired database information into a text box at run time. Is this possible or is it required that I have an app.config file?
I created user control. It exposes string public property (it may be List<string> or whatever). I want to support defining this property in aspx code, when declaring the instance of this usercontrol. Something like this: