2 ways to write code in asp.net

J

Jignesh Desai

There are essentially two ways that you can write code for an ASP.NET
application.

Inline code Style
---------------------------------------------------------------
<html>
<script language="vb" RUNAT="server">
Private Sub Page_Load()
Response.Write("This is Inline ASP.NET Application")
End Sub
</script>
</html>
---------------------------------------------------------------
This type of coding is essentially the same as the old ASP code


Code behiend Style.
(IN HTML PAGE) ".aspx"
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="profile.aspx.vb"
Inherits="LW.profile"%>

(IN CODE BEHIEND PAGE) ".vb"
Public Class profile
Inherits System.Web.UI.Page

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub

End Class


Regards
Jignesh Desai
www.dotnetjini.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top