C# 页面源不反映浏览器显示的内容

C# 页面源不反映浏览器显示的内容,c#,javascript,asp.net,webforms,C#,Javascript,Asp.net,Webforms,我有一个包含以下内容的网页: <input id="ColourPicker" type="text" value="000000" /> <asp:Label ID="ColourChosen" runat="server" Text="000000" ClientIDMode="Static"></asp:Label> 当我在jPicker中选择颜色并单击“确定”时,浏览器显示: 左边的框是ColorPicker,右边的标签是ColorSelected

我有一个包含以下内容的网页:

<input id="ColourPicker" type="text" value="000000" />
<asp:Label ID="ColourChosen" runat="server" Text="000000" ClientIDMode="Static"></asp:Label>
当我在jPicker中选择颜色并单击“确定”时,浏览器显示:

左边的框是ColorPicker,右边的标签是ColorSelected

当我查看页面源代码时,我看到:

<input id="ColourPicker" type="text" value="000000" />
<span id="ColourChosen">000000</span>

000000
我有一些背后的代码:

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();
}
protectedvoid按钮1单击(对象发送者,事件参数e)
{
var l=新列表{new Borg.PlotColurs()};
l[0]。plotColor=colorSelected.Text;
Borg.BulkInsert(ConfigurationManager.ConnectionString[“utilConnectionString”]。ConnectionString,“PlotColor”,l);
ListView2.DataBind();
}
我想看到选择的颜色。文本等于f41313,但它始终等于000000


我做错了什么?

您正在查看的页面源是从服务器下载的源。后来通过Javascript制作的所有版本(包括插件)都不会反映在页面源代码中


要查看您的更改,您应该使用Firefox中的FireBug、Chrome中的Chrome devtools或Internet Explorer开发工具。

Aha,太好了,我不知道。我刚刚在Firebug中看到了它,选择的颜色的价值确实发生了变化。谢谢。没问题,很乐意帮忙。如果答案对你有帮助,请不要忘记接受并投票表决
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();
}