I have a webpage with the following:
<input id="ColourPicker" type="text" value="000000" />
<asp:Label ID="ColourChosen" runat="server" Text="000000" ClientIDMode="Static"></asp:Label>
These are bound to a jPicker:
$(document).ready(
function () {
$('#ColourPicker').jPicker(
{
images: { clientPath: 'Scripts/images/' },
window: { position: { x: '25', y: '0' }, expandable: true }
},
function(color) {
var all = color.val('all');
document.getElementById('ColourChosen').innerHTML = all.hex;
});
});
When I select a colour in jPicker and click OK the browser displays:
The box on the left is ColourPicker and the label on the right is ColourChosen.
When I view the Page Source I see this:
<input id="ColourPicker" type="text" value="000000" />
<span id="ColourChosen">000000</span>
I have some code-behind of this:
protected void Button1Click(object sender, EventArgs e)
{
var l = new List<Borg.PlotColurs> {new Borg.PlotColurs()};
l[0].PlotColour = ColourChosen.Text;
Borg.BulkInsert(ConfigurationManager.ConnectionStrings["utilConnectionString"].ConnectionString, "PlotColours", l);
ListView2.DataBind();
}
I want to see ColourChosen.Text to equal f41313, but it always equals 000000.
What am I doing wrong?