2
Answers

position of control

Administrator

Administrator

22y
1.6k
1
How can I make it possible for a user change the position of a textbox at run-time. Which property should i use in the code?
Answers (2)
0
Administrator
Admin 2.3k 1.3m 22y
How to move Textbox in WebForm: // wc is a textbox string sLeft = wc.Style["LEFT"].TrimEnd('x').TrimEnd('p'); string sTop = wc.Style["TOP"].TrimEnd('x').TrimEnd('p'); int top= Convert.ToInt32(sTop); int left= Convert.ToInt32(sLeft); top += 100; left += 100; wc.Style.Add("LEFT",left.ToString()+"px"); wc.Style.Add("TOP",top+"px"); You can do this in PreRender. voila!
0
Administrator
Admin 2.3k 1.3m 22y
Properties: Top, Left or Location (for Window Forms). Location in source (for Web Forms). See help.