1

I've downloaded DropDownCheckBoxList control from it's official page.
I've created new WebSite inside Visual Studio 2012 using File -> New -> WebSite and I added dll into references.

Then inside Default.aspx I've added this sample code:

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register TagPrefix="asp" Namespace="Saplin.Controls" Assembly="DropDownCheckBoxes" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"> </script>
    </head>
    <body>
        <form id="form1" runat="server">
            <div>
                <asp:DropDownCheckBoxes ID="checkBoxes2" runat="server">
                    <Style SelectBoxWidth="300" />
                    <Items>
                        <asp:ListItem Text="Option 1" Value="1"  />
                        <asp:ListItem Text="Option 2" Value="2"  />
                    </Items>
                </asp:DropDownCheckBoxes>
            </div>
        </form>
    </body>

</html>

After starting debugger my web site is displayed, but when using element inspector in Chrome I noticed that DropDownCheckBoxes isn't rendering value field for checkboxes:

enter image description here

Inside download package that comes with DropDownCheckBoxList is sample project, when I start it I can see that value field is rendered:

enter image description here

It's my fourth hour trying to figure out what is wrong with my code!
How should I create WebSite or WebApplication to have value field rendered?

Misiu
  • 4,738
  • 21
  • 94
  • 198
  • Isn't the control suppose to render the text in the `Text` attribute, but give your code back the value held in the `Value` attribute? – Sean Feb 01 '14 at 12:10
  • I used sample code that is available in download package. Here is link to official repo and souce: http://dropdowncheckboxes.codeplex.com/SourceControl/latest#SampleWebApplication/Default.aspx My biggest problem is to figure out why in project from download package I get value field and in project build from scratch this field is not there – Misiu Feb 01 '14 at 12:13
  • @Sean - Any ideas why I get different results? – Misiu Feb 01 '14 at 13:43

1 Answers1

1

After another 4 hour searching over SO I found awesome answer: https://stackoverflow.com/a/15030781/965722

When below entry is added into web.config value isn't rendered

<pages controlRenderingCompatibilityVersion="3.5">

So removing it instantly solved my problems.

Community
  • 1
  • 1
Misiu
  • 4,738
  • 21
  • 94
  • 198