Can a WebUserControl use functions from host file?

M

Mike Levin

Hello Group,



I'm using VisualStudio.NET and put a DataGrid into a WebUserControl (an ascx
file). For the DataGrid element, I have set AllowSorting="True" and
OnSortCommand="Grid_Sort".



The functions that Grid_Sort rely upon are in the Code-Behind file of the
host file (index.aspx.vb). But the task-list reports "Name 'FunctionName' is
not declared." when I try to refer to them.



So, my question is: is it possible to put an Event Handler for a DataGrid in
a WebUserControl ascx.vb Code-behind file, while putting the support
functions that the Event Handler needs in the host aspx.vb Code-behind file?
How would I get the two to share functions?



I've been able to achieve communication between a WebUserControl and the
host file through Properties and Methods, but I have not been able to make
common functions such as you could with old asp include files. Any ideas?



Mike Levin
 

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

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top