如何在Windows应用程序中使用Response.Clear() [英] How to use Response.Clear() in Windows Application

查看:76
本文介绍了如何在Windows应用程序中使用Response.Clear()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,

谁能建议我,Response.clear()需要使用的所有命名空间和C#编码是什么.

我正在使用使用C#编码的Windows应用程序.

现在,我收到错误消息"名称" Response"在当前上下文中不存在",所以有什么可以帮助我解决此错误的问题.

我用来将少量数据下载到文件中的提及编码.

Hi Friends,

Can any one suggest me, what are all Namespace and C# coding that we need to use for Response.clear().

I am using Windows Application using C# coding.

Now I am getting the error "The name ''Response'' does not exist in the current context", so can any help me fix this error .

The Mentioned Coding that i am Using to download few data''s into a file .

Response.Clear();
           Response.Buffer = true;
           Response.AddHeader("content-disposition","attachment;filename=OutPut"+ System.DateTime.Now+ ".csv");
           Response.Charset = "";
           Response.ContentType = "application/text";





Response.Output.Write(dt.ToString());
            Response.Flush();
            Response.End();

推荐答案

我希望请求和响应"只能在Web开发中使用.请告诉我在寡妇中使用Response.clear()的原因.
I hope that Request and Response can be used only in web development. Please tell me the reason for using Response.clear() in widows..


检查这些

从Web下载文件[C#] [ MyDownloader:多线程C#分段下载管理器 [文件列表下载器 [
Check these

Download Files from Web [C#][^]
MyDownloader: A Multi-thread C# Segmented Download Manager[^]
File List Downloader[^]


这意味着您尚未在方法中定义Response或类,否则无法在任何可用的命名空间中对变量的定义进行优化.

可能是您需要传递一个参数,但是由于我们不知道您的代码是什么样子,因此无法确定.
It means that you haven''t defined Response within the method or class, and it can''t otherwise fine a definition for the variable in any of the available namespaces.

Chances are that you need to pass a parameter, but it''s impossible to tell because we don''t know what your code looks like.


这篇关于如何在Windows应用程序中使用Response.Clear()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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