|
-
Aug 29th, 2003, 02:01 AM
#1
Thread Starter
Hyperactive Member
Label not visible in the browser
I am tring to create a runtime Label and some text in the label for that i am trying the following code.In the browser the following code display nothing.please tell me the necesssary steps should i follow.
Label lblError=new Label();
lblError.Visible=true;
lblError.Text="Display Error";
Help
PPCC
Last edited by PPCC; Aug 29th, 2003 at 02:05 AM.
-
Aug 29th, 2003, 08:10 AM
#2
Lively Member
You need to add it to something on the page. Try placing a placeholder where you want it to go then you can just do:
Label lblError=new Label();
lblError.Visible=true;
lblError.Text="Display Error";
Placeholder1.controls.add(lblError)
"Find all you need in your mind if you take the time" -DT
-
Aug 29th, 2003, 08:14 AM
#3
PowerPoster
Also, if you do not want to use a placeholder, you can add it to the Form object's control collection. This is because you are adding a server control, which as expects, executes on the server.
-
Aug 30th, 2003, 04:48 AM
#4
Thread Starter
Hyperactive Member
Ya done it
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|