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ú Principal</li>" & nl
sHtml &= "<li><a href='maim.aspx' style='color:Black'>Inicio</a></li>"
& nl
sHtml &= "<li class='tmli'>Atenció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ó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í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á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
On 29 ago, 15:37, Alexey Smirnov <alexey.smir...@gmail.comwrote:
On Aug 29, 7:34 pm,DonQuijotede Nicaragua <elders...@gmail.com>
wrote:
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.
DonQuixote of Nicaragua.
Elder Soto
Do you have the appropriate DLL in the BIN folder?