ASP.NET
-
How can I change the place of a control (for example textbox) in the page programmicaly? Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
Wish You Were Here-Pink Floyd-1975 -
If you are using ASP.NET TextBox control then *I believe* you can use its style property (I have not done that, yet). omkamal
In web application when you put a control in one place then you can't change the place or size of it and all of them are fixed? Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
Wish You Were Here-Pink Floyd-1975 -
In web application when you put a control in one place then you can't change the place or size of it and all of them are fixed? Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
Wish You Were Here-Pink Floyd-1975Mazdak wrote: you can't change the place or size of it I dont think so. Just try to create an example like this... Create an . Then in your code-behind page you can always do the following... TestLabel.Style["Top"] = "200px"; //or whatever value you want to use... This will certainly work. Nonetheless, I am not sure about a TextBox. omkamal
-
How can I change the place of a control (for example textbox) in the page programmicaly? Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
Wish You Were Here-Pink Floyd-1975Simply add the control to the Controls collection of a different control on the page.
-
Simply add the control to the Controls collection of a different control on the page.
Andy Smith wrote: Simply add the control to the Controls collection of a different control on the page. Sorry could you be more specific?I didn't get it.:confused: Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
Wish You Were Here-Pink Floyd-1975 -
Andy Smith wrote: Simply add the control to the Controls collection of a different control on the page. Sorry could you be more specific?I didn't get it.:confused: Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
Wish You Were Here-Pink Floyd-1975Well, I guess it depends on what you mean by "place of a control". If you mean moving it a few pixels to the left or right or something, then use the Left and Top properties. If you want the control to be in a different place in the page structure, then add your control to the Controls collection of a different, container control. A good one to use for this purpose is the PlaceHolder control. It would look something like this: TextBox myTextBox = new TextBox(); myPlaceHolder.Controls.Add( myTextBox );