Here's my new web method:
<WebMethod()>
Public Sub myWsSub(ByVal parms As String)
Dim context as New HttpContext(HttpContext.Current.Request,
HttpContext.Current.Response)
context.Response.ContentType = "application/json;
charset=utf-8"
context.Response.Write(tableToJson(CreateDataTable(parms)))
End Function
Isn't that instantiating a new HttpContext object? Is that not the
right way to do it?
On Dec 20, 5:39 am, Cerebrus <[email protected]> wrote:
> I think you might have actually accessed the HttpContext object
> (Context property) instead of instantiating it. You already have the
> best solution, IMHO.
>
> On Dec 19, 7:08 pm, jtaylor <[email protected]> wrote:
>
>
>
>
>
>
>
> > I got my webservice to return the text I wanted by instantiating an
> > HttpContext object and using the .ContentType and .Write methods. Any
> > reason not to just stick with that?
--
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net