Hello everyone,
I have a TextBox and a Button on my webpage. On Page Load I'm displaying the contents of a TextFile(with multiple lines)on the TextBox.Then I'm editing the TextBox.Then On ButtonClick ,I debug it and check the TextBox value.The value shown is:The value last edited on textbox appended with the intial Values of the TextBox.
Why it is happening so?? I dont want this. Please any help me..The TextBox value on buttonclick should only be the last edited value on it.

Recommended Answers

All 5 Replies

So what code have you written in your page load event?

And instead of putting in openly,put it in this way..

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
         if (!IsPostBack)
        {
         //write here if needed    
        }
     

    }

}

And please put some source code,so that some one can understand what is happening wrong.
:)

Thank You Akash for your help.I'm now getting the results I wanted.
This thread is marked Solved

So,the problem was related to Postback?

Yes.. How could I miss Postback.strange!!! Friends lyk u help alwz.

:D
It Happens some times.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.