Compiler Error Message: BC30518 HELP!!! What does that means

R

ronaldlee

I have an error message with my .NET code
below is the message
Compiler Error Message: BC30518: Overload resolution failed because no
accessible 'Write' can be called with these arguments:


I have an error with this line :
Line 105:
<td><%=Response.Write(generate_county_list("billing_county",
"0", 0))%></td>

Here is the complier output:
C:\MySite\register.aspx(105) : error BC30518: Overload resolution
failed because no accessible 'Write' can be called with these
arguments:
'Public Overridable Sub Write(value As Decimal)': Expression does
not produce a value.
'Public Overridable Sub Write(value As ULong)': Expression does
not produce a value.
'Public Overridable Sub Write(value As UInteger)': Expression does
not produce a value.
'Public Overrides Sub Write(value As Object)': Expression does not
produce a value.
'Public Overrides Sub Write(value As Long)': Expression does not
produce a value.
'Public Overrides Sub Write(value As Integer)': Expression does
not produce a value.
'Public Overrides Sub Write(value As Single)': Expression does not
produce a value.
'Public Overrides Sub Write(value As Double)': Expression does not
produce a value.
'Public Overrides Sub Write(buffer() As Char)': Expression does
not produce a value.
'Public Overrides Sub Write(value As Char)': Expression does not
produce a value.
'Public Overrides Sub Write(value As Boolean)': Expression does
not produce a value.
'Public Overrides Sub Write(s As String)': Expression does not
produce a value.


__w.Write(Response.Write(generate_county_list("billing_county", "0",
0)))




generate_county_list is a function. Below is the function

Function generate_county_list(ByRef name As String, ByRef value As
String, ByRef isDelivery As Byte) As String
' ASP doesn't support associate arrays like Perl and PHP, so need to
use a more messy method
' Created by Stephen Ball

Dim South_West(5) As String
Dim North_West(5) As String
Dim East_Midlands(5) As String
Dim West_Midlands(6) As String
Dim South_Central(6) As String
Dim South_East(6) As String
Dim East_Anglia(6) As String
Dim North_East(5) As String
Dim county As String
Dim data As String

East_Anglia(0) = "Bedfordshire"
East_Anglia(1) = "Cambridgeshire"
East_Anglia(2) = "Essex"
East_Anglia(3) = "Hertfordshire"
East_Anglia(4) = "Norfolk"
East_Anglia(5) = "Suffolk"

East_Midlands(0) = "Derbeyshire"
East_Midlands(1) = "Leicestershire"
East_Midlands(2) = "Lincolnshire"
East_Midlands(3) = "Northamptonshire"
East_Midlands(4) = "Nottinghamshire"

North_East(0) = "Cleveland"
North_East(1) = "Durham"
North_East(2) = "Northumberland"
North_East(3) = "Tyne and Wear"
North_East(4) = "Yorkshire"

West_Midlands(0) = "Herefordshire"
West_Midlands(1) = "Shopshire"
West_Midlands(2) = "Staffordshire"
West_Midlands(3) = "Warickshire"
West_Midlands(4) = "West Midlands"
West_Midlands(5) = "Worcestershire"

North_West(0) = "Cheshire"
North_West(1) = "Cumbria"
North_West(2) = "Greater Manchester"
North_West(3) = "Lancashire"
North_West(4) = "Merseyside"

South_Central(0) = "Berkshire"
South_Central(1) = "Dorset"
South_Central(2) = "Hampshire"
South_Central(3) = "Isle of White"
South_Central(4) = "Oxfordshire"
South_Central(5) = "West Sussex"

South_East(0) = "Buckinghamshire"
South_East(1) = "East Sussex"
South_East(2) = "Greater London"
South_East(3) = "Kent"
South_East(4) = "Middlesex"
South_East(5) = "Surrey"

South_West(0) = "Cornwall"
South_West(1) = "Devon"
South_West(2) = "Gloucestershire"
South_West(3) = "Somerset"
South_West(4) = "Wiltshire"

If isDelivery = 1 Then
data = "<select name=""" & name & """
onchange=""uncheck_billing();"">"
Else
data = "<select name=""" & name & """>"
End If

data = data & "<option value="""">Select a
county:</option>"

' Generate the East Anglia List
data = data & "<optgroup label=""East Anglia"">"
For Each county In East_Anglia
data = data & create_list(county, value)
Next county

' Generate the East Midlands List
data = data & "<optgroup label=""East Midlands"">"
For Each county In East_Midlands
data = data & create_list(county, value)
Next county

' Generate the North East List
data = data & "<optgroup label=""North East"">"
For Each county In North_East
data = data & create_list(county, value)
Next county

' Generate the West Midlands List
data = data & "<optgroup label=""West Midlands"">"
For Each county In West_Midlands
data = data & create_list(county, value)
Next county

' Generate the North West List
data = data & "<optgroup label=""North West"">"
For Each county In North_West
data = data & create_list(county, value)
Next county

' Generate the South Central List
data = data & "<optgroup label=""South Central"">"
For Each county In South_Central
data = data & create_list(county, value)
Next county

' Generate the South East List
data = data & "<optgroup label=""South East"">"
For Each county In South_East
data = data & create_list(county, value)
Next county

' Generate the South West List
data = data & "<optgroup label=""South West"">"
For Each county In South_West
data = data & create_list(county, value)
Next county

data = data & "</select>"
generate_county_list = data

End Function


Anyone knows what's going wrong with my code???
Thanks

Ron

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
 
C

CMA

hi,

just try with this.

<td><% Response.Write(generate_county_list("billing_county",
"0", 0))%></td>

hope this helps.

CMA
 
H

Hans Kesting

ronaldlee said:
yeah it works.....
why it doesn't need =

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*

<%= code() %> means: execute code() and put the (text) output
of that method here.

<% code() %> means: execute code().
As you used Response.Write, that method itself did the "writing to output".

You could also have used:
<td><%= generate_county_list("billing_county", "0", 0)%></td>

Hans Kesting
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top