What's the deal with Panel's and controls?

ImDaFrEaK

Well-known member
Joined
Jan 7, 2006
Messages
416
Location
California
Programming Experience
5-10
Everytime I add a panel to my form or use a control that has a panel built into it such as the LoginView Control I can't place more than one control on the same line. How come I can't place more than one control on the same line inside of a panel? This is really aggravating. I simply want my LoginView to have a label inside it that says, Welcome and then a UserName Control beside the label. So I would read "Welcome YourUsername". But instead it wants to put the username on the next line and so on and so forth. errrr.
 
Have you viewed the page in the browser and still have the controls on different lines?
I just plopped a LoginView on a page and put a label and textbox in it. In the designer the controls are on different lines but viewed in the browser, the controls are in the same line.
The Design view of Visual Studio 2005 doesn't always give you exactly WYSIWYG results especially with the newer controls in .NET 2.0. But the new version coming out is supposed to share the same designer engine as Web Expressions which does a good job of giving you WYSIWYG.

Another cause may be that you have some css style applied to the panel causing the child controls to be displayed as block instead of inline.

Sounds to me as if your using a flowlayout panel rather than a simple panel control.
Arkette may not realize that this post is in the ASP.NET section.
 
Nah, I just tested it on mine and it the controls were still on seperate lines. I verified that there were no line breaks in between them and resulted to a nother solution. Inside the LoginView I placed a table with rows for each new line of controls I wanted. The controls then were consistent with my design view and my browser.
 
Back
Top