How to access namespace from custom user controls?

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
 
G

Guest

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
 
U

User

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


Peter Bromberg said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top