|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
VS .NET doubt
I have gone through some ASP.NET examples from the net, this is one of the example:
<html> <head> <link rel="stylesheet"href="intro.css"> </head> <script language="C#" runat=server> void SubmitBtn_Click(Object sender, EventArgs e) { Message.Text = "Hi " + Name.Text + ", you selected: " + Category.SelectedItem; } </script> <body> <center> <form action="intro6.aspx" method="post" runat="server"> //some UI control here </form> </center> </body> </html> please notice that the C# code above is within the .aspx file, when i try to create a ASP.NET project using Visual Studio.NET, it created two separated files, .aspx and .aspx.cs(which contains the C# codes) ....so this is totally different with the examples above, may i know what is the differences , can someone please explain on this ? thank you |
|
#2
|
||||
|
||||
|
Visual Studio creates what is known as "Code-Behind" pages. These pages actually get compiled into the project .dll for faster running. In the code that you have above the code has to be "Interpreted" and then run.
Using code-behind is must more efficent. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > .NET Development > VS .NET doubt |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|