日期:2014-05-17 浏览次数:20508 次
protected void ListView1_ItemCreated(object sender, ListViewItemEventArgs e)
{
if (e.Item.ItemType == ListViewItemType.DataItem || e.Item.ItemType == ListViewItemType.InsertItem)
{
CheckBox chb = e.Item.FindControl("UserGenderCheckBox") as CheckBox;
TextBox txtage = e.Item.FindControl("UserAgeTextBox") as TextBox;
if (chb != null && txtage !=null)
{
//chb.Attributes["onchange"] = "changeed(this,'" + txtage.ClientID + "')";
chb.InputAttributes["onchange"] = "changeed(this,'" + txtage.ClientID + "')";
}
}
}
$(document).ready(function(
{
$(".mycheck").click(function()
{
if($(this).attr("Checked"))
{
$(this).parent().parent().Find(".myAge").hide();
}
else
{
$(this).parent().parent().Find(".myAge").show();
}
});
});