请建议我编辑一个表单的代码我在ASP.NET中的threetire系统中完成了我的项目 [英] Please suggest me the code to edit a form I have done my project in threetire system in ASP.NET
问题描述
protected void Button1_Click(对象发件人,EventArgs e)
{
EditProfileBL objBL = new EditProfileBL();
objBL.profilefor = DropDownList1.Text;
objBL.name = TextBox1.Text;
objBL.gender = RadioButtonList1.SelectedItem.Text;
objBL.dateofbirth = DropDownList2.Text + - + DropDownList3.Text + - + DropDownList4.Text;
< pre lang =C#> objBL.edit(objBL);
clear();
Response.Write( < Script> alert('editfully')< / Script> 跨度>);
}
这是我的源代码
我尝试过:
protected void Button1_Click(object sender,EventArgs e)
{
EditProfileBL objBL = new EditProfileBL();
objBL.profilefor = DropDownList1.Text;
objBL.name = TextBox1.Text;
objBL.gender = RadioButtonList1.SelectedItem.Text;
objBL.dateofbirth = DropDownList2.Text + - + DropDownList3.Text + - + DropDownList4.Text;
objBL.edit(objBL);
clear();
Response.Write(< Script> alert('编辑成功')< / Script>);
} 试试这个
public void ShowMessage( string message)
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append( < script type ='text / javascript'> );
sb.Append( window.onload = function(){);
sb.Append( alert(');
sb.Append (消息);
sb.Append( ')};);
sb.Append( < / script>);
ClientScript.RegisterClientScriptBlock( this .GetType(), alert,sb.ToString());
}
受保护 void btnSave_Click(< span class =code-keyword> object sender,EventArgs e)
{
// 您的代码
//
//
// 您的代码
ShowMessage( 已成功保存!! 跨度>);
}
protected void Button1_Click(object sender, EventArgs e)
{
EditProfileBL objBL = new EditProfileBL();
objBL.profilefor = DropDownList1.Text;
objBL.name = TextBox1.Text;
objBL.gender = RadioButtonList1.SelectedItem.Text;
objBL.dateofbirth = DropDownList2.Text + "-" + DropDownList3.Text + "-" + DropDownList4.Text;
objBL.edit(objBL);
clear();
Response.Write("<Script>alert('edited Successfully')</Script>");
}
this is my source code
What I have tried:
protected void Button1_Click(object sender, EventArgs e)
{
EditProfileBL objBL = new EditProfileBL();
objBL.profilefor = DropDownList1.Text;
objBL.name = TextBox1.Text;
objBL.gender = RadioButtonList1.SelectedItem.Text;
objBL.dateofbirth = DropDownList2.Text + "-" + DropDownList3.Text + "-" + DropDownList4.Text;
objBL.edit(objBL);
clear();
Response.Write("<Script>alert('edited Successfully')</Script>");
}
Try this
public void ShowMessage(string message) { System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append("<script type = 'text/javascript'>"); sb.Append("window.onload=function(){"); sb.Append("alert('"); sb.Append(message); sb.Append("')};"); sb.Append("</script>"); ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", sb.ToString()); } protected void btnSave_Click(object sender, EventArgs e) { // Your code // // // Your code ShowMessage("Saved Successfully!!"); }
这篇关于请建议我编辑一个表单的代码我在ASP.NET中的threetire系统中完成了我的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!