the first disappointing thing I find in ASP.NET

G

gustav

I can´t believe thath with ASP.NET we loose the ability to make POST
requests to another webforms in another application...

I say this because of my last question "Redirect by POST method to another
applications" , which had two answers, but none of them so simple like in
the old ASP:

<form name="form2" method="post"
action="http://anotherServer/anotherApp/anotherForm.aspx">
<input name="user" type="text" id="user"/>
<input name="password" type="password" id="password" />
</form>

Any opinions?
 
S

sloan

As a general rule for this or any other forum, you need to say "I"m using
1.1" or "I'm using 2.0".

This situation has been addressed in Asp.Net 2.0.

Are you using 1.1 or 2.0?
 
S

sloan

PS


I'd change careers before going back to ASP.

I know I (like we all did) thought it was cool in 1997, but man, its like
pulling teeth even looking at it with Asp.Net 2.0 in existence.

...
 
M

Mark Rae

I'd change careers before going back to ASP.

I know I (like we all did) thought it was cool in 1997, but man, its like
pulling teeth even looking at it with Asp.Net 2.0 in existence.

You'll be saying exactly the same thing about ASP.NET 2 in 10 years...
 
B

bruce barker

asp.net 1.1 only allows one form with runat server and render the
current page as target. the only way to override this is with
javascript. you can other forms with different targets, just without the
runat=server, which is just as easy as asp.

-- bruce (sqlwork.com)
 
V

vMike

gustav said:
I can´t believe thath with ASP.NET we loose the ability to make POST
requests to another webforms in another application...

I say this because of my last question "Redirect by POST method to another
applications" , which had two answers, but none of them so simple like in
the old ASP:

<form name="form2" method="post"
action="http://anotherServer/anotherApp/anotherForm.aspx">
<input name="user" type="text" id="user"/>
<input name="password" type="password" id="password" />
</form>

Any opinions?
One possible work around in some situations is you can use the override
render to change to action on the form as follows.

Protected Overrides Sub Render(ByVal writer As HtmlTextWriter)

Dim _stringBuilder As StringBuilder = New StringBuilder()
Dim _stringWriter As StringWriter = New StringWriter(_stringBuilder)
Dim _htmlWriter As HtmlTextWriter = New HtmlTextWriter(_stringWriter)
MyBase.Render(_htmlWriter)


Dim html As String = _stringBuilder.ToString()
Dim start As Integer = html.IndexOf("action=")

if start <> -1 then

html = html.Insert(start + 8, "someother place to post")
end if
writer.Write(html)

End Sub
 
S

sloan

You're probably right.

But ...

<include > files (and source safing this with the vss "share" function)

and no OO. Rough stuff.
 
V

vMike

gustav said:
I can´t believe thath with ASP.NET we loose the ability to make POST
requests to another webforms in another application...

I say this because of my last question "Redirect by POST method to another
applications" , which had two answers, but none of them so simple like in
the old ASP:

<form name="form2" method="post"
action="http://anotherServer/anotherApp/anotherForm.aspx">
<input name="user" type="text" id="user"/>
<input name="password" type="password" id="password" />
</form>

Any opinions?
Another option is to build an html form without the runat tag and use
placeholders to fill the variable data into the form

Mike
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

gustav said:
I can´t believe thath with ASP.NET we loose the ability to make POST
requests to another webforms in another application...

I say this because of my last question "Redirect by POST method to another
applications" , which had two answers, but none of them so simple like in
the old ASP:

<form name="form2" method="post"
action="http://anotherServer/anotherApp/anotherForm.aspx">
<input name="user" type="text" id="user"/>
<input name="password" type="password" id="password" />
</form>

Any opinions?

That's just plain HTML, and it still works in ASP.NET.

Actually, if you want the post to take place in the browser, that's the
only way to do it.

Alternatively, if you want to post a request and handle the response in
the server code instead, you can use a HttpWebRequest object.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top