Wrox Programmer Forums
|
Visual Studio 2005 For discussing Visual Studio 2005. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 9th, 2007, 07:54 AM
Registered User
 
Join Date: Aug 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Resizing in Design Time

I am working on a web project that requires me to use a Web User Control.
I need the ability to resize this Web User Control in Design-Time.

I know there is a possibility for this, but how, what code do I use, and what steps do I take?



Thank You in Advance!

- Farside

 
Old August 9th, 2007, 06:42 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I don't think this is possible. The problem is that a web user control is really just a HTML container that itself does not have a contain object that is "editable". A user control could be nothing more than a single piece of static text or it could be a div tag with a whole page worth of content and controls. The designer can't know how to size it.

The best approach is probably to create a public "Height" and "Width" property on the control that map to the main HTML container element (for example a DIV tag) that is in the user control. You won't get design time support but it will work when run.

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Design Time Exception in WinForm doctorwcc VB.NET 0 March 2nd, 2007 04:00 AM
xxx_Init( ... ) design-time method? bradnerdhss BOOK: Professional Web Parts and Custom Controls ASP.NET ISBN: 0-7645-7860-X 3 August 8th, 2006 06:52 PM
Design-Time or Run-Time now ? ALGNET .NET Framework 2.0 1 July 31st, 2006 04:43 AM
Setting Design time property in webcustom control c_cicilia ASP.NET 1.x and 2.0 Application Design 1 September 23rd, 2004 10:35 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.