A
asadikhan
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.
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.