Guys, the problem is a required field validator.
It is push the next lines down.

Thanks!


"Fernando Lopes" <fernandomattarlopes[remove]msn.com> wrote in message
news:#wzhhgMJFHA.2604TK2MSFTNGP15.phx.gbl...
Hi ALL!
So, i'm developing a custom control and this control must has 2 textboxes
and 1 button.
The control works ok, but i'm getting some troubles in the layout.
Like you can see in picture bellow, the custom control put a space between
its and the after line



In the control, i render a table with cellspacing, cellpadding and border =
0 in its attributes, like the following code:

protected override void CreateChildControls()
{
Table table = new Table();
table.Attributes.Add("cellspacing", "0");
table.Attributes.Add("cellpadding", "0");
table.Attributes.Add("border", "0");
TableRow tr = new TableRow();
TableCell tdTxtID= new TableCell();
TableCell tdSearchButton = new TableCell();
TableCell tdTxtDescription = new TableCell();
Controls.Clear();
tdTxtID.Controls.Add(txtID);
pickButton.CausesValidation = false;
pickButton.ID = "pickButton";
pickButton.BorderStyle = BorderStyle.Solid;
pickButton.BorderWidth = Unit.Pixel(1);
pickButton.Width = Unit.Pixel(17);
pickButton.ImageUrl = "~/Images/ico_search.gif";
pickButton.Height = Unit.Pixel(15);
pickButton.Click += new ImageClickEventHandler(pickButton_Click);
tdSearchButton.Controls.Add(pickButton);
tdTxtDescription.Controls.Add(txtName);
tr.Cells.Add(tdTxtID);
tr.Cells.Add(tdSearchButton);
tr.Cells.Add(tdTxtDescription);
table.Rows.Add(tr);
this.Controls.Add(table);
}

Thanks for ALL.

Rgs.
Fernando Lopes