Auto Shrink

  • Thread starter Thread starter Gunawan
  • Start date Start date
G

Gunawan

Hi All,
I am new to ASP.NET programming
Suppose we have three text box

TextBox1
TextBox2
TextBox3

When I set visible property of textbox2 to false I would like to have this
view

TextBox1
TextBox3

Instead view on the below

TextBox1

TextBox3

What property on any trick to do that? Thanks.

Regards,
Gunawan
 
Sounds like you're in .NET 1.1. That uses a very inappropriate and
useless positioning scheme knowing as absolute positioning. That's the
default at least. You can change that to the flow layout, which is
what you are supposed to use. Then, you should learn CSS (I recommend
people master xhtml/css before they ever look at ASP.NET)
 
I use .Net 2.0 that come with Visual Studio 2005

There is Layout> Position on the menu and still can't figure out how to
solve this issue.
 
If u r using asp.net 2.0 then it uses Form layout. I think the problem
here is that pressed enter key and entered the new textbox. If u'll go
to ur HTML view then u'll notice ur textbox to be like this:

<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
<br />
<asp:TextBox ID="TextBox5" runat="server" ></asp:TextBox>
<br />

Even if u set visibility of TextBox5 to false it'll still occupy some
space. To avoid this put the textbox inside a Table and then set the
visbility to false. That should resolve ur problem.

HTH
 
Back
Top