Results 1 to 1 of 1

Thread: RESOLVED referring to controls in included pages

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2001
    Posts
    31

    RESOLVED referring to controls in included pages

    Okay I've got default.aspx consisting of the following:

    VB Code:
    1. <script language="vb" runat="server">
    2.     Sub Page_Load()
    3.         Dim strSec as String = Request.QueryString("sec")
    4.         Dim strPage as String = Request.QueryString("page")
    5.        
    6.         Server.Execute("head.inc")
    7.         Server.Execute("tabs.inc")
    8.         Server.Execute(strSec & ".nav.inc")
    9.         Server.Execute(strSec & "." & strPage & ".body.inc")
    10.         Server.Execute("foot.inc")
    11.  
    12.         lblTitle.Text = strPage & "; " & strSec & "; " & "eLaw"
    13.     End Sub
    14. </script>
    lblTitle is a Web Control in the "head.inc" file. I get this error:

    VB Code:
    1. E:\My Documents\!Xaetec\elaw (copied)\app\layout\default.aspx(12) : error BC30451: Name 'lblTitle' is not declared.
    2.  
    3.         lblTitle.Text = strPage & "; " & strSec & "; " & "eLaw"
    4.         ~~~~~~~~
    Does ASP.NET have a problem with using Web Controls from other pages?
    Last edited by Cromicus; Aug 9th, 2002 at 12:47 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width