2 Class for One ASP Page

E

ElanKathir

Hi All !

Here by attached two type's of Code,


One -> ASP Controls Tag Code

Another -> Server side Script of the page.

The Server Side Script have Two Class


-----------------------------Server Side
Script----------------------------------------------------------------------
-------------------------------------------------------------

' 1st Class

Public Class Sample2

Inherits System.Web.UI.Page

Protected WithEvents TextBox1 As System.Web.UI.WebControls.TextBox

Protected WithEvents LinkButton1 As System.Web.UI.WebControls.LinkButton

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.

<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

End Sub

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init

'CODEGEN: This method call is required by the Web Form Designer

'Do not modify it using the code editor.

InitializeComponent()

End Sub

#End Region

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

'2nd Class with Different Name

Public Class Sample1

Inherits System.Web.UI.Page

Protected WithEvents TextBox1 As System.Web.UI.WebControls.TextBox

Protected WithEvents LinkButton1 As System.Web.UI.WebControls.LinkButton

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

End Sub

Private Sub InitializeComponent()

End Sub

End Class



-------------------------ASP------------------------------------------------
------------------

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm2.aspx.vb"
Inherits="Elan_Sample.Sample1"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>

<HEAD>

<title>WebForm2</title>

<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">

<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">

<meta name="vs_defaultClientScript" content="JavaScript">

<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">

</HEAD>

<body MS_POSITIONING="GridLayout">

<form id="Form1" method="post" runat="server">

<asp:TextBox id="TextBox1" style="Z-INDEX: 101; LEFT: 88px; POSITION:
absolute; TOP: 134px" runat="server"></asp:TextBox>

<asp:LinkButton id="LinkButton1" style="Z-INDEX: 102; LEFT: 275px; POSITION:
absolute; TOP: 137px" runat="server">LinkButton</asp:LinkButton>

</form>

</body>

</HTML>

----------------------------------------------------------------------------
-------------

What is the OutPut of this ?

Sample2,Sample1 are two Classes, How the System handle this issues.........
????



Thanks and Regards,

Elankathir
 

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,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top