Is that language vb.net?? Only reason i ask is the ‘Then’, anywho…. What are you trying to accomplish with two ID’s? I think you misunderstood what toggleClass does, and from what i see in your ASP is you are trying to switch the ID’s rather then the classes?
Are you wanting this operation to happen on the server side rather then through JS?