I am using asp.net/C# ,, i have a form with many fields ,,, it is a registeration form of a bank ... currently i usd css to move and align fields on the form ...i didnot use the drag n drop feature .... My question is what would be the best way to manage such forms .. currently my form doesnot look organized... Should i use absolute positioning and align all my fields by dragging them .... Please suggest me the proper way of aligning and organizing such fields.
Thanks
Simple semantic html - validated of course
with css for styling is the recommended way.
Regarding absolute positioning or not - that depends.
There are lots of example CSS Form sites, with examples and source code. I suggest you look there.
If you have a huge amount of fields you can break the page up into smaller pages (save each segment, allow back and next). If you are feeling brave you can use the Web Forms Wizard control - but I wouldn't personally as Web Forms has a way of turning on you.
Related
I have been doing typical menu from code behind where i just show and hide divs based on their role but code becomes very long cause i have to hide every single div of each role for each user.
My question is... Is there a better practice to do this? I also just found out about Login View, is this the way to go in Web Forms?
Your code behind should not take the responsibility of altering how the View is displayed, that's the job of the view (and that's why asp controls exist).
One approach would be to have a logic that builds up a List and this list is passed as DataSource of an asp control.
Actually there's a good control that allows you to iterate a collection of elements defining a display template for each element in that list, here you can find the details:
https://learn.microsoft.com/en-us/dotnet/api/system.web.ui.webcontrols.repeater?view=netframework-4.7.2
I hope this sets you in the right path.
A common way to do this is in a WebForms app is to use a SiteMap.
A site map can be linked to roles, so that only those elements that are accessible for a user's roles are displayed. And recent versions can be made to display reasonable cleanly, as divs that can be styled how you want (the original version generated a lot if inline styles).
For an MVC sitemap there are similar solutions, such as this one.
Can anyone offer any insight into how I can show the body content and the form of the same webform node on separate pages?
My Drupal site has webform nodes which all have alot of body content and equally long forms. As a result, the entire combination seems complex and not very user friendly.
I need to find a way to keep both aspects associated to the same node but create distinct viewing areas for each half.
ps: Apologies if there is a module for this. I googled very quickly and may have missed it.
Display Suite can reorganize your whole node layout. you can add views, block and even custom code.
fieldgroup you can split large forms or views in the manage display section of your content type.
hope it helps
PR
With VS 2003 we were used to desing the web forms quite similarly to win forms: the Textboxes, Labes, Buttons etc. were positioned with absolute coordinates (inline css) in divs with ms_positioning="GridLayout".
With VS 2010 this way of designing web forms seems to be gone (at least it can no more be used to get the design finished quickly) and the use of absolute coordinates and inline css is considered obsolete anyway.
I would like to get some hints how to design web forms like the one in sample screenshot the "correct" way.
I would like to preserve following important things:
One should be able to quickly / easily add, remove or move the form's controls while maintaining the overall look and feel of the form - our web forms tend to change / grow over time as customers' requirements change.
The form should not crumple together when the user reduces the width of the browser window - the form width should not descend under some minimal value.
I am considering using html tables, but for example for the Address-Block on the sample screenshot I would have to have a table with 9 columns (one for every vertical boundary) and use lots of colspans - not neccessarily the fastest way of designing the forms considering future changes. And I heard in 1999 or so that the html tables were obsolete.
I read I should use divs and css for pretty much everything but I am unclear in how to create a web form like the one on the sample screenshot without providing absolute positions and sizes some way or other.
Any hints will be greatly appreciated.
Thanks in advance
Best Regards
Erich Horak
I would divide up your three main sections into divs, then tackle each section individually. My main tool when approaching this is the Web Dev Toolbar. I use it to view markup and CSS of any form I locate online that I like the look of:
https://addons.mozilla.org/en-US/firefox/addon/web-developer/
(CSS -> View CSS and CSS -> View Style Information (hover mouse) are helpful drop down options)
Forms are created with CSS mainly through the use of label and input classes:
http://speckyboy.com/2011/05/24/css-form-templates-tools-services/
Your form looks difficult at first glance, but when you break it down it really isn't that hard to do. The link above has samples - simple like you mentioned - but simple or not, the CSS is the same.
I am developing a website with drupal 6, and using a 960 grid system based theme.
I want to create a dynamic thumbnail gallery with Views, and using this jquery effect:
http://www.queness.com/post/590/jquery-thumbnail-with-zooming-image-and-fading-caption-tutorial
I have some experience with views, but I am by not means an expert... I am facing two problems here:
How to make the views html output
conform to my 960 grid system theme
(that means that each object in the
views output should have a grid-x
class, at the very least)
How to adapt the views html output to
the DOM required by the jquery effect I want to use.
So what I want is basically more control over the output of Views. Right now I can only get html lists or tables. Is there anyway to use a more customized DOM and put some kind of placeholders for fields in it?
Thank you for reading
O.
You can define your own templates, that Views will use instead of its default ones.
In those template, you can use almost any kind of HTML markup that you possibily can imagine -- which means you'll be having a really great level of control over the output.
For more informations, you can start looking at this question and its answers : Drupal 6: How to quickly theme a view ?.
And a couple more links that might be useful :
Drupal 6 theme guide
Overriding themable output
Views help index
Yes that sounds backwards. I want to create an area or frame in my Silverlight app to host another page from my site. I've seen it done before but I can't seem to find any examples.
This way I can control the entire page layout using SL but still use existing aspx pages.
thanks
Yes, it can be done and its quite easy to do. I plan on blogging about my HtmlBrowser control and posting the source. The basics are to make sure the Silverlight control is hosted with the isWindowless parameter enabled and then you can at runtime through the HtmlPage class create an IFRAME element and set the src attribute to the HTML page location. The fun part is getting the sizing right, but its not too difficult.
Follow my blog http://craign.net/ over the next couple of days as I'll post my control.
Will frame break out code break out or not when using this technique.