Thursday, March 22, 2012

the first disappointing thing I find in ASP.NET

I cant 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?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?
"gustav" <gustavo@.webserver.com.ar> wrote in message
news:uWgGk59aHHA.960@.TK2MSFTNGP03.phx.gbl...
> I cant 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?
>
http://www.codeproject.com/aspnet/PostToAnotherPage.asp
"gustav" <gustavo@.webserver.com.ar> wrote in message
news:uWgGk59aHHA.960@.TK2MSFTNGP03.phx.gbl...
> I cant 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?
>
PS
I'd change careers before going back to ASP.
I know I (like we all did) thought it was in 1997, but man, its like
pulling teeth even looking at it with Asp.Net 2.0 in existence.
..
"gustav" <gustavo@.webserver.com.ar> wrote in message
news:uWgGk59aHHA.960@.TK2MSFTNGP03.phx.gbl...
> I cant 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?
>
using 1.1, cantt migrate to 2.0 yet ( in my first message it said ASP.NET
1.1)
"sloan" <sloan@.ipass.net> escribi en el mensaje
news:%23Bo7uA%23aHHA.4552@.TK2MSFTNGP05.phx.gbl...
> 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?
>
>
> "gustav" <gustavo@.webserver.com.ar> wrote in message
> news:uWgGk59aHHA.960@.TK2MSFTNGP03.phx.gbl...
>
"sloan" <sloan@.ipass.net> wrote in message
news:%23ga%23BC%23aHHA.4000@.TK2MSFTNGP02.phx.gbl...

> I'd change careers before going back to ASP.
> I know I (like we all did) thought it was 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...
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)
gustav wrote:
> I cant 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?
>
"gustav" <gustavo@.webserver.com.ar> wrote in message
news:uWgGk59aHHA.960@.TK2MSFTNGP03.phx.gbl...
> I cant 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
You're probably right.
But ...
<include > files (and source safing this with the vss "share" function)
and no OO. Rough stuff.
"Mark Rae" <mark@.markNOSPAMrae.com> wrote in message
news:%23A3dcS%23aHHA.4772@.TK2MSFTNGP05.phx.gbl...
> "sloan" <sloan@.ipass.net> wrote in message
> news:%23ga%23BC%23aHHA.4000@.TK2MSFTNGP02.phx.gbl...
>
like
> You'll be saying exactly the same thing about ASP.NET 2 in 10 years...
>
"gustav" <gustavo@.webserver.com.ar> wrote in message
news:uWgGk59aHHA.960@.TK2MSFTNGP03.phx.gbl...
> I cant 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

0 comments:

Post a Comment