views:

37

answers:

1

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
He doesn't have an HttpResponse object. The question wants to know how to change the agent string being sent from an HTMLControl.
ctacke
Sure he does. Just reference the current page's HttpResponse object.
Chris Ballance
I'm not using .Net CF. Is the HttpResponse object available by accessing a particular COM Interface?
brismith