p_richardson Posted February 25, 2006 Share Posted February 25, 2006 I get this error coming up... and have no idea how to solve this issue... please can anyone offer me any help, advice or ideas how to solve this!!! Server Error in '/' Application.Compilation ErrorDescription: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.Compiler Error Message: BC30289: Statement cannot appear within a method body. End of method assumed.Source Error:Line 5: Sub btnExpertise_Click(sender As Object, e As EventArgs)Line 6: Line 7: Function GetExpertise() As System.Data.SqlClient.SqlDataReaderLine 8: Dim connectionString As String = "server='localhost'; user id='sa'; password='password'; Database='Specialists'"Line 9: Dim sqlConnection As System.Data.SqlClient.SqlConnection = New System.Data.SqlClient.SqlConnection(connectionString) Link to comment Share on other sites More sharing options...
Pollux Posted February 27, 2006 Share Posted February 27, 2006 That sounds like an ASP.Net error rather than ASP. If you don't intend to use .NET then you probably need to re-read the tutorials on ASP. Be aware that ASP and ASP.NET are different technologies and they don't mix too well.If you've just posted in the wrong forum though, then the problem is most likely that you've put <% %> around your functions rather than <script runat="server" language="vb"></script>Or alternatively, if I'm just plain wrong and this is an ASP error, then if you post your code someone might be able to point out where you've gone wrong. Link to comment Share on other sites More sharing options...
aspnetguy Posted February 27, 2006 Share Posted February 27, 2006 That sounds like an ASP.Net error rather than ASP. If you don't intend to use .NET then you probably need to re-read the tutorials on ASP. Be aware that ASP and ASP.NET are different technologies and they don't mix too well.If you've just posted in the wrong forum though, then the problem is most likely that you've put <% %> around your functions rather than <script runat="server" language="vb"></script>Or alternatively, if I'm just plain wrong and this is an ASP error, then if you post your code someone might be able to point out where you've gone wrong.<{POST_SNAPBACK}> No you are right that is a .Net error...and ASP and ASp.Net do not mix AT ALL. They are different languages even though they have similar names. It is like trying to mix PHP and ASP...it just doesn't work. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now