Monday, March 18, 2013

Working with Toolbox DataSources

Current contract I am working a lot with legacy code and find myself going over a pattern to ensure the additions I add remain in-line with the legacy code.   Note the entire application is going to be re-written in about six months, so in order to save type by re-factoring I am simply following existing patterns.

Here is the key.

If a developer uses a Object or SQL Datasource you need to follow form the following:

1. ASP.NET (aka .aspx page control)
2. Next to the SQL or Object Data Source ensure the call to the SQL or OBJECT includes the data you need for step 1.

3. If you are performing OBJECT you need to expect the OBJECT that is being called to ensure the SQL or StoreProc is included for the data you need.

4. If SQL you need to ensure inline SQL is in place (Prevent Cross Site Scripting)

5. Then ensure the return to the control on the .aspx page.

6. Ensure all parameters in the INSERT, UPDATE, etc. Match the Controls #Bind("Naming_Structure") and to the object to the db, to keep things simple.


Follow the code from input to output....

No comments: