Tuesday, June 8, 2010

Progress on the Membership Application

I made progress on the Membership Application this morning!

I managed to reclaim my source code by using a free program called Reflector by RedGate. This program de-compiles your .net classes.

So I made a copy of my old project and copied the updated code into it. I also copied the aspx page source from the published project and changed the page tag to include the code behind file and removed the compiled file from the inherits property.

Unfortunately, Reflector does not retrieve the cleanest code. Though it keeps the names of the methods and form control names, most of the variables are now "Item" or "Num". You also need to either import the VisualBasic Compiler Services or change the data type conversions in the class you copied over.

Since I only copied over the methods for my Form page, my project was now missing a lot of the back end code needed for form control events. I had to re-associate the form controls the event methods again. I was lazy and just double clicked on the form control and copied the code into the new method.

Now that my project is back to where it was at the end of May, I can move on. I am working on creating Stored Procedures in my test database to access as SQL parameters in my asp.net project.

I haven't used this technique before; my past projects have just used SQL, which leaves myself open to SQL injection attacks. None of those projects are live anymore, thankfully. But I am looking forward to learning something new!

No comments: