MVC 4 ASP.NET 4.5 dynamic form builder options? - asp.net-mvc-4

I have developed custom form builder type application using ASP.NET 3 years back. Now working on new project and it has similar requirement. I think there must be something new and easy to do same thing using MVC4 or ASP.NET 4.5 web forms. Any pointers?
Requirement in detail,
This is a web application
Authorised users login to web site and given the option to fill in the form
This form captures the information which then sent to third party
Third party keep reviewing their system and may ask for more details in future
My application needs modification to capture this extra(or say changing) information
Is there any way I can change only DB model to accommodate these extra fields and they will automatically appear on form without any code changes to UI or BL level?

I am not too sure what you are trying to accomplish but maybe this could help ?
http://lostechies.com/erichexter/2012/11/20/twitter-bootstrap-mvc4-the-template-nuget-package-for-asp-net-mvc4-projects/
Look at how they automatically generate the bootstrap views depending on which view model get's passed.

Related

Desktop admin panel for web app

I'm building a eCommerce web application for shops using Laravel/Foundation/PostgreSQL, and it will provide them (shop owners) with web based admin panel. My question is, can I make the super admin panel (the tool that I use to control everything) using desktop technology such as VB.net (or anything similar) so the desktop app control the database and maybe some configuration files. Is this considered good way to do things, and do anyone have a similar experience here?
Yes,it's possible to create such application.This kindda application can be called somewhat 'Database Applications'...Let me explain :
1 • You can develop such app in either C#/Vb.NET
2 • Basically, what you need is an app which will let you modify the database(e.g. Product name/Price/Quantity)
3 • For this, you need to first set up a connection between your app and your PostGre database.Take a look at [this)
4 • Then you can use textboxes,checkboxes,Listboxes and other controls you want to edit/delete/update the database . For this, take a look at this for inserting data and this for updating data .They are in c# but can easily be converted to vb.net using converter.telerik.com or simillar conversion tools
I guess that's all you need for now.Leave a comment for further assistance .

How to fill in VB form and send data to website fields

i once saw a friend of mine whom was very good at visual basics and asp as well as c#. At the time i had no need to learn VB as i found php enough for my needs. While now since ive been in developing for a longer time i see why people use c#. It has its special place. My question relates to one of these special cases.
However i need your help to figure out how it was done.
What my friend did:
I had a wordpress site at the time. Because of our clients, we didnt want them to login backend and fill in the fields in the CMS. We wanted a deployed executable exe that the clients could install on pc and fill in the required data in simple forms that wont confuse them. Once the form was complete they would post the data to the wordpress cms in the background not visible to them. Using a webbrowser in the exe is what i recall my friend doing.
What i want to do:
I want clients to fill run an exe. They would then need to add login details to validate themselves. Once they logged in i want a very simple form that provides the necessary fields that the cms needs to fill in which will complete the post needed to render their page or profile on the actual website. In other words i want VB to connect to my website from a exe using forms to fill in data rather than going to the cms on a normal chrome or explorer browser.
I know you wondering why i want this. It seems like one hell of a work around. Well im a php developer whom needs a exe. I want to be able to package the exe physically in our portfolio when we hand it to clients. It becomes part of our presentation and welcome pack when joining out system.
This will help us when it comes to clients whom are not able to navigate a complex cms. If we make the cms to simple and old fashioned ( what clients generally are used to ) then we would have developed an outdated application in 2015 haha. Hence we want the best cms with modern features for the future, yet still need the old fashioned forms and simple structured date capturing clients are used to.
What you can help me with:
If i had a login, title and mobile number as the fields in my cms. The title had an ID named title and mobile number has an ID named Mobile. How can i do exactly what my friend did to login, and fill out forms then post the filled out form to my website cms that makes the post live. Please assist,:)
Kind regards
Basic solution will be using a webbrowser control with visibility=hidden. Now Just change the value of some elements and invoke submit(). If you can't understand i will explain in details.

MVC4 and Simplemembership

I am somewhat of a novice application developer, certainly very new to MVC4 and have been through a number of handy tutorials to learn the core principles of MVC. I do get lost with terminology as someone who is entirley self taught.
I am trying to replace an application I wrote previously that uses ASP.net membership which I was able to create myself. This application is an issue logging and reporting system that does a lot with an SQL database.
I have no concern dropping all the users and rebuilding the user database in the new simplemembership provider. Although, I am not sure where to start.
I feel as though using the ready made "internet application" template means I end up with loads of files / folders I do not need (or understand), so my question is, how to I start with MVC4 and simplemembership, ideally without using the "internet application" template.
Thank you.
The Internet template does not add that many unnecessary files. It will add controllers, views, and models you will need for handling user log-on and registration. If you start from an Empty MVC project you will have to create these items from scratch. If you want to start from scratch I would take a look at the open source project SimpleSecurity that decouples SimpleMembership from your MVC application. There is an article here that describes this approach which will make it easier to incorporate SimpleMembership into an Empty MVC project. You can look at the example in the SimpleSecurity project so you can copy the controllers, views and models you will need. The example adds email confirmation and other features that are not available in the Internet template.
There are some unnecessary files, but it depends on how you define "unnecessary".
If you don't care about signing in with a facebook or google account, and you don't care about WebApi, and you don't care about knockout.js and other stuff, you're free to delete it. You can use Nuget to uninstall the Webapi stuff. And you can also remove the OpenId stuff, but you will have to modify your AccountController to remove the code that makes use of it.
It would help if you could ask specific questions.. vague questions like this are hard to answer because we don't know what's unnecessary for you.
Thanks for your help, I know my question was vague, but I was only able to build my new site from an empty template by following this guide.
I have changed a few things (i.e. an instance of SQL rather than local DB) and it all worked.
How to add ASP.NET Membership Provider in a Empty MVC 4 Project Template?

is an ajax call after rendering an mvc view duplication

I'm going to be developing a new system and am toying with the idea of either creating a single page application or a full asp.net mvc website.
I want to utilise knockout so if I went down the mvc route i'd need to load my mvc view and on document ready then make the ajax call to bind to my knockout view model.
Is this a bad approach as i'm effectively making 2 calls to get one page?
Depends really on your exact page design and behavior.
But generally MVC and knockout do not require you to get the data via ajax, you can populate your data from the server then manually apply bindings to your observables.
saving the data could be done via ajax.
Of course its all theory now, you need to see your screen designs and check which way to go.

Server side validation in Asp.net MVC4

I am trying to build a website using ASP.Net MVC, where in I need to dynamically display N number of controls of different kind, and validate them.
My approach is to add them to a partial view using a html helper extension which is working well. But I am clueless on how to perform server side as well as client side validation for the same.
Please help me with suggestions on this.