Nishant Kumar
Nishant Kumar

Reputation: 6083

why we use code-behind approch in asp.net?

i want to know that why we use code behid approch. if there is some advantage then plese share to me ? as we know that there is two methode for writing server side code for aspx.file

so i wnat to know that is ther any authentic reasion which provide advatage in code-behind approch.

Upvotes: 3

Views: 1212

Answers (2)

Tom Gullen
Tom Gullen

Reputation: 61727

It helps prevent spaghetti code with a mix of markup and code, which is hard to maintain and review.

Upvotes: 0

Sachin Shanbhag
Sachin Shanbhag

Reputation: 55489

You should strive to separate UI layout from UI or business logic. Those who use codebehind benefit from the advantages of compile-time warnings, type safety, and better debugging support.

Check this article - https://web.archive.org/web/1/http://articles.techrepublic%2ecom%2ecom/5100-10878_11-1049844.html

EDITED: this one is helpful too to give information of code-behind pages - http://www.java-samples.com/showtutorial.php?tutorialid=1084

Upvotes: 2

Related Questions