我用的是FCKeditorV2文本编辑器,如果用FCKeditor1.Value = Server.HtmlDecode(dr["procontent"].ToString());来取值<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:ListBox ID="ListBox1" runat="server" AutoPostBack="True" Height="170px"
onselectedindexchanged="ListBox1_SelectedIndexChanged" Width="170px"></asp:ListBox>
<asp:ListBox ID="ListBox2" runat="server" Height="170px" Width="170px" onblur="checkprocate2()"></asp:ListBox>
</ContentTemplate>
</asp:UpdatePanel>
那么
这里的listBox就不能联动,,,也就是点左侧的listbox没反映 protected void ListBox1_SelectedIndexChanged(object sender, EventArgs e)
{
int cateid = Convert.ToInt32(ListBox1.SelectedValue);
SqlDbConnection mydb = new SqlDbConnection();
mydb.conn.Open(); string strsql = "select * from hlsubcate where cateID='" + cateid + "' order by subcatepx desc";
SqlDataAdapter da = new SqlDataAdapter(strsql, mydb.conn);
DataSet ds = new DataSet();
da.Fill(ds);
ListBox2.DataSource = ds;
ListBox2.DataTextField = "subcatename";
ListBox2.DataValueField = "subcateID";
ListBox2.DataBind(); ds.Dispose();
mydb.conn.Close();
}如果不用FCKeditor1.Value = Server.HtmlDecode(dr["procontent"].ToString());这一句,比如换成FCKeditor1.Value = Server.HtmlEncode(dr["procontent"].ToString());或换成FCKeditor1.Value = dr["procontent"].ToString();,,联动有效
还有,如果使用FCKeditor1.Value = Server.HtmlDecode(dr["procontent"].ToString());,,,而将UpdatePanel拿掉listbox联动能使用,,,但那样就刷新一下页面了,不想这样,,,,
请高人指点,是不是UpdatePanel和FCKeditor1.Value = Server.HtmlDecode(dr["procontent"].ToString());有冲突,,,还是怎么的?
这个问题搞死人了,求正解。。
。
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:ListBox ID="ListBox1" runat="server" AutoPostBack="True" Height="170px"
onselectedindexchanged="ListBox1_SelectedIndexChanged" Width="170px"></asp:ListBox>
<asp:ListBox ID="ListBox2" runat="server" Height="170px" Width="170px" onblur="checkprocate2()"></asp:ListBox>
</ContentTemplate>
</asp:UpdatePanel>
那么
这里的listBox就不能联动,,,也就是点左侧的listbox没反映 protected void ListBox1_SelectedIndexChanged(object sender, EventArgs e)
{
int cateid = Convert.ToInt32(ListBox1.SelectedValue);
SqlDbConnection mydb = new SqlDbConnection();
mydb.conn.Open(); string strsql = "select * from hlsubcate where cateID='" + cateid + "' order by subcatepx desc";
SqlDataAdapter da = new SqlDataAdapter(strsql, mydb.conn);
DataSet ds = new DataSet();
da.Fill(ds);
ListBox2.DataSource = ds;
ListBox2.DataTextField = "subcatename";
ListBox2.DataValueField = "subcateID";
ListBox2.DataBind(); ds.Dispose();
mydb.conn.Close();
}如果不用FCKeditor1.Value = Server.HtmlDecode(dr["procontent"].ToString());这一句,比如换成FCKeditor1.Value = Server.HtmlEncode(dr["procontent"].ToString());或换成FCKeditor1.Value = dr["procontent"].ToString();,,联动有效
还有,如果使用FCKeditor1.Value = Server.HtmlDecode(dr["procontent"].ToString());,,,而将UpdatePanel拿掉listbox联动能使用,,,但那样就刷新一下页面了,不想这样,,,,
请高人指点,是不是UpdatePanel和FCKeditor1.Value = Server.HtmlDecode(dr["procontent"].ToString());有冲突,,,还是怎么的?
这个问题搞死人了,求正解。。
。
{ listboxbind();
listbox2bind();
}
这两个listbox是绑定好数据的