I am having trouble with my ORDY By Case Statement. It doesn't seem to be ording correctly. To see it in action, please go to [URL] and click on "latin" and it should change the sort order and when you click back on "common" it should change it back but it doesn't. Here's my code:
I have my project set up with the virtual path "/MyVirtualPath", create the virtual directory in IIS 6 (W2003) and everything works fine. Then to work better with Google Analytics I change the virtual path "/myvirtualpath" and change all redicecciones and links to lowercase. also applies the class "lowercase route urls in aspnet mvc" and works perfectly.
The problem I had to modify the virtual directory in IIS, delete virtual path "/MyVirtualPath" and I created the new "/myvirtualpath", but in all cases I use tilde "~" or where I make a "RedirecToAction" (which should take "LowercaseRoute"), continues to maintain the virtual path "/MyVirtualPath". For example, if I see the HTML source code in the browser, see "/MyVirtualPath/Content/Site.css" instead of "/myvirtualpath/Content/Site.css. "
HTML Code: (From r In tblRoles Join m In module_master On m.module_id Equals r.module_id Where Not r.role_name.ToUpper.Contains("OWNER") And Not r.role_name.ToUpper.Contains("CLIENT") Order By m.module_name, r.role_name Select r.module_id, m.module_name ,r.role_name ).Distinct and output is
[code]....
but when i remove distinct then order by works properly..???
I have used Update Panels in my ASP.net webpage. I have a modal popup. But the tab index is set to -1 for all the parent page controls once the modal popup comes in picture. Does anybody has resolution for this. I tried again reseting the tab index through javascript......But its not working(may be DOM is not getting refreshed)
I have been working on a stored procedure to calculate likert scales for course evaluations. I have the stored procedure done but I ran into an interesting but frustrating situation.
I used a case statement along with a select query to count the number of responses of a given value. Likert scales are usually 5 point scales 5 being the highest and 1 being the lowest. The value that gave me the trouble was null values. In my evaluation page the instert query puts a null value in the field instead of leaving the response blank. These are the two queries I used both are syntactically correct but one works and the other doesn't. #1 Null query that works
[Code]....
Can anyone explain the differences and why one works but the other doesn't? Can it be as simple as switching the WHEN and the column name and if it is would it be advisable the other ones around?
I have below sql statement wich don't work. It don't come up with an error but votepercentage is 0 and when I calculate it manually it should come up with
Dog = 5/9*100 = 55,55 Cat: 4/9*100 = 44,44 in votepercentage
My code:
[Code]....
The result for above code:
Dog 5 0 Cat 4 0
I triple checked that questionAnswersCount is 9 Anyone who can tell me what is wrong with this line:
(CASE WHEN pa.answersCount = 0 THEN 0 ELSE Convert(decimal, ((pa.answersCount/pq.questionAnswersCount) * 100)) END) as votepercentage
I have a [Permission] and [Unit] table (permissions types are to view, update, add, ... records). One of the [Unit]'s is "1" for "ALL Units". What I want to do is use either a CASE or IF statement in my view which will pair every [UnitId] (except "1" ofcourse) if/when the [UnitId] is set to "1".
I was wondering how I would go about setting up the CASE keyword in SQL from my Web app. I have a table where I need to update anywhere between 20 and 300 rows with different values. My table looks like this
ID EventID SeatType SeatCount Status Comments
On my page, these rows are listed in a table with a textarea to add comments. So when I click a button I need to update All the comments for all the users of a certain "EventID".I think my SQL Statement should go something Like this:
UPDATE Events SET Comments = CASE [code]....
Is that correct? I would be getting the ID and comment from each row of the table. Also (using C#) what would be the most efficient way to get this information into the query? I was thinking to use a for statement but I hear many string concatenations requires lots of processing?
I created a function and am trying to access it through a case statement, but I am getting the error:
Cannot find either column "core" or the user-defined function or aggregate "core.f_FiscalYear_Open_Days", or the name is ambiguous.
The case statement is below:
CASE WHEN c.program_id = 5 and CAST(minutes) As float)/60 >= @MiddleSyTargetHrs /core.f_FiscalYear_Open_Days(c.program_id,Org_Site_ID_Contract,'7-01-2009','7-31-2009') Then 1 Else 0 End As mon_1_hrs
I am working on an Asp.net webiste.The response time(in case of a postback) of the pages in the website is ok on my local machine.But when I uploaded the same website to the internal development server and tried to access the server pages from my local machine,its taking bit long(in case of a postback) as compared to my local machine.I do not understand why the same webiste runs slowly on the dev server..
Following is the configuration of dev server.
Microsoft Windows Server 2003 R2 Enterprise Edition service pack 2 Intel(R) Xeon(R) CPU E5450 @ 3.00GHZ 3.23 GHZ,2.00 GB of RAM Physical Address extension
Following is the configuration of my local system
Microsoft Windows XP Professional Version 2002 service pack 2 Intel(R) Pentium(R) Dual CPU E2180 @ 2.00 GHZ 2.00GHZ,1.99 GB of RAM.
I have 5 hard corded texboxes in a page in a sequence with sequence Number . Now i want to add re-order /re-arraning functionaly .. but i can't use ajax reorder list because i have 5 hard corded texbox. how can i maintain the order in Insert/Update cases. And also suggest me control that i can use, another than ajax re-order list. coz i not using any list items i have hard corded items on the page.
The AjaxToolkit has a ReorderList. I'm searching for a jQuery solution that does the same and found this page. I would like to change the order of divs (vertically) and upload the new order to the database (ajax).
What i need is i need to bind last 10 Order in Gridview/details view with paging, and the same order detail also fetch from database and shown in another gridview.. if user click any oderNo in first Gridview/DetailView then i need to show Respective order detail in anther gridview..
without postback coz we already fetch 10 order with orderdetails from the database..and if user click next 10 orderNo using paging then again we need to load 10 orderNo with respective orderdeatils from database like this going on....as well as let me know how to take print of particular oder and order detail....?
From my testing, it appears that the order of parameters for the UpdateParameters must match both the order of the bound fields on the form (asp:Formview), and the order of the parameters in the UpdateCommand. Is that correct? If so, why do the parameters have names if all that matters is the order? I tried both asp:ControlParameter and asp:Parameter. Maybe the more relevant question is why aren't the names used instead of the order, particularly for the form order?
So, given I display the Identity field (CID), and need that for the update, I cannot get the update to work without including it in the UpdateCommand. Of course, since it is an autonumber field in Access, I cannot actually set it. So, I had to add another field to the db (lngUpdateCID) that I could set. That can't be how it has to be done, but I could not figure out another way to do this.
I have a table of persons that used for different purposes in a database. One of those purposes is to present a list of organization contacts to users. I use a gridview and stored procedures to get the data.
On one page listing all organization contacts the client requires the order of the persons to be presented as President first, Vice President second, Secretary third, etc. I accomplished this requirement by simply entering the persons in the table in the order in which they were required to be displayed on that particular page.
But then on another contacts page the client requires only a subset of the persons in the table to be displayed, moreover, the order of the persons is to be presented as Secretary first, Office Administrator second, President third and Vice President fourth.
I have no idea how to pull the data into my gridview in the order that's required for the 2nd page. I thought about adding a column in the table that I could use to store a numeric value and then order by that value in the procedure that pulls the data for the second contact page, but this somehow seems wrong.
I am using dropdownlist to select whether the gridview should be filled by data arranged in ascending order or descending order with Gridview Paging. The problem i am encountering is that when i fill the data in ascending order it works fine but when i arrange the data in descending order the first page loads fine but the other pages are not filled properly in paging.