Name is not declared

Discussion in 'ASP .Net Web Controls' started by DC Gringo, Feb 27, 2004.

  1. DC Gringo

    DC Gringo Guest

    I'm getting a BC30451: Name 'pageID' is not declared.

    I have a user control that contains a simple condition to display one row or
    another like:

    <% If x = 1 Then %>
    ....some html...
    <% Else %>
    ....some html...
    <% End If %>

    The control is used to in two different .aspx pages (e.g. first.aspx and
    second.aspx). In each .aspx page, I've tried to set this variable right
    after Private Sub Page_Load in the code-behind page to no avail...such as:

    Public Class WebForm1
    Inherits System.Web.UI.Page
    Web Form Designer Generated Code

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Load
    'Put user code to initialize the page here
    End Sub

    Dim x As Integer = 10000

    End Class

    --
    _____
    DC G
    DC Gringo, Feb 27, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guoqi Zheng

    Name 'DiffGram' is not declared.

    Guoqi Zheng, Jan 12, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    364
    Guoqi Zheng
    Jan 12, 2004
  2. TJS

    "name not declared" but it is

    TJS, Feb 3, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    5,842
    vMike
    Feb 3, 2004
  3. Scott M.
    Replies:
    2
    Views:
    518
    Kevin Spencer
    Feb 5, 2004
  4. DC Gringo

    Name is not declared

    DC Gringo, Feb 27, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    5,835
    Martin Dechev
    Feb 27, 2004
  5. JohnZing

    declared or not declared ?

    JohnZing, Feb 5, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    1,571
    Jon Paal
    Feb 5, 2006
Loading...

Share This Page