I'm writing an app (VS2005, C++, targeting WM5) which is hosting the HTML Control. Can I modify the user-agent this control uses when making a request to a server?
A:
http://msdn.microsoft.com/en-us/library/system.web.httpresponse.addheader.aspx
Use AddHeader to modify the useragent.
Since you are in a control, use this to get to your current HttpResponse object. this.Page.Response.AddHeader
Chris Ballance
2009-02-05 16:06:00
He doesn't have an HttpResponse object. The question wants to know how to change the agent string being sent from an HTMLControl.
ctacke
2009-02-05 16:08:52
Sure he does. Just reference the current page's HttpResponse object.
Chris Ballance
2009-02-05 16:29:00
I'm not using .Net CF. Is the HttpResponse object available by accessing a particular COM Interface?
brismith
2009-02-10 14:47:34