lnkcat
是类别的lnksubcat
链接按钮,是子类别的链接按钮:
我的问题是当我点击lnk_cat
相应的标签和文本框将被显示......但我点击下一个 lnk 子猫将被删除......我想将这些文本框对应的标签放在占位符上,直到我点击提交:
protected void lnkCat_Click(object sender, EventArgs e)
{
//Panel2.Visible = false;
//Panel1.Visible = true;
Label lblCat = new Label();
lblCat.Text = "Enter new Category: ";
PHcat.Controls.Add(lblCat);
txtCat = new TextBox();
_Cat = txtCat.Text;
PhtxtCat.Controls.Add(txtCat);
Session["Dynalbl"] = lblCat;
Session["Dynatxt"] = txtCat;
}
protected void lnkSubCat_Click(object sender, EventArgs e)
{
//Panel1.Visible = true;
//Panel2.Visible = true;
Label lblSubcat = new Label();
lblSubcat.Text = "Enter new Sub-Category: ";
PHsubCat.Controls.Add(lblSubcat);
txtSubCat = new TextBox();
_SubCat = txtSubCat.Text;
PhtxtSubCat.Controls.Add(txtSubCat);
}
任何人都可以建议解决这个问题吗?请!!
谢谢...