日期:2014-05-17 浏览次数:20433 次
<input id="txtTitle" name="txtTitle" type="text" />
<asp:LinkButton ID="lbtnAdd" runat="server" onclick="lbtnAdd_Click">
protected void Add()
{
mdl.ProductType model = new mdl.ProductType();
model.Title = Request.Form["txtTitle"];//代码A段
if (dal.Add(model))
{
Response.Redirect("ListType.aspx");
}
}
protected void lbtnAdd_Click(object sender, EventArgs e)
{
Add();
}
<script type="text/javascript">
$(function () {
$("#modelAdd,#modelEdit").window({
closed: true,
modal: true,
closable: true
});
$("#linkCloseAdd,#linkCloseEdit").click(function () {
$("#modelEdit,#modelAdd").window("close");
});
var modelID = <%=MyTools.GetAction("edit")%>;
if (modelID>0) {
//修改状态下
$("#modelEdit").window("open");//1打开窗口
}