Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
     <input type="text" name="TextBox1" />
    <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
 
Click Button1
Click Button1
Click Button1
you will find TextBox1.Text is changed,what makes it change?
Posted 13-Oct-12 16:51pm
Comments
Wes Aday at 13-Oct-12 23:17pm
   
Do you think that it's possible that whatever happens is located in "Button1_Click"?
happy_daily at 14-Oct-12 8:17am
   
If you click button,you will find TextBox1.Text changes to ',', with the button1_chlick() has nothing,just try
Wes Aday at 14-Oct-12 8:33am
   
No.... no it does not.
happy_daily at 14-Oct-12 9:23am
   
Are u sure? Do u try it? I have tried it on different computers, and find the textbox1.text changed strangely.
happy_daily at 14-Oct-12 8:18am
   
If you click button,you will find TextBox1.Text changes to ',', with the button1_chlick() has nothing,just try

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Sounds like you are asking how does textbox text change when button is clicked.
 
Well, when button is clicked, page postback happens and event defined if occured executes. Whatever is mentioned in the event method, code executes and one can see the changes on page rendered.
 
To know the full inner details on how and what happens page flow wise, read:
Complete Lifecycle of an ASP.Net page and controls[^]
ASP.NET Application and Page Life Cycle[^]
MSDN: ASP.NET Page Life Cycle Overview[^]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 472
1 sanket saxena 355
2 CPallini 205
3 thatraja 200
4 OriginalGriff 195
0 Sergey Alexandrovich Kryukov 8,784
1 OriginalGriff 5,025
2 Peter Leow 3,839
3 Maciej Los 3,535
4 Er. Puneet Goel 3,107


Advertise | Privacy | Mobile
Web02 | 2.8.140415.2 | Last Updated 14 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid