Making objects move along with resizing browser page ?

W

WJ

What controls needed to cause the entire page moves along with the
"resizing" of the web browser (left/right)?

Example: Click here http://www.google.com, when Google main page is
displayed in your browser, then try to resize it horizontally, notice that
all the objects inside the page also move along while you are resizing your
browser. I would like apply ther same effect in Asp.Net form.

Thanks for your help,

John
 
W

WJ

"Eliyahu"

I does not work. FlowLayout only work during design mnode, not exeute mode.

Thanks,

John
 
E

Eliyahu Goldin

I think you should be only happy to know that you are mistaken. In HTML
world flow layout is called relative positioning, as opposed to absolute.
This is the default positioning mode. Open that google page you like, right
click the mouse and select "View Source". You will see the html code for the
page. If you don't find any mentioning of positioning, that means it is
relative.

Eliyahu
 
E

Eliyahu Goldin

Ok, you have to know another magic word. That's "table". You can manage flow
layout nicely and easily by putting everything in html tables.

Eliyahu
 
W

WJ

Thanks Eliyahu for your reply. Yes, I always use HTML/Table controls to
format complex forms. What I did not do was to set the "Align" property to
"Center". As soon as I set this property to each Table in the form, it works
like a charm :). I hope MS improves the current VS/IDE better in the future
versions.

John
 
T

Tampa.NET Koder

Let's see some of your HTML you have. You may be doing your layout
incorrectly
 
W

WJ

Hello "Tampa.NET Koder said:
Let's see some of your HTML you have. You may be doing your layout
incorrectly

It is working now. I just had to set the Align property of the Html Table
control to "Center" to have the Google effect:

************
<%@ Page language="c#" Codebehind="pLayOut.aspx.cs" AutoEventWireup="false"
Inherits="pLayOut.pLayOut" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>tt</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="300"
border="1" align="center">
<TR>
<TD>
<asp:Label id="Label1" runat="server"></asp:Label></TD>
</TR>
<TR>
<TD>
<asp:Button id="butXMLGener" runat="server" Text="Write
XML"></asp:Button></TD>
</TR>
</TABLE>
</form>
</body>
</HTML>

************

John Webb
 
W

WJ

Steve C. Orr said:
I'm not surprised that you've been confused by all the control positioning
options in ASP.NET. There is a lot of confusion about this, which is why
I wrote this article on the subject which will hopefully clear things up:
http://www.aspnetpro.com/NewsletterArticle/2005/04/asp200504so_l/asp200504so_l.asp

Thanks for the link, the article addresses the issue but it is indeed wordy
:), most of us would love to see just a three steps wizard (with picture be
helpful) document to demonstrate a design strategy . For example, I know
what is "FlowLayOut", and I set the Document property to FlowLayOut, then
the system should have arranged all the objects on the form for me based on
the LayOut I select, instead, it does not do this and this is the confuse
part. On top of that, I do not want to switch to HTML to tweak things
around, that is not my expertise. All I need is to set a property of any
controls on the webform using the Property dialog. Please bring this to Bill
Gate Team.

Thanks

John
 
S

Steve C. Orr [MVP, MCSD]

Sometimes complex things need lots of words to be described.

I understand you are saying it seems like a simple thing, so it should be
simpler to program than it is. I'll tell Bill Gates next time I see him.
;-)

If you've got left over unwanted positioning on your FlowLayout controls and
you don't want to strip them from HTML view then just delete the control and
drag a new one onto your form.
 
W

WJ

...then just delete the control and drag a new one onto your form.

Not as simple as it sounds! Example: A control with code behind (Event):
When deleted, all code behind may also be deleted and or you forget the
previous control name (ID) and then name the new one differently, then the
event will not fire or fired with a previous ID.... Yes it is easier to
clean up and spot them if your program is small enough. Sometimes, I delete
a control, save All, create a new control, save all and for some odd
reasons, the intellisense does not show up, I have to quit VS and come back,
then it shows up. Very weird behavior.

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top