Re: Clearing the data....
From: Kevin Spencer (kspencer_at_takempis.com)
Date: 07/29/04
- Next message: Paul King: "Re: Response.Write"
- Previous message: AsyaHubby: "Re: asp.net and divs"
- In reply to: Paul King: "Re: Clearing the data...."
- Next in thread: Paul King: "Re: Clearing the data...."
- Reply: Paul King: "Re: Clearing the data...."
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 29 Jul 2004 11:55:11 -0400
Response.Redirect sends a Response to the Client browser, which tells it to
request another page. Yes, this does mean that the server will receive 2
requests from the client, whereas Server.Transfer transfers control to
another class without redirecting. However, there are reasons for both
methods to exist. Only Response.Redirect will ensure that a Refresh from the
browser will not cause the last PostBack to re-occur. It's not like the 2
are interchangeable. When you need to hammer nails, use a hammer, not a
screwdriver.
-- HTH, Kevin Spencer .Net Developer Microsoft MVP Big things are made up of lots of little things. "Paul King" <kin0363k@hotmail.com> wrote in message news:eRmi8nXdEHA.3076@TK2MSFTNGP10.phx.gbl... > No problems Kevin, I will use the Response.Redirect. > > I just done a web search on Response.Redirect and it recommended to use > Server.Transfer as this was less intensive on IIS. > > Regards > Paul. > > "Kevin Spencer" <kspencer@takempis.com> wrote in message > news:eSAewMXdEHA.1356@TK2MSFTNGP09.phx.gbl... > > I didn't say anything about Server.Transfer. Response.Redirect tells the > > browser to request a new URL. Refreshing the page redirected to does just > > that: it refreshes the page that the Redirect linked to. > > > > -- > > HTH, > > Kevin Spencer > > .Net Developer > > Microsoft MVP > > Big things are made up > > of lots of little things. > > > > "Paul King" <kin0363k@hotmail.com> wrote in message > > news:eBxm2BXdEHA.2664@TK2MSFTNGP09.phx.gbl... > > > Kevin > > > > > > Thanks for the information - the only problem is that you can Invoke the > > > Response.Redirect or Server.Transfer to clear the entry of the form. > > > > > > However if you hit the refresh button on a blank form this will > duplicate > > > another entry into the SQL from the DataSet. I need to somehow also > clear > > > the DataSet. > > > > > > Regards > > > Paul. > > > > > > "Kevin Spencer" <kspencer@takempis.com> wrote in message > > > news:etQAgnWdEHA.1152@TK2MSFTNGP09.phx.gbl... > > > > Simplest solution: After the INSERT is performed, do a > Response.Redirect > > > > back to the same page. > > > > > > > > -- > > > > HTH, > > > > Kevin Spencer > > > > .Net Developer > > > > Microsoft MVP > > > > Big things are made up > > > > of lots of little things. > > > > > > > > "Paul King" <kin0363k@hotmail.com> wrote in message > > > > news:eSgbQgUdEHA.3632@TK2MSFTNGP09.phx.gbl... > > > > > I have created a form on the web that allows us to update a table on > > our > > > > SQL > > > > > server using the INSERT function. > > > > > > > > > > The way the page is constructed is that the results panel refreshes > > with > > > > the > > > > > new data after a post has been issued. This is fine and dandy, but > if > > > we > > > > > were to refresh the browser, this would duplicate another record > with > > > the > > > > > same details. > > > > > > > > > > I would there like to either: > > > > > > > > > > A) Clear the input from the screen after a POST has been issued or, > > > > > B) Clear the DataSet data so that this will not duplicate the > > > information > > > > if > > > > > a refresh was issued. > > > > > > > > > > Please can you help > > > > > > > > > > Thanks > > > > > Paul > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
- Next message: Paul King: "Re: Response.Write"
- Previous message: AsyaHubby: "Re: asp.net and divs"
- In reply to: Paul King: "Re: Clearing the data...."
- Next in thread: Paul King: "Re: Clearing the data...."
- Reply: Paul King: "Re: Clearing the data...."
- Messages sorted by: [ date ] [ thread ]