Hi,
I have created a Label dynamically the code is as below.
Label status = new Label();
status.Text.ForeColor = System.Drawing.Color.Red;
and error is coming as below:-
'string' does not contain a definition for 'ForeColor' and no extension method 'ForeColor' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?)
Loading

Guest UserPosted Jul 15, 2015, 3:56 AM
Rajeesh MenothPosted Jul 15, 2015, 4:00 AM
Merajuddin AnsariPosted Jul 15, 2015, 3:53 AM
status.ForeColor = System.Drawing.Color.Red;
Guest UserPosted Jul 15, 2015, 3:43 AM
status.ForeColor = System.Drawing.Color.Red;