Last post Dec 25, 2013 01:50 PM by kashyapa
Dec 23, 2013 04:33 AM|bakku pavan kumar|LINK
i am doing a project using the following approach :
so that we can display registred successfully messages.
This is how i followed in my entire project.
If this is regular ASP.NET, We just only one page Register.aspx, and we write database operations in submit button.
Finally, my doubt is that: 1. CAN I CALL THIS APPROACH AS API ?
2. CAN I REPLACE THIS APPROACH WITH ASP.NET WEB API ? If yes tell me how? (*******)
3. How does ASP.NET WEB API and THIS APPROACH DIFFERS ?
Please reply as fast as possible ! I really need this !!!!!!!!!!!!!!!!!!
Thanking you !.............
Dec 25, 2013 01:50 PM|kashyapa|LINK
The scenario you have done cannot be called as API ... what you have is a 2 web pages ... as soon as you have your files with extenion such as .ASPX its a web page no matter what you consider them. For a ASp.NET PIPE LINE .ASPX means a web page and it needs
to generate HTML output for that page and send it out to the client.
An API is something anybody can use ... its like a gateway to your functionalities which others can reuse.
Yes - web api can reuse whatever you are looking for. You can have web api endpoints which do the login and register action. Lets say you have a web api controller by name authentication - you can have a login end point on that and the web api end pont will
be something like - http://server/api/authentication/login or for registering it can be like
http://server/api/authentication/register ... you can pass your data as a JSON objects to these actions and they will respond back with either XML or JSON depending on what accept headers you as a client
send to them. Web API is completely HTTP based and any client on this world which understands HTTP can comunicate with this API. Thats not the case with your .ASPX scenario....