469,584 Members | 2,440 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,584 developers. It's quick & easy.

Include form info in Response.Redirect

I have a vexing problem I hope someone can help me with:
I have an ASP.Net site that allows users to place orders for biological
materials. Once the order is done though, I would like to have two pieces of
information automatically entered into textfields on a form managed by a
different site on a different server.
I can do a Response.Redirect to the other site no problem and load the blank
form page. My question is whether I can have the two text boxes on that
blank form automatically filled up with some data contained in a datagrid on
my side. The outside form has a <textarea name="sequenceData" cols="45"
rows="8"></textarea></td> for example. Can I pass a string in the
Response.Redirect method and target it to that textarea?
Thanks,
Stephan.

Nov 18 '05 #1
2 3484
It's not possible using a querystring, unless the page you are redirecting
to looks at the querystring and pre-populates the form from this data.

However, one possible solution may be through using frames. You may able to
adapt this example:

http://groups.google.com/groups?hl=e...TNGP11.phx.gbl

Hope this helps,

Mun


"Stephan Bour" <sb***@niaid.nih.gov> wrote in message
news:BC07604A.C96F%sb***@niaid.nih.gov...
I have a vexing problem I hope someone can help me with:
I have an ASP.Net site that allows users to place orders for biological
materials. Once the order is done though, I would like to have two pieces of information automatically entered into textfields on a form managed by a
different site on a different server.
I can do a Response.Redirect to the other site no problem and load the blank form page. My question is whether I can have the two text boxes on that
blank form automatically filled up with some data contained in a datagrid on my side. The outside form has a <textarea name="sequenceData" cols="45"
rows="8"></textarea></td> for example. Can I pass a string in the
Response.Redirect method and target it to that textarea?
Thanks,
Stephan.

Nov 18 '05 #2
I have found another simple solution that works perfectly.
ASP.Net provides a WebClient object that allows the server to behave like a
client to another web server. All I had to do was to include the ID of the
remote form's Text boxes (sequenceData and sequenceName below). One can even
retrieve the stream back from the remote form and perform checks for success
of failure, depending on what is returned.

public bool AddToRemote (LocalMethodReturningProperties method) {

WebClient myWebClient = new WebClient();
String URL =
"http://128.231.000.00/RemoteFormSubmitButton?sequenceName=" +
method.Parameter1 + "&sequenceData=" + method.Parameter2;
Stream myStream = myWebClient.OpenRead(URL);

StreamReader sr = new StreamReader(myStream);
Response.Write("\nResponse received was :\n\n" + sr.ReadToEnd());

}

in article #A**************@TK2MSFTNGP09.phx.gbl, Munsifali Rashid at
mun.news@#RemoveToReply#cordlessmouse.co.uk wrote on 12/18/03 14:00:
It's not possible using a querystring, unless the page you are redirecting
to looks at the querystring and pre-populates the form from this data.

However, one possible solution may be through using frames. You may able to
adapt this example:

http://groups.google.com/groups?hl=e...=%23PAHtwxwDHA
.560%40TK2MSFTNGP11.phx.gbl

Hope this helps,

Mun


"Stephan Bour" <sb***@niaid.nih.gov> wrote in message
news:BC07604A.C96F%sb***@niaid.nih.gov...
I have a vexing problem I hope someone can help me with:
I have an ASP.Net site that allows users to place orders for biological
materials. Once the order is done though, I would like to have two pieces

of
information automatically entered into textfields on a form managed by a
different site on a different server.
I can do a Response.Redirect to the other site no problem and load the

blank
form page. My question is whether I can have the two text boxes on that
blank form automatically filled up with some data contained in a datagrid

on
my side. The outside form has a <textarea name="sequenceData" cols="45"
rows="8"></textarea></td> for example. Can I pass a string in the
Response.Redirect method and target it to that textarea?
Thanks,
Stephan.



Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Bill Kearns | last post: by
5 posts views Thread by Jonathan Allen | last post: by
11 posts views Thread by David W. Simmonds | last post: by
3 posts views Thread by Athmaus | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.