I am creating a lot of custom web forms, and would like a program that I could easily setup to autofill those fields. These forms are really long, so it is a pain to开发者_如何学编程 re-enter the data.
Please note, this is for development only
If you want to do this without outside test software, simply use a the DEBUG constant. Place this code in your Page_Load or other function called by Page_Load. It could be time consuming to initially set up, but it keeps your debugging values within the source code, hence within source code control.
#If DEBUG Then
txtFirstName.Text = "John"
txtLastName.Text = "Doe"
' etc.
#End If
When you do a Release build, the code above will not be compiled into the web application.
Try the Selenium plugin for FireFox. You can easily create a test which will populate the form for you.
The ability to pre-populate forms depends on what browser is being used, so that wouldn't be a reliable option. Even in intranet environments, where everyone has virtually the same setup, it can still be unreliable. The user should also have the choice of whether or not they want to install an auto-fill plugin.
What you can do is optimize the entry so users can move through the form efficiently. There are a lot of ways to skin that cat, but you might look into using a combination of auto-complete extenders, searchable lists, etc. Also make sure that users can tab through the fields in logical order, and make sure to populate everything you can for the user. For example, if the user enters a zip code, populate the city and state.
Hope this helps.
精彩评论