WebDeveloper Database webform tables - Input version like gridview for output - asp.net

In visual Web devlepoer I have my database connection in my project if My project database has several tables that I want users to entered data to into my webform and be submitted to my database is there an easy way to replicate my tables fields in a form. Like gridview for input.
I can manually sit here and create tables and add textboxes etc in html but seems a little redundant when the tables are already visible in the database explorer.
Want to be sure I am not taking the long version of an easy process. There are plenty of easy forms and tables for viewing database data but what about for submitting it?

The back-end is completely Separate from the UI. At a later date it might be decided to group the fields in a different order, etc. Using a GridView only adds unnecessary overhead.
From a UI design perspective, you should not have too many form fields on a single page as the user is less likely to complete the form - basic usability issue. If this is the case, try splitting up the fields using a Wizard control and perhaps keep the user informed of their progress ( page 2 of 5, etc.).

Related

Design tips for a search engine in asp.net/asp.net mvc which vaguely resembles a sharepoint view

Guys i am looking for some awesome tips for developing a page which allows users to search for stuff from the db with the view restricted to only certain columns and the data grouped by and sorted by certain columns..
the source in this case is pretty easy to figure out which is a class which retrieves the search results...kapish..
the view in this case is giving me nightmares as i do not want to write that disgusting piece of code which many asp guys are seemingly used to...overriding row created and data bound of gridview etc etc.... i am thinking of simply rendering a html table itself with the necessary preprocessing applied at the datatable level(group by, sortby etc etc on the in memory object retrieved from the paged results)
i need to know if my thought process so far is right or is there a cleaner way of doing the whole thing in asp.net/asp.net mvc etc etc
Congratulations for not wanting to write "disgusting piece of code"... I spent a few years doing just that and the whole overriding row created / bound / etc. thing is a nightmare.
Your source is a class - great. My preferred method would be to go down the jQuery route, use the jqGrid and write an MVC controller that uses your custom class. Or you could dynamically generate your own HTML table but if you have a lot of data I would save yourself the time and explore jqGrid instead. It doesn't have to be MVC - you could embed it into a standard asp.net website, it's just that the MVC approach makes life easier if you have to expand your application to do more things.

Automate InfoPath form design tasks?

I'm currently designing a rather complex InfoPath form for a client. In the future, the client is going to need to be able update the form themselves, but the complexity of dealing with all the rules and conditional formatting is too much for them.
Is there any way for me to automate a routine design task in InfoPath designer, such as adding a few new fields and linking them to controls on the form?
Ultimately, it would be nice if my client could just type something in a text box and hit a button, then all the predictable and tedious design work to update the form would be done automatically.
Thanks
Use template parts. They can be created in InfoPath and are used for repetitive tasks where the same controls, data fields, etc are used over multiple forms. I believe they even include data validation, rules, and formatting. It is basically like inserting a mini InfoPath form into another one as a section. The help file in IP explains the steps but no code is involved and it is fairly easy.

Need help in design principles to implement a wizard interface then checkout

Well, I am trying to implement a wizard interface to help the user to choose the right service then add it to the shopping cart then possible checkout or discard.
This is similar to the concept of the t-mobile / att. Where we select the type of plan then the services we want ( minutes , data plan, mobile phone device then checkout) . The UI should be very web 2.0 like there would be help text , suggestions.. etc.
The technology is asp.net 4.0 (mvp - codebehind model)
I did a lot of research, looked around using state design pattern , commander pattern.
My thinking is like a pattern where we have a Wizard controller which controls the wizard steps then once done hands over to the checkout process the end user can always go back and change any options during the wizard. Incase if its a existing customer then we have to skip few steps as we already few details.
Its all custom UI, I was thinking to use asp.net mutliview and each view loads based on current and next step.
In Brief I am confused and need some directions
Be aware that the multiview actually loads all details behind the scenes, one reason I don't like using it.
You could easily just have several ajax update panels. Each is the step of the wizard and when you post each item, you hide that panel and show the next step and potentially update and step indicator you have on your screen.
You have several choices -
1. jQuery and ajax calls to load details into divs
2. update panels (as described above - my choice here)
3. wizard and multiviews - Im not a fan of using them. Certain customization issues exist with these built in controls at times and you need to be wary of certain details - like multiview actually processing all data for hidden items (if they contain queries this could significantly impact your system when you don't expect them to run and they do even though the view is hidden)

Dynamic forms, Table meta data

I am working with an ASP.Net web app that allows users to create an "application."
They define fields and their data types. Based on that, I generate a query to create a table.
I would like to use the metadata from the table to generate an input form to display to users.
Is this a good approach?
Has anybody done a similar project
that can share some lessons learned?
How about creating and altering
tables at runtime?
Does anybody see any problems with
that?
You will need to accomadate for all userdefined field types (text, number lookup, dropdowns, check boxes, dates, etc).
These will have to be save to the database per field type per user per forms.
Further you will have to allow the user to define their own layout. this will mean that you have to same the entire form layout, per user per form per control.
There are some apps available, that applies this logic, (I think SharePoint has this type of approach).
I have done this once before, but it was using WinForms, using XtraLayoutControl , DevExpress Layout Controls.
This did allow me to save the layout, but did not create the controls for me automatically. I still had to implement that my self.
If you have any specific questions, regarding db table layout, client integration, or performance of these queries, Please feel free to ask.

Design Modular Web Wizards using .Net 2.0 Wizard Control

We have about 10 applications that basically do the same thing, all written using the Wizard Control for .Net 2.0. The flow they follow is pretty simple:
1. User selects option from a drop downs.
2. Next page has more options more narrowed.
3. User sees confirmation page.
4. Report is generated.
Some of these applications have optional pages, such as allowing the user to upload custom images for the report and allowing the user to select specific lines of data.
I'm attempting to merge these applications, but I'm not sure I'm approaching this the correct way. My first inclination is to create configuration tables in SQL to drive the menus that appear. So, for example, there might be a table with the WizardId, Name, Theme, etc., also a table of steps, and another table to link everything together.
Is there an easier way to approach this that I'm just missing?
We've been thinking through this issue lately and I've come up with two options that both seem valid, just have different uses. One way to do it, similar to what you have described, is to create the following:
A table that holds the wizard information
A table that lists the types of questions to be asked in each wizard
A table to hold the data entered by the user for each question
This is very flexible, but the problem is you have to dynamically generate all the controls you need to collect the information (textbox, drop down, radio, file upload, etc) and store how to display that control in your database.
The other approach that we have tried out on a recent project is to associate a user control with either each wizard or type of wizard step. It isn't as modular, but you have a lot of control over how the controls are arranged and how you collect the data.
I think both approaches are useful in different scenarios. Going with a database driven approach allows you to generate new questions and wizards easily, but lacks the user friendly approach that we wanted for our new application.

Resources