Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 11th, 2005, 05:19 PM
Registered User
 
Join Date: Sep 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Asp.net question

Lets say that I have created a user control called header, and this control just contains a label called "message". Not how will I be able to set the text of "message" from a asp Page?
 
Old September 13th, 2005, 03:23 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

At the class level define a refence to the userconrol

 Protected WithEvents header1 As header


In the page :
        Dim l As Label
        l = header1.FindControl("message")
        l.Text = "New Text"








Similar Threads
Thread Thread Starter Forum Replies Last Post
VB and ASP.NET question RomeyRome BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 2 December 20th, 2007 07:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.