Disable 'website'-field in comments

Topics: ASP.NET 2.0
May 17, 2010 at 9:17 AM
I am getting a lot of comments in my blog at the moment that only seem to be posted to mention a website in the 'website'-field. The comment itself doesn't contain links to websites, but just the website-field. Is there a possibility to disable this field? I have searched, but didn't find it.
May 18, 2010 at 1:16 PM
Edited May 18, 2010 at 1:16 PM

As far as I know that's not a required field, so you can probably just set the relevant elements on the CommentView.ascx (in User Controls) to not be visible.

<asp:TextBox runat="Server" ID="txtWebsite" TabIndex="4" ValidationGroup="AddComment" visible="false" />

(You may also need to set it for the label element above it)

May 18, 2010 at 1:33 PM

Thanks for your reply. I will look at your suggestion. Making the field invisible might not be enough as I suspect them using special software to create these comments on my blog. Anyway, I now know where to find it and will see what happens if I remove these lines and report back here.

May 18, 2010 at 9:23 PM
Edited May 18, 2010 at 9:25 PM

Another idea is to use a added validator when a comment is entered. Make the comment field required or if it's a bot, check the e-mail used and block it.