can we create angular js application using Simple aspx - c#

Can we create a Angular Js application in ASPX web forms using three tier architecture (Database Layer,Business Layer)?

Yes you can in simple Aspx using Web APi or Web Service...
You have to create a new .aspx page (with masterpage if you want) and follow the same approach of a classic Web Form Application (obviously without postback)
include WebAPI for managing the ajax requests or use httphandler with json response format or a WCF service ecc. I don't know your needs...

Related

Asp.net web api services

What is the big difference between normal asp.net mvc and asp.net web api ? When i know i can use a normal action result to return a Json data and call it with javascript or an ajax onsuccess function or even with jquery GetJson() function.
Asp.Net MVC is used to create web applications that returns both views and data but Asp.Net Web API is used to create full blown HTTP services with easy and simple way that returns only data not view.
ASP.NET Web API vs. ASP.NET MVC “APIs”
Here is similar post ASP.NET WebApi vs MVC.
The answer is not accepted one, but the other one.
Or check this or this.

How to use WebApi in visual studio

I'm developing a project that based on database columns selection, will present those columns as charts in a browser web page.
i have been reading about WebApi (i've been told to use it with a windows form project) and for my problem i can't figure out which is the better (easy) aprouch.
The charts are created with javascript and in with the windows form i collect the database connection values (server, username,...) and the columns that will be selected for the charts.
My questions are:
do i call the webapi from javascript sending the column name and receving the values to use?
if so how can i send the column name from my windows form to javascript?
do i call it from my windows form and do all the work in the webapi and present it using the cshtml files that the webapi has?
if so how can i call the webapi from my windows form (present the cshtml file)?
how to send the data i need (columns names) to it? (i've seen also HttpClient)
Your web service (implemented by a Web API project) will return the data (e.g. comma-separated, JSON, or XML) to your local app (a web service per definition has no UI, otherwise it would be a website app). What your local app then does with the retrieved data, is a completely other thing.
And yes, it's of course possible to call a web service from JS. A web service URL is just a normal URL and can be handled like any other one. Google is your friend on that - you may use jQuery, it has some convenient shortcuts for this task.

Accessing a page in a child web application via URL from the main web site

We have a main classic ASP web site "www.main.com".
We have a ASP.NET MVC3 web application that is accessed via "www.main.com/app".
Is it possible to create a page in the web application and have it accessed via "www.main.com/page-from-app"?
It would also be ideal if the main web site doesn't need to be changed, or have minimal changes at most.
Have you tried URL Rewrite?

Asp.net c# web application on phonegap

i'm developing a web application using asp.net and c#, this application must be available on almost wp7.5 and android. I wanted to use phonegap to solve this problem but how can i use .aspx pages on it? It only supports HTML pages, not server side pages.
You can't.
PhoneGap allows you to use client side web technologies (HTML, Javascript & CSS) to build a native app.
It won't, and isn't designed to, work with server side technologies
You can only access aspx pages via html requests (get, post, ajax) on html and parse and show data that comes from aspx page.

How to upload text to an ASP.NET MVC 2 Action from a Windows Application

I'm new to asp.net mvc and web development in general and would like to know the best way to pass text from a windows application written in c# to a asp.net mvc website so it can be stored in a database. Is it possible to call a controller action (via a url similar to REST) from the Windows application or do I need to create a web service? If someone can point me to a verbose example that would be great.
Thanks
You can use the WebClient class. Look here for a simple sample.
Hope this helps.
Why do you want to pass it to your MVC site to store in the database? How are you interacting with your database in the MVC site?
If you have two different applications that need to access the data you should put it in a separate layer and may be create a WCF service or a Web Service.

Categories