I thought I had everything in place to start workign with asp.net web services, but after trying to run my first test, and then attempting to load even a basic .aspx test page it seems my server is not correctly configured for asp.net. I haven't been able to track down where my problem is though.
when i started a brand new asp web site in "Microsoft Visual Web Developer 2010 Express".. i get the main page called "Default.aspx" which has the following code...
So if i Ctrl+f5, and load it into a browser, everything is perfect, if i change it, (From "Welcome to ASP.NET" -> "Yaahhooo ASP.NET" and then Run it again (Ctrl+F5) then it compiles just fine and still shows the original page, yes i've considered browser cache and opened it up in a new browser (first time ff then ie) but still, once i compile it the first time, i can't change it unless i create a brand new Default.aspx
Sorry for the long explanation, i have no idea what im doing, looks like im getting off on the wrong foot.
EDIT!!-> if i make a change and save it and doesnt reflect changes in the browser, if i just quit MVWD 2010, and open it back up then it will reflect the changes right away..
I am working in one of the company which sells music online. we want to white label our website so the different consumer can use our download store with their brand name.
I would like to select a distinct query based on three fields and display the rest of the fields. For example,
I have firstname, lastname, address, city, state and zip, but I only want to use the distinct on these fields first and last name. However when i use the distinct function I get a distinct on all the selected rows. I just want to distinct firstname and lastname and display the other fields. for example,
Mary Smith New York Mary Smithy New York Mary Smith Maine
I would like the result to be:
Mary Smith New York Mary Smithy New York
I don't care about Mary Smith Maine, because i am only using the distinct for "Mary Smith" firstname and last name and showing the city.
How can i select all columns of table but to distinct by one column? i am tryin to figure it out without success, i know how to make distinct (select distinct column from table, but i need all the values from the table and to distinct by Delcompany.
I have an object, that has many properties but the only two to worry about are:
myobject.ID which is an int myobject.Names which is a HashSet
Then I have a List of those objects that looks something similar to this:
List<myobject>
I use Linq to get a some of the data into a repeater, but I'm not sure how to get the list of Names and how often they show up.
Want to use Linq to avoid having to loop through the data.
As my tags should show, this is an ASP.NET solution using C#.
Some clarification: Lets say I have just three items in my list: Item 1 has John, Fred, Jack in its names. Item 2 has John, Fred, Joe in its names. Item 3 has John in its names.
I am trying to return the following: John - 3 Fred - 2 Jack - 1 Joe - 1
Also, as a note I am familiar with having to write my own comparer for my object, I'm just missing the 'how to' for the overall solution in my thoughts.
This is something I can easily do in SQL, but I'm pretty new to LINQ and haven't been able to find an answer online.
I need a LINQ query that returns two values; the first a distinct value and the second the count of the first value. This is filtered by a parameter. Here is my table:
I have an already created DataTable object which i am using for my girdview (asp.net) i also need to bind a column of that object to a DropDownList. The datatable has the correct details in the column but the column contains more that 1 of the same name in the column - hence I would love to just do some kind of SELECT DISTINCT on the datatable and copy it to a new datatable for use with binding the dropdown.
This would allow me to save resources by making another trip to the database.
Here is an example, the current datatable has a column called items and in this column has the following entries
1 1 1 1 5 5 6
And of course i need only unique items for binding to my dropdown, hence i need the following data
1 5 6
Of course i don't want to change the original datatable object but rather make a copy of it will the new details.
rowid pid gid dis 1 1222 aa dd 2 1222 bb cc 3 1222 cc dd 4 1331 vv cc 5 1331 cc zz 6 1414 zz cc 5 1414 xx zz
I need get distinct pid with rowid together. select * distince pid from tableone However, I get error: select rowid, distinct pid from tableone? Is any way to work out this one?
I have a table 'tbl' and a column 'col'. The elements are like 1,1,2,2,2,3,4,4. Now I want to show two columns one is the one will contain the distinct values from 'col' like 1,2,3,4.... and second will contain the count for each of them like for above case it will be 2,3,1,2.
Now, I want to select all unique locationid's from a single username, its important that the results can be PAGED and SORTED, I now have:
SELECT * FROM (select ROW_NUMBER() OVER (ORDER BY createdate) as RowNum, distinct(locationid), l.* FROM location_views lv INNER JOIN locations l on l.id=lv.locationid where lv.username='myname@hotmail.com' ) as info WHERE RowNum > 0 AND RowNum <= 100
But this throws the error: "Incorrect syntax near the keyword 'distinct'."