Click here to Skip to main content
15,891,607 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionMove items between 2 asp listbox with SQL Data Source and double click event Pin
Member 775837529-Jan-14 5:16
Member 775837529-Jan-14 5:16 
AnswerRe: Move items between 2 asp listbox with SQL Data Source and double click event Pin
Kornfeld Eliyahu Peter29-Jan-14 6:19
professionalKornfeld Eliyahu Peter29-Jan-14 6:19 
AnswerRe: Move items between 2 asp listbox with SQL Data Source and double click event Pin
Prasad Vj2-Feb-14 1:47
professionalPrasad Vj2-Feb-14 1:47 
Questionuser role - web api Pin
miss78629-Jan-14 5:03
miss78629-Jan-14 5:03 
AnswerRe: user role - web api Pin
Deflinek30-Jan-14 0:24
Deflinek30-Jan-14 0:24 
GeneralRe: user role - web api Pin
miss78630-Jan-14 0:43
miss78630-Jan-14 0:43 
GeneralRe: user role - web api Pin
Deflinek30-Jan-14 2:27
Deflinek30-Jan-14 2:27 
GeneralRe: user role - web api Pin
miss78631-Jan-14 0:28
miss78631-Jan-14 0:28 
I am writing to seek help, as I am experiencing - No overload for method 'Get' takes 0 arguments error, on the "return result.Get();" line of user controller class.

C#
public class UserController : ApiController
    {
        public HttpResponseMessage Get([FromUri] Query query)
        {
         if (User.IsInRole("admin"))
          {
               var result = new ValuesController();
               return result.Get();
           }
     
        }
   }


public class ValuesController : ApiController
    {
       private cdwEntities db = new cdwEntities();

       public HttpResponseMessage Get([FromUri] Query query)
       {
           var data = db.database.AsQueryable();

           if (query.name != null)
           {
               data = data.Where(c => c.Name == query.name);
           }

           if (query.price != null)
           {
               data = data.Where(c => c.Price == query.price);
           }

          
           if (!data.Any())
           {
               var message = string.Format("error");
               return Request.CreateErrorResponse(HttpStatusCode.NotFound, message);
           }

           return Request.CreateResponse(HttpStatusCode.OK, data);
       }
       
    }


Any advice would be very much appreciated. Many thanks.
GeneralRe: user role - web api Pin
Deflinek31-Jan-14 2:19
Deflinek31-Jan-14 2:19 
QuestionIs it good to use Windows Service to schedule any operation on server side in ASP.Net MVC Pin
H.A.Baig28-Jan-14 18:53
H.A.Baig28-Jan-14 18:53 
AnswerRe: Is it good to use Windows Service to schedule any operation on server side in ASP.Net MVC Pin
Deflinek29-Jan-14 0:07
Deflinek29-Jan-14 0:07 
GeneralRe: Is it good to use Windows Service to schedule any operation on server side in ASP.Net MVC Pin
H.A.Baig29-Jan-14 1:39
H.A.Baig29-Jan-14 1:39 
GeneralRe: Is it good to use Windows Service to schedule any operation on server side in ASP.Net MVC Pin
Deflinek29-Jan-14 2:06
Deflinek29-Jan-14 2:06 
GeneralRe: Is it good to use Windows Service to schedule any operation on server side in ASP.Net MVC Pin
H.A.Baig29-Jan-14 7:22
H.A.Baig29-Jan-14 7:22 
QuestionHow does IIS handle http requests from different web clients to access the same web application? Pin
Ashok Natarajan27-Jan-14 22:41
professionalAshok Natarajan27-Jan-14 22:41 
SuggestionRe: How does IIS handle http requests from different web clients to access the same web application? Pin
Shameel27-Jan-14 22:46
professionalShameel27-Jan-14 22:46 
AnswerRe: How does IIS handle http requests from different web clients to access the same web application? Pin
londhess27-Jan-14 22:57
londhess27-Jan-14 22:57 
QuestionCan someone help me with HTML Editor Control Pin
Member 1025895227-Jan-14 20:21
Member 1025895227-Jan-14 20:21 
QuestionGetting latest files from TFS error Pin
vkEE27-Jan-14 5:29
vkEE27-Jan-14 5:29 
AnswerRe: Getting latest files from TFS error Pin
vkEE27-Jan-14 7:21
vkEE27-Jan-14 7:21 
AnswerPlease help me for online compiler for "c" language? Pin
prince_crazy26-Jan-14 4:21
prince_crazy26-Jan-14 4:21 
AnswerRe: Please help me for online compiler for "c" language? Pin
Kornfeld Eliyahu Peter26-Jan-14 5:02
professionalKornfeld Eliyahu Peter26-Jan-14 5:02 
GeneralMessage Closed Pin
26-Jan-14 7:38
prince_crazy26-Jan-14 7:38 
AnswerRe: Please help me for online compiler for "c" language? Pin
Kornfeld Eliyahu Peter26-Jan-14 7:48
professionalKornfeld Eliyahu Peter26-Jan-14 7:48 
GeneralRe: Please help me for online compiler for "c" language? Pin
thatraja26-Jan-14 22:51
professionalthatraja26-Jan-14 22:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.