views:

130

answers:

3

I have a web page that has a web form for signing up. I want to remove fields. I've tried removing the field code from the .asp file but obviously there are other things that I need to remove along those lines. I have full access to all the code but I need help knowing where things are linked as far as making the form work again. Our programmer bailed.

A step by step guide would be great on this. thanks.

+2  A: 

If they're just .ASP files, you should be fine removing the field tag, along with any references to it.

I.e. you'd delete this line:

<asp:TextBox id="text1" runat="server" />

and do a search for the 'id' attribute in the rest of the file (a find on 'text1' in this case), and remove those lines.

John
For a quick fix, this is the way. You'll want the replacement programmer to look over both the original and the cut-down version to make sure you didn't introduce any side-effects though.
Jimmy
You can do a "Find All References" in VS2008, I believe. That feature is undeniably valuable. That will help reveal any linkage to the code behind, or other files. The simple textual find will also help if you're referencing it in a CType or Ajax control.
Abyss Knight
A: 

If everything to do with that for in in the same ASP page, it's easy. You can do a simple text search for the names and/or IDs of each form field. Sometimes they're referenced in a javascript block, so you'll have to comment-out some of the form validation code referencing those fields.

If they've used some dumb Dreamweaver script for all this - good luck!

If there are #include statements, or references to external JavaScript files it's more work - you'll have to trace through them as well, hoping they don't have their own included files as well.

Diodeus
A: 

After removing the input parts of the markup, if it is a .asp (assuming asp v3 instead of asp.net) it is also worth going through the <% %> tags part of the page to look for references to the removed inputs. If it's asp.net then check the vb.net / c# code in the script runat server block in the page, or look in the code behind file for references and recompile.

WestDiscGolf