Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: Using Arrays with CORRECT code sample (page 149)


Message #1 by "Darrel Austin" <darrelaustin@h...> on Mon, 22 Jul 2002 18:38:39
Page 149 of the book where it introduces Arrays is based off of the sample 
at the end of Chapter 3 that is completely invalid as it was based on beta 
code.

So, I'm using the corrected samples, but the new array code causes errors 
that I don't understand. Here's the error:

======================

Compiler Error Message: BC30269: Method 'Page_Load' has multiple 
definitions with identical signatures.

Source Error:

 

Line 3:  
Line 4:  <script runat="Server" language="vb">
Line 5:  Sub Page_Load()
Line 6:  
Line 7:  	Dim strArrayDetails(3) as String
 
======================

My code (head) is as follows:

======================

<%@ Page Language="VB" %>
<%@ Reference Page="holidaypage.aspx" %>

<script runat="server" language="vb">
Sub Page_Load()

	Dim strArrayDetails(3) as String
	
	strArrayDetails(0) = Request.Form("FullName")
	strArrayDetails(1) = Request.Form("Address")
	strArrayDetails(2) = Request.Form("Sex")
	strArrayDetails(3) = Request.Form("Destination")
	
	Response.Write ("<br>" + strArrayDetails(0))
	Response.Write ("<br>" + strArrayDetails(1))
	Response.Write ("<br>" + strArrayDetails(2))
	Response.Write ("<br>" + strArrayDetails(3))

End Sub
</script>

<html>
<head>
 	<title = "Holiday Page">
 
   <script runat="server">

      Dim fp As FirstPageClass

      Sub Page_Load() 
         If Not IsPostBack Then
            fp = CType(Context.Handler, FirstPageClass)
         End If 
      End Sub

   </script>

</head> 

======================

Any explanation would be greatly appreciated!

-Darrel

  Return to Index