90 likes | 103 Views
Web User Control Development Environment: MS Visual Studio .NET 2005. Internet Programming Class 2006 Instructor: Dr. James W. Fawcett TA: Murat K. Gungor. Web User Control. Create New Empty Web Site Name it WebUserControl. 1 Add New Item. 2 Web User Control.
E N D
Web User ControlDevelopment Environment: MS Visual Studio .NET 2005 Internet Programming Class 2006 Instructor: Dr. James W. Fawcett TA: Murat K. Gungor Web User Control .NET 2005
Web User Control • Create New Empty Web Site • Name it WebUserControl Web User Control .NET 2005
1 Add New Item 2 Web User Control Web User Control .NET 2005
We only have LoginControl.ascx • Using Toolbox in Design View of LoginControl.ascx • Let’s add Standard Controls • Panel • Two TextBox • Button • Label • Then rename controls’ IDs appropriately Renaming IDs LoginNameTextBox PasswordTextBox LoginButton StatusLabel Web User Control .NET 2005
Change the PasswordTextBox’s TextMode to Password • Double Click on Login Button and add LoginButton_Click function • Then type the code on the right. We are done with the LoginControl How can we see it working? Web User Control .NET 2005
Add New Item Web Form Web User Control .NET 2005
We have Default.aspx page LoginControl.ascx • Drag and Drop • Select LoginControl.ascx • Then hold the left mouse button down then drag it over Default.aspx and drop it. What happened is we just added these highlighted code lines to Default.aspx Web User Control .NET 2005
Lets Run It • What else can we do with Web User Control? • Search Control • Menu • Admin Menu • Customer Menu • Employee Menu • News Control • Deal of the Day Control • Quotes Control • What to cook today Control • Etc… Web User Control .NET 2005
End of Presentation Web User Control .NET 2005