0

We are plannning to use Ajax in our ASP.net project. However, we still want the member panel of our web site to work in all browsers. We have decided not to use Ajax in some forms where browser independence is must.

I am now confused with whether we should use ASP.NET controls or HTML controls or both?

I have two questions:

  • Are there any problems that I might face using either of approach?
  • Also which one is better considering efficiency and performance?
0

4 Answers 4

2

The Asp.Net Controls including the ajax controls are independent of browsers, asp.net will detect your browser and try to render the best html/javascript for that browser. So you are good with server controls.

1

If you are going to implement the project in asp.net then for all the controls that need to be accessed via code at server side needs to be asp.net controls. Those controls that are static and only displaying some value can be html controls.

The main point is that the asp.net controls are rendered to html controls... so the client who views the web-page actually gets the html controls.

For AJAX refer this

1

ASP controls and HTML controls as complementary.

ASP controls bring facilities for programming like the viewstate (the control keeps its content after a post back), the binding with datatable, and a lot of presentation properties. It is really an advantage in terms of time and maintainability to use these controls. They also manage some security feature like html code injection. ASP controls could be controled and managed from the code behind page.

HTML controls are out of the native ASP.NET page process. It is sometime a good thing to have particular control that you don't want ASP.NET take in charge and modify, but it is not the core of an ASP.NET web application.

1
  • Ok.. But what about ajax? Which 1 will be an better option?
    – Girish k.
    Feb 25, 2010 at 9:46
0

If you can use HTML - it is always better - as it is much faster. The use of ASP controls should work on all browsers as far as I know, but it less efficient. Better create a small example and test it on some browsers before you decide.

(I've used ajax on both explorer and Firefox and it works)

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.