dadazhu
Aug 19th, 2003, 08:55 PM
Hi, all,
I have learned a lot from IBuySpy and some other sources. I now began to develop mine application. One thing came to my mind is how I should handle my code. I would like to have code-behind vb file following the .aspx page. However, I am not quilt sure which one of following ways is better,
1)IBuySpy,
In .aspx,
<%@ Page Language="vb" CodeBehind="Default.aspx.vb" AutoEventWireup="false" Inherits="IBuySpy.CDefault" %>
In .aspx.vb
Public Class CDefault
Inherits System.Web.UI.Page
Protected WithEvents WelcomeMsg As System.Web.UI.WebControls.Label
#Region " Web Form Designer Generated Code "
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
InitializeComponent()
End Sub
#End Region
And I probably have to do a file like storeVBVS to explain info above? Also, was IBuySpy done by vb.net?
2) Or simply,
In .aspx:
<%@ page inherits="Codebehind1" src="CodeBehind1.vb" %>
In .aspx.vb:
Imports system
Imports System.Data
Public Class CodeBehind1: Inherits Page
'blablablabla
End Class
Any help will appreciated!
D
I have learned a lot from IBuySpy and some other sources. I now began to develop mine application. One thing came to my mind is how I should handle my code. I would like to have code-behind vb file following the .aspx page. However, I am not quilt sure which one of following ways is better,
1)IBuySpy,
In .aspx,
<%@ Page Language="vb" CodeBehind="Default.aspx.vb" AutoEventWireup="false" Inherits="IBuySpy.CDefault" %>
In .aspx.vb
Public Class CDefault
Inherits System.Web.UI.Page
Protected WithEvents WelcomeMsg As System.Web.UI.WebControls.Label
#Region " Web Form Designer Generated Code "
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
InitializeComponent()
End Sub
#End Region
And I probably have to do a file like storeVBVS to explain info above? Also, was IBuySpy done by vb.net?
2) Or simply,
In .aspx:
<%@ page inherits="Codebehind1" src="CodeBehind1.vb" %>
In .aspx.vb:
Imports system
Imports System.Data
Public Class CodeBehind1: Inherits Page
'blablablabla
End Class
Any help will appreciated!
D