Reputation: 1
Response.Write("String Goes here.");
Above statement showing an error inside my .net core 2.1 project's controller .Even if i have included the references like System.web .
Exact Error msg:
Error CS1061 'HttpResponse' does not contain a definition for 'Write' and no accessible extension method 'Write' accepting a first argument of type 'HttpResponse' could be found (are you missing a using directive or an assembly reference?)
Thank you
Upvotes: 0
Views: 2926
Reputation: 392
Use Microsoft.AspNetCore.Http Nuget Package and namespace Microsoft.AspNetCore.Http then you can use :
using Microsoft.AspNetCore.Http ;
....
Response.Write("String Goes here.");
Upvotes: 2