Developer forum

Forum » Development » dw:CheckBox not always working

dw:CheckBox not always working


Reply
Hey

I have made a custom module, but I have problems on the customers live envisonment (build 18.15.0.0). The module works fine, but the checkbox value isn't saved.

The module _edit.aspx looks like this:
-----
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Ip2LocationModule_Edit.aspx.cs" Inherits="Ip2LocationModule.CustomModules.Ip2LocationModule.WebForm1" validateRequest="false" %>
<%@ Register Assembly="Dynamicweb.Controls" Namespace="Dynamicweb.Controls" TagPrefix="dw" %>
<dw:ModuleHeader ID="ModuleHeader1" runat="server" ModuleSystemName="Ip2LocationModule" />
<dw:ModuleSettings ID="ModuleSettings1" Value="TemplateSelector,DefaultRedirect,DontCheck,NoIndex,DontRedirect" ModuleSystemName="Ip2LocationModule" Runat="Server" />
<dw:GroupBox ID="GroupBox1" runat="server" Title="Settings">
<table style="width: 100%;">
 <tr>
  <td style="width: 170px;">Template</td>
  <td>
      <dw:filemanager id="TemplateSelector" Folder="Templates\Ip2Locationmodule" runat="server" />
     </td>
 </tr>
 <tr>
  <td style="width: 170px;">Default redirect</td>
  <td>
            <input id="DefaultRedirect" class="std" type="text" runat="server" />
        </td>
    </tr>
 <tr>
  <td style="width: 170px;">Allowed countries (comma seperated)</td>
  <td>
            <input id="DontCheck" class="std" type="text" runat="server" />
        </td>
    </tr>
    <tr>
  <td style="width: 170px;">Robot settings</td>
  <td>
            <dw:CheckBox id="NoIndex" runat="server" />Don't allow search engine crawling
        </td>
 </tr>
    <tr>
  <td style="width: 170px;">Automatic redirect</td>
  <td>
            <dw:CheckBox id="DontRedirect" runat="server" />Don't use automatic HTTP header redirect
        </td>
 </tr>
</table>
</dw:GroupBox>
---

In build 18.16.1.1 (my dev envisonment) everything looks and works correct and the checkbox is rendered like this:

---
<tr>
 <td style="width: 170px;">Robot settings</td>
 <td>
  <input value="1" type="checkbox" class="Clean" id="NoIndex" name="NoIndex"  />Don't allow search engine crawling
 </td>
</tr>
<tr>
---

In build 18.15.0.0 the <input...> don't have any id/name and is never saved.

---
<tr>
 <td style="width: 170px;">Robot settings</td>
 <td>
  <input  value="1" type="checkbox" class="Clean" id="" name="" >Don't allow search engine crawling
 </td>
</tr>
<tr>
---

Is this a but in build 18.15.0.0 or am I doing something wrong according to older versions?

Best regards
Lars Vistrup Skov

Replies

 
Nicolai Høeg Pedersen
Reply
18.15.0.0 is REALLY old - I do not have any thing in source control to check it out, but it is probably because it has been changed in newer versions.

Just change the dw:checkbox to a generic html control.
 
Reply
Hi

The funny thing is that DW is rendering the dw:checkbox - it's not unknown to DW but it's just rendering it wrong.

I can't do anything about the old version - the customer is hosting on their own and can't just upgrade due to a complicated setup...

- Lars

 

You must be logged in to post in the forum