One was is to use a new instance of the Webclient class. See the VB.NET code
below.
Let us know if this helps?
Ken
Microsoft MVP [ASP.NET]
Toronto
Sub DoPost()
Dim uriString As String = _
"http://" & _
Request.ServerVariables("SERVER_NAME") & _
Request.ServerVariables("SCRIPT_NAME")
' Create a new WebClient instance.
Dim myWebClient As New System.Net.WebClient
Dim myNameValueCollection As New _
System.Collections.Specialized.NameValueCollection
Dim responseArray As Byte() = myWebClient.UploadValues _
(uriString, "POST", myNameValueCollection)
Label1.Text = _
Server.HtmlEncode _
(System.Text.Encoding.ASCII.GetString(responseArra y))
End Sub
Private Sub Button1_Click _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles Button1.Click
Call DoPost()
End Sub
<form id="Form1" method="post" runat="server">
<p>
<asp:label id="Label1" runat="server">Label</asp:label></p>
<p>
<asp:button id="Button1" runat="server"
Text="Button"></asp:button></p>
</form>
"msnews.microsoft.com" <ji***@hotmail.com> wrote in message
news:um**************@TK2MSFTNGP15.phx.gbl...
Hi,
Is it possible to gain access to the actual html stream send to the
client? I am thinking of something like:
private void Page_Load(object sender, System.EventArgs e)
{
if ( !Page.IsPostBack )
{
// do stuff
Bind_Grid()
Get_Html_Stream()
}
}