2

I have the requirement to try out with converting an existing page in the project to use angularjs/bootstrap. Please correct me if I am wrong in my approach.

My project uses asp webforms, where I am planning to change one aspx page(which has grids, radiotbuttons and other asp controls as well ) to use angularjs controls . What I have understood so far is that we need to have webmethods in the serverside which provide the data for the controls. So what all controls now declared in the serverside is not needed and I need to have the respective html controls in the client side and clientside angularjs calls the webmethod and returns the serialized data to controls in client side.I won't be able to access the server side controls in the webmethod as webmethods are static .

So in short we need to move all the logics that are in the existing aspx.vb for the controls to the client side angularjs code and only thing we can make use of with the aspx.vb is to provide the webmethods to provide data for the controls in client side.

Can someone correct me please ?

1 Answer 1

2

All your controls will need to be built using HTML and not ASP.Net controls.

You are correct in saying you will need to bind your HTML controls to the data you have sent back from the server. With regards to the logic of your form, that can sit in an angular service that your angular controller calls.

This will allow your logic to be encapsulated and be called from any angular controller.

You may use WCF, ASP.Net Web API or any server side technology that will allow http requests to provide/modify your data.

Moving a page at a time from ASP(X) to angular is probably a lot of effort. You would first want to start exposing your business logic via WCF/Web Api first and then move your application to use Angular.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.