Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / January 2006

Tip: Looking for answers? Try searching our database.

Posting data and reading it

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter Afonin - 16 Jan 2006 00:09 GMT
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/stevesmith/articles/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,

Signature

Peter Afonin

Patrick.O.Ige - 16 Jan 2006 04:21 GMT
Peter try looking at this sample at:-
http://aspnet101.com/aspnet101/tutorials.aspx?id=20
Hope that helps
Patrick

> Hello,
>
[quoted text clipped - 10 lines]
>
> Thank you,
Peter Afonin - 16 Jan 2006 05:04 GMT
Hi Patrick,

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

Peter

> Peter try looking at this sample at:-
> http://aspnet101.com/aspnet101/tutorials.aspx?id=20
[quoted text clipped - 16 lines]
> >
> > Thank you,
Peter Afonin - 19 Jan 2006 05:31 GMT
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

> Peter try looking at this sample at:-
> http://aspnet101.com/aspnet101/tutorials.aspx?id=20
[quoted text clipped - 16 lines]
> >
> > Thank you,

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.