在类库项目中使用HTTPUtility [英] Using HTTPUtility in a class library project

查看:102
本文介绍了在类库项目中使用HTTPUtility的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Everyone,



我们正在使用C#语言在ASP.Net上开展一个项目。我创建了一个类库项目来创建一个DLL,在其中我已经定义了一个SMTP邮件功能,并在我的代码中使用了一些HTTPUtility.UrlEncode()。当我构建我的程序时它在HTTPUtility上给出一个Erorr,即使我已经声明使用System.web



可以这样做吗?我的意思是这可能是这样的话

任何人都可以让我知道怎么做。



我差不多有一天要找它...但找不到任何解决方案。



期待您的早期回复。



随着热烈的问候,



Ahmed Khan

Hello Everyone,

We are working on a project on ASP.Net using C# language. I have created a Class Library project to make a DLL and within it i have define a SMTP mail function and used some HTTPUtility.UrlEncode() in my code. When i build my program its giving an Erorr at HTTPUtility, even i have declared using System.web.

can this be done? I mean is this possible if so
can anyone please let me know how can this be done.

I have almost a day looking for it.. but couldn't find any solution.

Looking forward your early reply.

With warm regards,

Ahmed Khan

推荐答案

是的它可以,但你需要添加一个参考 System.Web
Yes it can, but you'll need to add a reference to System.Web.


不仅导入声明

go project->添加参考 - > .net-> ;然后System.web添加对项目的引用
not only import statement
go project->Add refference ->.net-> then System.web add refference to your project


这篇关于在类库项目中使用HTTPUtility的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆