Jump to content

This Error Appears....


p_richardson

Recommended Posts

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

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

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.

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...