Comments can sometimes cause problems because a form value won't be submitted at all if commented. This for instance can blank out a value which was already set, or result in errors when updates are applied. You should get the desired results and universal functionality by using hidden DIV's instead:

   <DIV STYLE="visibility: hidden;">
   code you want to hide
   </DIV>

Matt


Tyler Jensen wrote:
Thanks Marc! I will play around with it and I appreciate the explanation.
Happy New Year! Tyler

------------------------------------------------------------------------
*From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of *Marc Rosamond
*Sent:* Sunday, December 30, 2007 3:50 PM
*To:* [email protected]
*Subject:* Re: [IMail Forum] Preferences in 2006.23

All you need to do is put html comment tags around whatever part of the user options page you do not wish users to be able to change. Below is an example of how you would do this. Please note that this is just an example of the technique to use and not the actual code that needs to be commented out.

<!--
<tr>
<td class="header3Cell" colspan="3"><span id="lblUserOptsChangePwdText">Change Password</span></td>
    </tr>
/-->

The html comment tags are <!-- and /--> and as you can see in the example above, I have added them in front and behind the <tr> tags. This will effectively hide this part of the page from the user. The old user options page you used before will not work because there are new ASP.Net controls on the new one that the code is looking for. Because of that same reason, you cannot simply remove pieces of the page that you don't want shown and must instead use html comment tags to hide the parts you do not wish to be shown. I hope this helps to explain what needs to be done. If you look at the actual user options page, it should be apparent which parts need to be commented out to accomplish what you are hoping to do.

Thanks,
Marc Rosamond
Senior Web Developer - Ipswitch, Inc.

-----Original Message-----
From: "Tyler Jensen" <[EMAIL PROTECTED]>
Sent 12/30/2007 2:04:42 PM
To: "Ipswitch IMail Mailing List" <[email protected]>
Subject: [IMail Forum] Preferences in 2006.23

Hello and Happy Holidays.
I just did the upgrade to 2006.23 from 2006.04 and all is working except it overwrote my previous useroptions.aspx. I am not a web developer or coder of any sort so my asp skills are zero. With my old useroptions.aspx I had someone "comment out" the change password feature so it was grayed out and user could not change their password. I need to do the same thing on the new useroptions.aspx. I would also like to disable the Forward To: option as well because I don't want my users to be able to forward to a different account. I tried replacing the new useroptions.aspx with the old on and it didn't like that. If anyone has any ideas on what needs to be modified to disable password change and forward to capabilities I would appreciate you help very much!! Thanks!! Tyler

Reply via email to