954,574 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

TextBox(in Multimode) does not shows last edited values on button click??

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.

genext.brite
Newbie Poster
8 posts since Sep 2010
Reputation Points: 6
Solved Threads: 0
 

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.
:)

Akash Saikia
Junior Poster
112 posts since Mar 2011
Reputation Points: 19
Solved Threads: 20
 

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

genext.brite
Newbie Poster
8 posts since Sep 2010
Reputation Points: 6
Solved Threads: 0
 

So,the problem was related to Postback?

Akash Saikia
Junior Poster
112 posts since Mar 2011
Reputation Points: 19
Solved Threads: 20
 

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

genext.brite
Newbie Poster
8 posts since Sep 2010
Reputation Points: 6
Solved Threads: 0
 

:D
It Happens some times.

Akash Saikia
Junior Poster
112 posts since Mar 2011
Reputation Points: 19
Solved Threads: 20
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: