How to access namespace from custom user controls?

  • Thread starter Thread starter User
  • Start date Start date
U

User

Hi,

I have a custom user control. How do I write the script in a way which i can
import custom namespace within the custom control? Please advise..

Thanks!

mycontrl.ascx

<script language=vb runat=server>
Mylibrary.mysub()
</script>

Hello world
 
User,
An ASCX UserControl is not a "Custom Control". Custom Control is a new name
for Server Controls which do not have any "Page" like component such as .ASCX
files.

Perhaps you could be a little more clear about exactly what you want to do
here?
Your ASCX User Control will need to have a reference to the namespace where
MyLibrary.MySub resides.

Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
bogMetaFinder: http://www.blogmetafinder.com
 
Thanks Peter,

I guess it's called a User Control?

<%@ Import Namespace="Functions1" %>
<%@ Assembly Src="Functions1.vb" %>
<script language="VB" runat="server">



MyLib.CheckLogin() ' This line hit errors

</script>

Hello World



But i will hit with a

Compiler Error Message: BC30188: Declaration expected.



CheckLogin() resides in Functions1 namespace.



Please advise.



Thanks
 
Back
Top