I am just starting out with MS Visual Studio 2010 trying to develop an asp form. As shown in the code attached, I have 3 text boxes and multiple labels all on a single line.
I want to know how to align the text in the boxes to the RIGHT because they will use numbers.
Also, I included a separate label for each that has one character: * and I set the property of these as RED. but when I run this code the * are the same color as the rest of the labels.
Any guidance would be helpful.
OK, thanks, That worked.
But, before I accept this solution can you tell me if the only way to do this is by hand coding or can this be done by setting properties the way most stuff in Visual Studio is set?
PagodNaUtak
You can change the forecolor of a label by perfroming the code below:
click on the label then right click select properties. On the properties toolbar select forecolor then select your desired color on the list.
But for changing the text alignment is done only in code.
PagodNaUtak
You can change the forecolor of a label by performing the steps below:
•click on the label then right click select properties. On the properties toolbar select forecolor then select your desired color on the list.
But for changing the text alignment is done only in code.
I have tried setting the forecolor property of a label as you describe and it doesn't work. I would expect that following your directions I would see the code change and it does not.
I read the article and it says the same thing you described regarding the forecolor property. My only point is, it didn't work like that for me. Changing the forecolor property of a label (even a new on I added as a test) did not change the code nor did it change the output when I ran the page.
But, before I accept this solution can you tell me if the only way to do this is by hand coding or can this be done by setting properties the way most stuff in Visual Studio is set?