Sorry for such a mundane issue; I'm trying to migrate an existing page from ASP classic to ASP.NET. (Using your MSDN article, Scott!) I'm hitting all the predictable hiccups, but here's one I hadn't anticipated. On my first subroutine declaration, I'm getting the following compile error:<BR><BR>BC30289: This statement cannot appear within a method body. The compiler will assume an intent to terminate the method body.<BR><BR>The statement in question is a simple Sub declaration:<BR><BR>Sub SetPersFailureDefaults()<BR><BR>followed by normal code activities, and concluded with an End Sub. The statements immediately preceding this statement are variable declarations like Dim a, b, c as integer...<BR><BR>I can stick this sub declaration into otherwise working code, and it bombs with the same error, so I'm obviously missing something in the new syntax? (I've looked at a lot of the available resources, and haven't seen anything to suggest a problem here.) Any and all guidance welcomed and appreciated.<BR><BR>Please could you post the entire code for your Sub so we can take a look at it.<BR><BR>Thanks<BR>GregSure, glad to; thanks for taking the moment to look. Here's the whole thing, reduced down to the bare minimum to make it blow up; if I comment out the Sub and End Sub lines, it compiles. (Side note -- is the proper syntax aspcompat="True" or aspcompat=true for the @Page directive?)<BR><BR><% @Page Language="VB" Explicit="True" aspcompat=true %><BR><BR><html><BR><head><BR><%<BR>Dim tuPhone, tuMail as String<BR><BR>Sub SetPersFailureDefaults()<BR> tuPhone = "No Phone"<BR> tuMail = "No Mail"<BR>End Sub<BR>%><BR><TITLE>My Page</TITLE><BR></HEAD><BR><BODY LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 BACKGROUND="background.gif"> <BR></body><BR></html>Okay, here's my version of code... think your main problem was that you have to declare ASP.NET subroutines and functions in <script> tags...<BR><BR>PS : aspcompat=true is the correct syntax for the page directive.<BR><BR><BR><% @Page Language="VB" Explicit="True" aspcompat=true %><BR><BR><script language = "vb" runat = "server"><BR><BR>Dim tuPhone, tuMail as String<BR><BR>Sub SetPersFailureDefaults()<BR>tuPhone = "No Phone"<BR>tuMail = "No Mail"<BR>End Sub<BR></script><BR><BR><html><BR><head><BR><TITLE>My Page</TITLE><BR></HEAD><BR><BODY LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 BACKGROUND="background.gif"> <BR></body><BR></html>Doh! Thanks for that important tip! I haven't seen it anywhere, including here on 4guys; is there a good summary of ALL the major changes between VB.NET and VBScript for us poor ASP dinosaurs? I've looked at the ASP+ material here, and it had many comparisons, including the better known changes like all sub and function calls needing to be in parens, etc., but this one slipped by me if it was in there.<BR><BR>Thanks so much for your help. I'm eagerly awaiting my copy of O'Reilly's ASP.NET -- any other book recommendations in this area?Yeah,<BR><BR>Im going through Professional ASP.NET by Wrox. Definately aimed at those who already have experience in classic ASP. This book has a wealth of info and has taught me many things.<BR><BR>My best advice to you is to download the SDK as well (130 mb) this contains all ASP.NET classes and all their members, ie if you want to know whats possible with a text box, then just look at the textbox class etc. Also when going through your book, type out all the code always, this is importants as it makes you familiar with the syntax and puts little things in youur head. I have done many examples over and over again, I am now proficient in writing ASP.NET pages from scratch.<BR><BR>Good luck<BR>