.net - help in c# and webclient class -
i need enable cookie webclient (windowsform project)
i found solution in link
using cookiecontainer webclient class
but can not understand how apply ? should create new class (it not work) or need change variables make suitable project ?
i need explain me how apply it, , if have solution supply me it.
this it:
public class cookiemonsterwebclient : webclient { public cookiecontainer cookies { get; set; } protected override webrequest getwebrequest(uri address) { httpwebrequest request = (httpwebrequest)base.getwebrequest(address); request.cookiecontainer = cookies; return request; } }
also check out previous answer similar topic here.
Comments
Post a Comment