Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9287749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T19:45:06+00:00 2026-06-18T19:45:06+00:00

I am using asp.net 3.5 (codebehind c#). My users are running IE 7 or

  • 0

I am using asp.net 3.5 (codebehind c#). My users are running IE 7 or 8. I have a data entry page with several TextBoxes.

When I want to clear the all the TextBoxes, I do a sever.transfer back to the same page.

Maybe 99% of the time, this clears the TextBoxes. Every so often it does not.

I know that a roundtrip to the server has happened because:

  • The dropdown lists and radiobuttonlists on the page get reset, and
  • DB processing happened as shown by a record having been saved to the
    DB.

The inconsistency is confusing me.

What could be causing the TextBoxes to persist data in this way and how can I prevent it from ever happening?

It is resulting in users saving the same data twice.

I don’t think this would have anything to do with it, but there are also various js functions on the page for validation, capitalizing the first letter of an input, etc

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T19:45:07+00:00Added an answer on June 18, 2026 at 7:45 pm

    As this MSDN article describes the Server.Transfer method, this is probably not the right way to empty the TextBoxes. The method explicitly keeps all state information.

    A better approach is described within this answer:

    foreach (var item in Page.Controls)
            {
                if (item is TextBox)
                {
                    ((TextBox)item).Text = "";
                }
            }
    

    You will keep the roundtrips to just one, and you could keep all other user inputs as they were, if you like.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im using asp.net webforms. c# I want to validate a form. In the codebehind
Using asp.net 3.5 Gridview control, visual studio 2008. I have played with all the
I have started using jqgrid in my asp.net application. Asp.net, c# I want to
I have a simple ASP.NET page that users can browse to, select a file
I have a location using our ASP.NET 4.0 web application which was running fine
I have an ASP.net website that will allow users to upload images using a
I have a asp.net website with c# code behind and using visual studio 2010.
Using ASP.net and c# using visual studio 2010 Hi all, I hope some one
Using ASP.Net MVC on my Site.Master I have: <head runat=server> <title><asp:ContentPlaceHolder ID=TitleContent runat=server />
Using ASP.NET MVC 2.0, I have an actionlink that is used for comments on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.