Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

NullReferenceException in C# windows form application

$
0
0

Hi,

Given below is my code.. I am getting "Null reference exception" in the very first line.

HttpResponse response =HttpContext.Current.Response;
response
.Clear();
response
.ClearContent();
response
.ClearHeaders();

I am working in windows form application. I am using this line to export a gridview data to excel with SaveAs(browse) option.

Pease suggest.

Thanks.


Viewing all articles
Browse latest Browse all 2535

Trending Articles