RESOLVED referring to controls in included pages
Okay I've got default.aspx consisting of the following:
VB Code:
<script language="vb" runat="server">
Sub Page_Load()
Dim strSec as String = Request.QueryString("sec")
Dim strPage as String = Request.QueryString("page")
Server.Execute("head.inc")
Server.Execute("tabs.inc")
Server.Execute(strSec & ".nav.inc")
Server.Execute(strSec & "." & strPage & ".body.inc")
Server.Execute("foot.inc")
lblTitle.Text = strPage & "; " & strSec & "; " & "eLaw"
End Sub
</script>
lblTitle is a Web Control in the "head.inc" file. I get this error:
VB Code:
E:\My Documents\!Xaetec\elaw (copied)\app\layout\default.aspx(12) : error BC30451: Name 'lblTitle' is not declared.
lblTitle.Text = strPage & "; " & strSec & "; " & "eLaw"
~~~~~~~~
Does ASP.NET have a problem with using Web Controls from other pages?