Stumped by VS2005

  • Thread starter Thread starter Chris Botha
  • Start date Start date
C

Chris Botha

In VS2003 if I had a Web form, say Form1 and a class, say Class1, then I
could pass the form as parameter to a sub/function in the class, so this
would compile:
Public Class Class1
Public Sub DoSomeStuff(TheForm as Form1)
End Sub
End Class

Using VS2005 the above fails, Form1 is not defined. Class1 is in the
App_Code directory. Anything I import/whatever to resolve this issue?
 
why are you passing a form? What about inheritance or centralize the logic
in a library etc etc

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
 
The forms are derived from a common base form and the derived forms and user
controls use functionality exposed by the base form, so the user controls
must know of the base form type.
The example was a simplified way to demonstrate the issue (I hope).

Thanks.


Alvin Bruney - ASP.NET MVP said:
why are you passing a form? What about inheritance or centralize the logic
in a library etc etc

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------



Chris Botha said:
Thanks. Shoot, and I was "quickly" going to port a Web app to VS2005.
 

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

Back
Top