About the control positioning in asp.net
-
Hi all I am a new user of dotnet I want to set the default setting of control so that I can paste the control any where in asp page
-
Hi all I am a new user of dotnet I want to set the default setting of control so that I can paste the control any where in asp page
I suspect you're used to winforms. ASP.NET generates HTML, which is a flow design. It's not about pasting a control into a specific location, you design the flow of your page. You can use CSS to position things, but absolute positions, while possible, are generally a bad idea. Your site should work to fit any users screen resolution.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Hi all I am a new user of dotnet I want to set the default setting of control so that I can paste the control any where in asp page
if you are talking about visual inheritance in windows forms application then you need to understand asp.net masterpages.. as far as user controls are concerned you create and place where ever you want....and for positioning you can have style sheet and themes for server side control at a common place..
Government Dyal Singh College Lahore.
-
Hi all I am a new user of dotnet I want to set the default setting of control so that I can paste the control any where in asp page
There are a few ways of positioning controls. As mentioned in the previous replys, your best bet is to use a style sheet(css) to position controls on your web page. 1)You can create tables with rows and columns and basically just drag and drop controls into table cells and let them postion themselves but I don't recommend this. You'll run into a ton of cross browser positioning issues. 2)Use the cssClass attribute of your control and assign it to a class in your style sheet. Your css class can be set to postion a control relative to other controls on your page, or set you control to an absolute position on the page. Personally I like using relative postion to something like a main div on the page. Using relative postion will keep your controls in the same spot relative to the main div when a user resizes the page. Using absolute position will leave a control in the same spot when a user resizes the page. You might want to play around with both till you get comfortable... Css examples: .relativeControl { display:block; postion:relative; top: 100px; left: 100px; } .absoluteControl { display:inline; positon:absolute; z-index: 100; top: 100px; left: 100px; } I hope this helps. Have fun :)