From the course: ASP.NET Web Forms Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Adding user controls to the list view

Adding user controls to the list view - ASP.NET Tutorial

From the course: ASP.NET Web Forms Essential Training

Start my 1-month free trial

Adding user controls to the list view

- [Instructor] So one of the thing that I want to show you it's how we can tie this together with the user control that we created a little bit earlier. So what I want to do, I want to press a message here and see if it still works. Hello world again and then I can press send and the button doesn't work. In fact, it does work. So if I press the Contact page again, it will refresh off the page and it will show me the result. The reason actually doesn't show me that is because I'm not binding the data when it should. So what it happens actually behind the curtains, it's that my application is actually going to show the data before it has all the data. So one of the things that I need to do because this is happening on buttons and click, I want to go in here and say protected void Page_PreRender. So before we render the page, I want to actually say object sender and then EventArgs e. What I want to do in here, I want to say please delete view messages data bind. So if I do that now, that…

Contents