Yesterday, I got an email asking this question.
The LEFT and TOP attributes in the following code sets the left and top positions of a control. You can call this code from any where in your code.
For example, if I have a Calendar control and want to change the position of the control dynamically, this is the code I need to add.
Calendar1.Attributes.Item(
"style") = "Z-INDEX: 176; LEFT: 584px; POSITION: absolute; TOP: 176px"
Kumar SambhavPosted Sep 13, 2012, 7:58 AM
Calendar1.Attributes.Add("style", "Z-INDEX: 176; LEFT: 584px; POSITION: absolute; TOP: 176px"); But this codding is working properly.
Kumar SambhavPosted Sep 13, 2012, 7:57 AM
Calendar1.Attributes.Item("style") = "Z-INDEX: 176; LEFT: 584px; POSITION: absolute; TOP: 176px" This code is giving error : 'System.Web.UI.AttributeCollection' does not contain a definition for 'Item' and no extension method 'Item' accepting a first argument of type 'System.Web.UI.AttributeCollection' could be found (are you missing a using directive or an assembly reference?)