Asp:Textbox vs input text (a PHP Developer learning ASP)

后端 未结 3 1306
刺人心
刺人心 2021-02-19 01:59

I’ve been a PHP developer for 10 years, trying to broaden my horizon I am doing a project in ASP.NET. What is the advantage to using an over usi

3条回答
  •  半阙折子戏
    2021-02-19 03:00

    is a serveriside control wihich eventually gets converted to as page gets rendered to html.Similar to you will see that there are other controls which will get converted to standard HTML elements.

    
    

    Is a serverside control so that you can access it in codebehind using its ID hence you can even perform .visible = true or false actions in code behind .

    These might help

    ASP.NET Server Controls
    Advantages:

    1. ASP .NET Server Controls can however detect the target browser's capabilities and render themselves accordingly. No issues for compatibility issues of Browsers i.e page that might be used by both HTML 3.2 and HTML 4.0 browsers code to be written by you.
    2. Newer set of controls that can be used in the same manner as any HTMl control like Calender controls. (No need of Activex Control for doing this which would then bring up issues of Browser compatibility).
    3. Processing would be done at the server side. In built functionality to check for few values(with Validation controls) so no need to choose between scripting language which would be incompatible with few browsers.
    4. ASP .NET Server Controls have an object model different from the traditional HTML and even provide a set of properties and methods that can change the outlook and behavior of the controls.
    5. ASP .NET Server Controls have higher level of abstraction. An output of an ASP .NET server control can be the result of many HTML tags that combine together to produce that control and its events.

    Disadvantages:

    1. The control of the code is inbuilt with the web server controls so you have no much of direct control on these controls
    2. Migration of ASP to any ASP.NET application is difficult. Its equivalent to rewriting your new application

提交回复
热议问题