Click here to Skip to main content
15,850,685 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: How to run jquery in visual studio 2008 asp.net web application project Pin
Richard Deeming13-Jun-17 6:04
mveRichard Deeming13-Jun-17 6:04 
GeneralRe: How to run jquery in visual studio 2008 asp.net web application project Pin
HedwigO13-Jun-17 6:22
HedwigO13-Jun-17 6:22 
GeneralRe: How to run jquery in visual studio 2008 asp.net web application project Pin
Richard Deeming13-Jun-17 6:27
mveRichard Deeming13-Jun-17 6:27 
QuestionWebAPI: When to use multiple endpoint or multiple route for single action Pin
Mou_kol8-Jun-17 23:54
Mou_kol8-Jun-17 23:54 
AnswerRe: WebAPI: When to use multiple endpoint or multiple route for single action Pin
Richard MacCutchan9-Jun-17 1:24
mveRichard MacCutchan9-Jun-17 1:24 
AnswerRe: WebAPI: When to use multiple endpoint or multiple route for single action Pin
F-ES Sitecore9-Jun-17 4:58
professionalF-ES Sitecore9-Jun-17 4:58 
GeneralRe: WebAPI: When to use multiple endpoint or multiple route for single action Pin
Mou_kol12-Jun-17 4:42
Mou_kol12-Jun-17 4:42 
QuestionWeb API: different way of attribute routing Pin
Mou_kol8-Jun-17 6:05
Mou_kol8-Jun-17 6:05 
i am learning web api. just gone through few article and found attribute routing can be done different way. i visited these articles

https://www.codeproject.com/Articles/774807/Attribute-Routing-in-ASP-NET-MVC-WebAPI http://www.c-sharpcorner.com/UploadFile/b1df45/web-api-route-and-route-prefix-part-2/ https://www.codeproject.com/Articles/999691/RESTful-Day-sharp-Custom-URL-Re-Writing-Routing-us
C#
[RoutePrefix("Movie")]
public class HomeController : Controller
{
      //Route: Movie/Index
      [Route]
      public ActionResult Index()
      {
           ViewBag.Message = "You are in Home Index";
           return View();
      }

      //Route: NewRoute/About
       [Route("~/NewRoute/About")]
       public ActionResult About()
       {
           ViewBag.Message = "You successfully reached NEWRoute/About route";
           return View();
       }
}


in above example the author use Route attribute to define route for action.

see this one again
C#
[GET("productid/{id?}")]
public HttpResponseMessage Get(int id)
{
    var product = _productServices.GetProductById(id);
    if (product != null)
        return Request.CreateResponse(HttpStatusCode.OK, product);
    return Request.CreateErrorResponse(HttpStatusCode.NotFound, "No product found for this id");
}


here author do not use route attribute rather use http verbs to define route.

so tell me which approach is right ?

another question that by attribute routine we can give different name to action then when one should use action name attribute to give different name to action?

when we can change action name by attribute routing then why should one use action name attribute to give different name to action?

please clarify my two points. thanks
Questionuser control Pin
caradri8-Jun-17 4:01
caradri8-Jun-17 4:01 
QuestionQuestion regarding asp.net web forms Pin
Member 132480908-Jun-17 2:52
Member 132480908-Jun-17 2:52 
AnswerRe: Question regarding asp.net web forms Pin
Afzaal Ahmad Zeeshan8-Jun-17 6:38
professionalAfzaal Ahmad Zeeshan8-Jun-17 6:38 
GeneralRe: Question regarding asp.net web forms Pin
ZurdoDev8-Jun-17 6:43
professionalZurdoDev8-Jun-17 6:43 
GeneralRe: Question regarding asp.net web forms Pin
Afzaal Ahmad Zeeshan8-Jun-17 6:49
professionalAfzaal Ahmad Zeeshan8-Jun-17 6:49 
GeneralRe: Question regarding asp.net web forms Pin
ZurdoDev8-Jun-17 6:53
professionalZurdoDev8-Jun-17 6:53 
GeneralRe: Question regarding asp.net web forms Pin
Member 1324809013-Jun-17 2:13
Member 1324809013-Jun-17 2:13 
QuestionObjectDataSource Pin
pollilop7-Jun-17 6:10
pollilop7-Jun-17 6:10 
AnswerRe: ObjectDataSource Pin
Richard Deeming7-Jun-17 7:12
mveRichard Deeming7-Jun-17 7:12 
GeneralRe: ObjectDataSource Pin
pollilop11-Jun-17 23:35
pollilop11-Jun-17 23:35 
SuggestionRe: ObjectDataSource Pin
Yoqueuris13-Jun-17 6:04
Yoqueuris13-Jun-17 6:04 
Questioni have writen c# code to render google map from server side at runtime. but when i execute this code, map is not getting displayed on browser. can any one please tell me what is a error or what changes i need to do. Pin
Member 107737173-Jun-17 21:32
Member 107737173-Jun-17 21:32 
AnswerRe: i have writen c# code to render google map from server side at runtime. but when i execute this code, map is not getting displayed on browser. can any one please tell me what is a error or what changes i need to do. Pin
Richard Deeming5-Jun-17 9:37
mveRichard Deeming5-Jun-17 9:37 
QuestionUsing Base Model in Shared View Pin
Farhad Eft3-Jun-17 0:16
Farhad Eft3-Jun-17 0:16 
AnswerRe: Using Base Model in Shared View Pin
User 41802543-Jun-17 4:40
User 41802543-Jun-17 4:40 
GeneralRe: Using Base Model in Shared View Pin
Farhad Eft3-Jun-17 6:39
Farhad Eft3-Jun-17 6:39 
QuestionHow codeproject registration page showing client timezone as selected in dropdown Pin
Mou_kol2-Jun-17 1:07
Mou_kol2-Jun-17 1:07 

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.