accessing System.Web.UI from a class

D

Dunc

Hi,

I've got a solution that consists of a number of different projects, and
I've got a bunch of static functions that are utilised by each. I want to
move these functions into a seperate project, so they compile to a seperate
DLL.

One of the functions accepts a dropdown list as a parameter. I've created
the project, moved the files, but now it's coming up with "The type or
namespace 'UI' does not exist in the class 'System.Web' (are you missing an
assembly reference?) on the line:

public static int FindSelectedIndex(System.Web.UI.WebControls.DropDownList
ddl, string value)

I can understand why I can't access the web namespaces from a class DLL, but
how can I get around this?

Thanks in advance,

Dunc
 
S

Steve Willcock

Dunc,

you need to add a reference to the System.Web.dll (Project menu, add
reference) in your static functions project
 

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

Top