Connecting Tech Pros Worldwide Forums | Help | Site Map

Posting data and reading it

Peter Afonin
Guest
 
Posts: n/a
#1: Jan 16 '06
Hello,

I'm posting the data to another page and reading the results. I'm doing it
approximately as described here:
http://authors.aspalliance.com/steve...netscrape2.asp

It works fine. But I'm getting the result as one string. I know the field
names that are actually returned. Is there a way to return the value of each
field instead of the whole string? Request.Form(fieldname) doesn't seem to
work here.

I would appreciate any advice.

Thank you,

--
Peter Afonin



Patrick.O.Ige
Guest
 
Posts: n/a
#2: Jan 16 '06

re: Posting data and reading it


Peter try looking at this sample at:-
http://aspnet101.com/aspnet101/tutorials.aspx?id=20
Hope that helps
Patrick

"Peter Afonin" <pafonin@hotmail.com> wrote in message
news:uYGRTEjGGHA.1032@TK2MSFTNGP12.phx.gbl...[color=blue]
> Hello,
>
> I'm posting the data to another page and reading the results. I'm doing it
> approximately as described here:
> http://authors.aspalliance.com/steve...netscrape2.asp
>
> It works fine. But I'm getting the result as one string. I know the field
> names that are actually returned. Is there a way to return the value of[/color]
each[color=blue]
> field instead of the whole string? Request.Form(fieldname) doesn't seem to
> work here.
>
> I would appreciate any advice.
>
> Thank you,
>
> --
> Peter Afonin
>
>[/color]


Peter Afonin
Guest
 
Posts: n/a
#3: Jan 16 '06

re: Posting data and reading it


Hi Patrick,

Yes, that should do it. I can use this or perhaps Javascript to post to
another page. Thank you very much!

Peter

"Patrick.O.Ige" <naijacoder@hotmail.com> wrote in message
news:uLyBbRlGGHA.1124@TK2MSFTNGP10.phx.gbl...[color=blue]
> Peter try looking at this sample at:-
> http://aspnet101.com/aspnet101/tutorials.aspx?id=20
> Hope that helps
> Patrick
>
> "Peter Afonin" <pafonin@hotmail.com> wrote in message
> news:uYGRTEjGGHA.1032@TK2MSFTNGP12.phx.gbl...[color=green]
> > Hello,
> >
> > I'm posting the data to another page and reading the results. I'm doing[/color][/color]
it[color=blue][color=green]
> > approximately as described here:
> > http://authors.aspalliance.com/steve...netscrape2.asp
> >
> > It works fine. But I'm getting the result as one string. I know the[/color][/color]
field[color=blue][color=green]
> > names that are actually returned. Is there a way to return the value of[/color]
> each[color=green]
> > field instead of the whole string? Request.Form(fieldname) doesn't seem[/color][/color]
to[color=blue][color=green]
> > work here.
> >
> > I would appreciate any advice.
> >
> > Thank you,
> >
> > --
> > Peter Afonin
> >
> >[/color]
>
>[/color]


Peter Afonin
Guest
 
Posts: n/a
#4: Jan 19 '06

re: Posting data and reading it


Patrick, I've tried this - it's actually not exactly what I need.

In my case I'm posting data to the gateway. This gateway returns the results
in field1, field2, etc. It posts this result back to my page. Many gateways
are posting data to the different URL, so it's not a problem to get values
of these fields by using Request.Form(field1) etc. But not this one.

I can use the post string and then get all results in one string, like this:

Dim objResponse As HttpWebResponse = objRequest.GetResponse()
Dim sr As StreamReader
sr = New StreamReader(objResponse.GetResponseStream(),
Encoding.GetEncoding(1251))
result = sr.ReadToEnd()
sr.Close()

This works fine. But I'd rather get them by the field name, i.e. get values
of field1, field2 etc. Any idea how to do this?

Thank you,

Peter

"Patrick.O.Ige" <naijacoder@hotmail.com> wrote in message
news:uLyBbRlGGHA.1124@TK2MSFTNGP10.phx.gbl...[color=blue]
> Peter try looking at this sample at:-
> http://aspnet101.com/aspnet101/tutorials.aspx?id=20
> Hope that helps
> Patrick
>
> "Peter Afonin" <pafonin@hotmail.com> wrote in message
> news:uYGRTEjGGHA.1032@TK2MSFTNGP12.phx.gbl...[color=green]
> > Hello,
> >
> > I'm posting the data to another page and reading the results. I'm doing[/color][/color]
it[color=blue][color=green]
> > approximately as described here:
> > http://authors.aspalliance.com/steve...netscrape2.asp
> >
> > It works fine. But I'm getting the result as one string. I know the[/color][/color]
field[color=blue][color=green]
> > names that are actually returned. Is there a way to return the value of[/color]
> each[color=green]
> > field instead of the whole string? Request.Form(fieldname) doesn't seem[/color][/color]
to[color=blue][color=green]
> > work here.
> >
> > I would appreciate any advice.
> >
> > Thank you,
> >
> > --
> > Peter Afonin
> >
> >[/color]
>
>[/color]


Closed Thread