A
aidancasey
I have written a custom control called CheckboxDataList that derives
from the DataList webControl.
My control contains a public property called CheckedValues. The type of
this property is a generic <List> of strings
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
namespace BFarm.WebControls
{
public class BfarmCheckboxDataList : DataList
{
public List<string> CheckedValues
{
//
//
}
}
My control is defined as follows on my webform
<%@ Register Assembly="ControlLibrary" Namespace="ControlLibrary"
TagPrefix="cc1" %>
<form id="form1" runat="server">
<cc1:CheckboxDataList ID="BfarmCheckboxDataList1"
runat="server" RepeatColumns="14"
RepeatDirection="Horizontal" RepeatLayout="Table">
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat='server' />
<asp:Label ID="Label1" runat='server'
Visible="false"></asp:Label>
</ItemTemplate>
</cc1:BCheckboxDataList>
</form>
I am using the designed to generate the local resource files fro my web
form ( in design view navigate to Tools and click on Generate Local
Resources).
The IDE seems to think that the property of my control CheckedValues
should be localised and it adds the following code to my webform
CheckedValues="(Collection)"
<cc1:BfarmCheckboxDataList ID="CheckboxDataList1" runat="server"
RepeatColumns="14"
RepeatDirection="Horizontal" CheckedValues="(Collection)"
meta:resourcekey="BfarmCheckboxDataList1Resource2" ReadOnly="False">
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat='server'
meta:resourcekey="CheckBox1Resource2" />
<asp:Label ID="Label1" runat='server' Visible="False"
meta:resourcekey="Label1Resource2"></asp:Label>
</ItemTemplate>
</cc1:CheckboxDataList>
How can I prevent the ide from generating this code and how can I tell
the IDE not to treat this property as something that should be
localised?
I have tried decorating the property with the following attribute
[Localizable(false)]
But it does nothing
Help !!!
from the DataList webControl.
My control contains a public property called CheckedValues. The type of
this property is a generic <List> of strings
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
namespace BFarm.WebControls
{
public class BfarmCheckboxDataList : DataList
{
public List<string> CheckedValues
{
//
//
}
}
My control is defined as follows on my webform
<%@ Register Assembly="ControlLibrary" Namespace="ControlLibrary"
TagPrefix="cc1" %>
<form id="form1" runat="server">
<cc1:CheckboxDataList ID="BfarmCheckboxDataList1"
runat="server" RepeatColumns="14"
RepeatDirection="Horizontal" RepeatLayout="Table">
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat='server' />
<asp:Label ID="Label1" runat='server'
Visible="false"></asp:Label>
</ItemTemplate>
</cc1:BCheckboxDataList>
</form>
I am using the designed to generate the local resource files fro my web
form ( in design view navigate to Tools and click on Generate Local
Resources).
The IDE seems to think that the property of my control CheckedValues
should be localised and it adds the following code to my webform
CheckedValues="(Collection)"
<cc1:BfarmCheckboxDataList ID="CheckboxDataList1" runat="server"
RepeatColumns="14"
RepeatDirection="Horizontal" CheckedValues="(Collection)"
meta:resourcekey="BfarmCheckboxDataList1Resource2" ReadOnly="False">
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat='server'
meta:resourcekey="CheckBox1Resource2" />
<asp:Label ID="Label1" runat='server' Visible="False"
meta:resourcekey="Label1Resource2"></asp:Label>
</ItemTemplate>
</cc1:CheckboxDataList>
How can I prevent the ide from generating this code and how can I tell
the IDE not to treat this property as something that should be
localised?
I have tried decorating the property with the following attribute
[Localizable(false)]
But it does nothing
Help !!!