Error Message: BC30451: Name 'Utilities' is not declared.

  • Thread starter Don Quijote de Nicaragua
  • Start date
D

Don Quijote de Nicaragua

Hi, I have a problem trying to load a page, sends me the
following error message:

Error Message: BC30451: Name 'Utilities' is not declared.
Line 50: </ DIV>
Line 51: <div id="side">
Line 52: <% = Utilities.createNavBar ()%>
Line 53: </ DIV>
Line 54: <div id="main">

I have already imported the class within the page as follows
<% @ Page Language = "VB" AutoEventWireup = "false"
CodeFile = "Default.aspx.vb" inherits = "maim"%>
<% @ Import namespace = "Utilities"%>

They also put directly into the class
Imports Utilities

But I still sending the same message, any suggestions.
Thanks You.
Don Quixote of Nicaragua.
Elder Soto
 
G

Guest

Hi, I have a problem trying to load a page, sends me the
following error message:

Error Message: BC30451: Name 'Utilities' is not declared.
Line 50: </ DIV>
Line 51: <div id="side">
Line 52: <% = Utilities.createNavBar ()%>
Line 53: </ DIV>
Line 54: <div id="main">

I have already imported the class within the page as follows
<% @ Page Language = "VB" AutoEventWireup = "false"
CodeFile = "Default.aspx.vb" inherits = "maim"%>
<% @ Import namespace = "Utilities"%>

They also put directly into the class
Imports Utilities

But I still sending the same message, any suggestions.
Thanks You.
Don Quixote of Nicaragua.
Elder Soto

Do you have the appropriate DLL in the BIN folder?
 
D

Don Quijote de Nicaragua

Hi, I continue to get the same errror, I am following the steps:
If anyone has any comment ?.


1. add the reference
<%@ import namespace="Utilities"%>

2. Create Literal Control
<div id="side">
<asp:Literal ID="Literal1" runat="server"></asp:Literal>
</div>

3. Load the Control
Imports Utilities
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Literal1.Text = Utilities.createNavBar
End Sub
End Class

4. Appear error:
Compiler Error Message: BC30451: Name 'Utilities' is not declared.
Source Error:
Line 4:
Line 5: Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Line 6: Literal1.Text = Utilities.createNavBar
Line 7: End Sub
Line 8: End Class

Thank You.
Don Quijote de Nicaragua.
Elder Soto.

My Complete Class:

Imports Microsoft.VisualBasic
Public Class Utilities
Private Shared nl As String = Environment.NewLine
Public Shared Function createNavBar() As String
Dim sHtml As String
sHtml = "<ul>" & nl
sHtml &= "<li class='tmli'>Men&uacute Principal</li>" & nl
sHtml &= "<li><a href='maim.aspx' style='color:Black'>Inicio</a></li>"
& nl
sHtml &= "<li class='tmli'>Atenci&oacute;n al Cliente</li>" & nl
sHtml &= "<li><a href='lstQrc.aspx' style='color:Black'>Lista Quejas/
Reclamos</a></li>" & nl
sHtml &= "<li><a href='lstRemisiones.aspx'
style='color:Black'>Remisiones</a></li>" & nl
sHtml &= "<li class='tmli'>Cat&oacute;logos</li>" & nl
sHtml &= "<li><a href='lstClientes.aspx' style='color:Black'>Clientes</
a></li>" & nl
sHtml &= "<li><a href='lstCatalogs.aspx?bAction=1'
style='color:Black'>Transporte</a></li>" & nl
sHtml &= "<li><a href='lstCatalogs.aspx?bAction=2'
style='color:Black'>Productos</a></li>" & nl
sHtml &= "<li><a href='lstCatalogs.aspx?bAction=3'
style='color:Black'>Quejas</a></li>" & nl
sHtml &= "<li><a href='lstPaises.aspx?bAction=4'
style='color:Black'>Pa&iacute;ses</a></li>" & nl
sHtml &= "<li><a href='lstAreas.aspx?bAction=5'
style='color:Black'>Areas</a></li>" & nl
sHtml &= "<li class='tmli'>Informes</li>" & nl
sHtml &= "<li><a href='rptCatalogosIU.aspx'
style='color:Black'>Cat&aacute;logos</a></li>" & nl
sHtml &= "<li><a href='rptRemisionesIU.aspx'
style='color:Black'>Remisiones</a></li>" & nl
sHtml &= "<li><a href='rptQrcIU.aspx' style='color:Black'>Quejas/
Reclamos</a></li>" & nl
sHtml &= "</ul>" & nl
Return (sHtml)
End Function
End Class
 
D

Don Quijote de Nicaragua

Yes is the name of the class, how i can declare my namespace in my
class utilities
Thank You.
Don Quijote de Nicaragua.
Elder Soto.
 

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,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top