Why do my extensions disappear when I customize the code?
I'm sure that it's happed to everyone, an extension does Almost what you need it to. So you, being the crazy code warrior that you are, breaks open the code view, and adds that extra if statement to the code... so you test it, and it works. You are the king, until you have to edit a property of the server behavior, boom, it's gone from the list...
what ever shall you do!!!
The reason for this, is that the Server Behavior list is built by UD checking against a set of regular expressions that find the SB's, then adds them to the list.
Once you go changing the pattern, it can no longer find it. So how do you get around this you may ask...
Don't touch the code!!!
The technique that I use (in ASP) is just adding the code in separate code blocks... take this example code...
<%IF myVar <> "" THEN%>
<%
'extension code would be here... this could be a recordset, a command, anything
%>
<%END IF%>
as you can see... I added an IF THEN statement to the extension code, without actually touching it... that should get you through alot of situations.
hope that helps someone,
Joel Martinez
Comments
Be the first to write a comment
You must me logged in to write a comment.