views:

59

answers:

1

Hopefully someone will be able to point me in the right direction.

I've created a usercontrol in VB that handles paging more efficiently than the DataPager (at least for very large datasets). I'd like to use it in a C# project, but I've been having trouble getting it to work.

I've tried simply adding PagingControl.ascx to the C# project, but when I do that the markup and VB code behind don't seem to see each other. --Is this a namespace issue?

I've tried adding the PagingControl.ascx to its own VB project, then adding that project to the C# project's solution, as well as a reference. --That almost works. I can register the PagingControl usercontrol in the markup. I can access the usercontrol's properties in the code behind, but any property that involves the UI of the usercontrol fails.

Its seems as if the usercontrol's form hasn't had a chance to load by the time the C# page's Page_Load event handler fires. --Maybe this is an "order of operations" problem? At what point in the C# page's lifetime should a usercontrol's form be loaded?

If anyone has any ideas or insight, I'd really appreciate it. Thanks in advance.

+1  A: 

You can't have VB and C# code in one project - you have to split it and reference the VB part in the C# project. To the other question: no idea, as I don't do web dev.

Femaref
So far, that seems to be the case, that VB and C# don't "play well together" when in the same project.
ks78
It is not supported in Visual Studio, yes. in #develop it actually is.
Femaref
Wow. I'll have to check that out. I don't know if it will help with my current problem, but it does sound interesting.
ks78
No, probably not.
Femaref