Author: nacef | Posted on: 12/19/2008 4:46:58 AM | Views : 340

 Hi all,
 I am a little bit concerned by the way that asp.net handles events. I explain my case.
 I have a simple webform which contains a Label and a custom UserControl. In my user control I have put a textBox and a Button.
I want to have the label display the text which I have entered in the textbox when I click on the button so what I have figured out is to put the content of the textbox in the viewstate when clicking the button and then make the label display the text from the viewstate.
This is my webform : 
public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack)
        {
            if (ViewState["test"] != null)
     &nbs ...

Go to the complete details ...