Re: ASP / Redirect
From: Roji. P. Thomas (thomasroji_at_gmail.com)
Date: 03/01/05
- Next message: ProggerPete: "Re: Javascript Caching Question on IIS6"
- Previous message: Eilsa: "Re: TIF plug-in"
- In reply to: Roland Hall: "Re: ASP / Redirect"
- Next in thread: Iain Norman: "Re: ASP / Redirect"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 1 Mar 2005 11:58:48 +0530
I dont think that approach is safe because
len(request.queryString) can be greater than zero even when the page
is not post backed.
-- Roji. P. Thomas Net Asset Management https://www.netassetmanagement.com "Roland Hall" <nobody@nowhere> wrote in message news:eCc6mYaHFHA.2132@TK2MSFTNGP14.phx.gbl... > "McKirahan" wrote in message news:UP6dnbxVcJ-Rtr7fRVn-hw@comcast.com... > : "Roji. P. Thomas" <thomasroji@gmail.com> wrote in message > : news:#y7uf1ZHFHA.4060@TK2MSFTNGP14.phx.gbl... > : > Ofcourse, you can post back to the same page, > : > > : > Here is the psudo code for you. > : > <% > : > If Request.Form("Someformfield") <> "" Then --Poor mans IsPostback() > ;) > : > ' Save record > : > End If > : > > : > Render your page here > : > > : > %> > : > > : > > : > > : > -- > : > Roji. P. Thomas > : > Net Asset Management > : > https://www.netassetmanagement.com > : > > : > > : > "SyrUser03" <syruser03@syr.edu> wrote in message > : > news:O0tZWuZHFHA.2132@TK2MSFTNGP14.phx.gbl... > : > >I am new to ASP, still learning. > : > > > : > > I have a page that has a submit button. > : > > > : > > <form action="move.asp" method="GET"> > : > > <input type="submit" value="Query"> > : > > > : > > The form is sending values to the move.asp page. Which will in turn > be > : > > inserted into a database. My questions is can I do the insert > without > : > > having to go/see the another page. > : > > > : > > For example. > : > > I click on the submit button, it adds the record and then goes back > to > : the > : > > original page. > : > > > : > > Thanks in advance > : > : However, since the OP uses "GET", it would be: > : > : <% > : If Request.QueryString() <> "" Then > : ' Save record > : End If > : > : ' Render your page here > : > : %> > > I thought for QueryString is was preferable to use: > <% > if len(request.queryString) <> 0 then > 'Save record > end if > > ' Render your page here > %> > > -- > Roland Hall > /* This information is distributed in the hope that it will be useful, but > without any warranty; without even the implied warranty of merchantability > or fitness for a particular purpose. */ > Technet Script Center - http://www.microsoft.com/technet/scriptcenter/ > WSH 5.6 Documentation - > http://msdn.microsoft.com/downloads/list/webdev.asp > MSDN Library - http://msdn.microsoft.com/library/default.asp > >
- Next message: ProggerPete: "Re: Javascript Caching Question on IIS6"
- Previous message: Eilsa: "Re: TIF plug-in"
- In reply to: Roland Hall: "Re: ASP / Redirect"
- Next in thread: Iain Norman: "Re: ASP / Redirect"
- Messages sorted by: [ date ] [ thread ]