473,387 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

ASP.NET: BC30289: Statement cannot appear within a method body. End of method assumed.

In converting a page from ASP to ASPX, I am getting the error:
BC30289: Statement cannot appear within a method body. End of method
assumed.

when running the code below. It has something to do with the:

sub DrawComponents(components)

line in the code. What can I do to fix this.
<%
Dim compList
compList = "<OPTION value='airframe'>Airframe - " &
o_aircraft.serial & "</OPTION>"
%>

<table style="display:none;" ALIGN="center" BORDER="0" CELLSPACING="0"
CELLPADDING="0" bgcolor="lightblue">
<%

'Set cmdCalc = Nothing
'Set paramCalc = Nothing

Dim compType, compPosition

DrawComponents (o_aircraft.getEngines())
Response.Write ("</TABLE></TD></TR>")
DrawComponents (o_aircraft.getPropellers())
Response.Write ("</TABLE></TD></TR>")
%>
<%

'****************************CODE BREAKS HERE!!!
sub DrawComponents(components)
dim comp, logbook, compPosition, compCount
compCount = components.count
for each comp in components
If logbook <> comp.logbook Then
If len(logbook) Then Response.Write
("</TABLE></TD></TR>")
logbook = comp.logbook
compPosition = comp.Position
%>
<tr onclick="toggleItem(tr<%=logbook%>,
<%=compCount%>);" class="compHeader">

<td width="100"
align="middle"><%=logbook%></td>
<td width="100"
align="middle"><b>Make</b></td>
<td width="150"
align="middle"><b>Model</b></td>
<td width="150"
align="middle"><b>Serial #</b></td>
<td width="50"
align="middle"><b>TSN</b></td>
<td width="50"
align="middle"><b>CSN</b></td>
<td width="100"
align="middle"><b>TSO/TS Core</b></td>
<td width="100"
align="middle"><b>CSO/CS Core</b></td>
<td width="100">&nbsp;</td>
</tr>
<tr>
<td colspan="9"><table width="100%"
id="tr<%=logbook%>" style="display:none">
<% End If %>

<tr bgcolor="lightblue">

<td width="100" align="center"><%=
comp.logbook & " " & comp.Position%></td>
<td width="100" align="center"><%=
comp.Make%></td>
<td width="150" align="center"><%=
comp.Model%></td>
<td width="150" align="center"><%=
comp.SerialNumber %></td>
<td width="50" align="right"><%=
comp.CurrentHours%></td>
<td width="50" align="right"><%=
comp.CurrentCycles%></td>
<td width="100" align="right"><%=
comp.TimeSinceOverhaul%></td>
<td width="100" align="right"><%=
comp.CyclesSinceOverhaul%></td>
<td width="100">&nbsp;</td>
</tr>
<%
compList = compList & "<OPTION value='" &
comp.componentID & "'>" & comp.logbook & " " & _
comp.Position & " - " & comp.SerialNumber &
"</OPTION>"

next
end sub
'************************************************* ************************************************** ****
%>
</td></tr>
</table>
</table>

</body>
</html>

<%

' myConn.Close
%>
Nov 18 '05 #1
0 3638

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Saga | last post by:
Hi all, I just read the thread by the same name posted on Jun 15, 9:45 AM, but I am looking at it from a different point of view. I came across this question in terms of functionality. Are VB and...
4
by: Marcel Balcarek | last post by:
I am converting an ASP page to ASP .NET. The original has the following: #INCLUDE FILE="logAction.asp" The included file holds some commonly used methods. When I rename it to aspx files and...
5
by: Marcel Balcarek | last post by:
I am converting an ASP page to ASP .NET (not a rewrite). I have renamed my ASP page to ASPX, but have one remaining issue. My ASP has some functions after the mainline code, but when I run the code...
1
by: jason | last post by:
i'm working on a gradual conversion of an ASP classic web site to ASP.NET. a recent body of work involves adding a new asp page to the existing site. i thought this would be a good opportunity to...
4
by: jason | last post by:
i'm working on a gradual conversion of an ASP classic web site to ASP.NET. a recent body of work involves adding a new asp page to the existing site. i thought this would be a good opportunity to...
4
by: Dica | last post by:
i apologize for what is no doubt a very rudimentary question, but i'm still trying to wrap my brain around .net coding habits. in classic asp, if i wanted to show search results, i'd just post the...
13
by: eman1000 | last post by:
I was recently looking at the prototype library (http://prototype.conio.net/) and I noticed the author used the following syntax: Object.extend(MyObj.prototype, { my_meth1: function(){},...
0
by: shamirza | last post by:
· When was .NET announced? Bill Gates delivered a keynote at Forum 2000, held June 22, 2000, outlining the .NET 'vision'. The July 2000 PDC had a number of sessions on .NET technology, and...
0
by: shamirza | last post by:
· What is view state and use of it? The current property settings of an ASP.NET page and those of any ASP.NET server controls contained within the page. ASP.NET can detect when a form is requested...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.