473,323 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Panel - Dynamic Controls

Hi,

I am just studying for MCAD and I came across this piece of code:
-------------------------------------------------
LiteralControl lcExpenseCaption = new LiteralControl();
lcExpenseCaption.Text = String.Format("Travel Expense for Day - {0} ",
i);
TextBox txtExpense = new TextBox();
txtExpense.ID = String.Format("Expense{0}", i);
HtmlControl lcBreak = new HtmlGenericControl("br");
-------------------------------------------------

What I don't know is how to remember or recognize that a break is an
object of the HtmlControl, HtmlGenericControl, the textbox is simply
an object of Textbox class, a literal belongs to a class named
LiteralControl?

I mean these lines essentially create a label, a textbox and a break.
And the way they accomplish these three things are three completely
different methods. Isn't there a general way these things are ordered
and named? Aren't the classes in some form of hierarchy so I don't
have to remember the differences between creating a textbox, a label,
a break, etc. etc.
Nov 16 '05 #1
0 1024

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: shustes | last post by:
Hi, I'm trying to essentially replicate a process that I had working well in classic ASP. I dump records within an HTML table to the web page. Within each record are textboxes and/or radio...
2
by: theComputer7 | last post by:
I cut down the code to make this half way understandable... I have read Data Grid girls caution about over use of dynamic controls. I truly believe what I am doing requires dynamically inserted...
3
by: Harry | last post by:
Hi, Can anyone help. I have a asp.net page (c#), with two panels, both of which have asp:textboxes on. When I press the first button, the second panel shows fine. When I press the button in...
3
by: SD | last post by:
Hello, I have a form that has a panel container where I'm adding textboxes dynamically based on a query to database, so I'm looping through the records. The problem I have is that once built,...
4
by: arun.hallan | last post by:
My code does the following... It references a stored procedure and builds a PlaceHolder containing certain controls, based on the parameters from the stored proc. This is implemented in it's own...
8
by: =?Utf-8?B?R3JlZyBMYXJzZW4=?= | last post by:
I'm trying to figure out how to modify a panel (panel1) from a backgroundworker thread. But can't get the panel to show the new controls added by the backgroundwork task. Here is my code. In...
6
by: raghulvarma | last post by:
I have used the panel in my web page. It works fine also but the problem is that when the controls are displayed in the panel The text "panel" is also being displayed.That should not be displayed how...
14
by: Adam Sandler | last post by:
I have a class with a method which returns a panel. The panel was not created with the visual editor, I coded it by hand -- because some of the content on the panel can be dynamic and thus I chose...
4
by: karthik25 | last post by:
Hi All, I have a problem in finding control in a dynamically created updated panel. I have given the code below. Following is just a starting effort in a completely dynamic user control. I am...
2
by: =?Utf-8?B?TUNN?= | last post by:
I have an asp.net page that contains an update panel. Within the update panel, controls get added dynamically. During partial page post backs the controls within the panel will change. I have a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.