Author: ryanlcs | Posted on: 12/15/2008 1:30:15 AM | Views : 296

I have an ascx file having a variable which need to pass to as aspx file.

Web.ascx:
<script language="VB" runat="server">
Public hcapiwebsite As String = "testhcap"
</script>
 Login.aspx:

Some code....
 <%@ Register TagPrefix="header" TagName="a" src="../Web.ascx"%>
Response.Write(hcapiwebsite) 
Some code...

When I launched login.aspx, I hit this error....

Name 'hcapiwebsite' is not declared.

 I have no idea how this user controls work...

Please advice.

Thank You.
...

Go to the complete details ...