本文介绍了更新个人资料并在标签中显示个人资的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这里有人告诉我如何在标签中显示个人资料信息...当用户点击标签上的更新和信息时
sp是
here anyone tell me please how to show profile info in lable...when user click on update and info in label
sp is
ALTER procedure [dbo].[spupdateuser]
@UserID int,
@FullName nvarchar(50),
@Email nvarchar(50),
@PhoneNumber nvarchar(50)
as
update [Users] set FullName=@FullName,Email=@Email,PhoneNumber=@PhoneNumber
where UserID=@UserID
功能是
funtion is
public void updateuser(string FullName, string Email, string phonenumber)
{
db.ExecuteNonQuery("spupdateuser", new object[] { FullName, Email, phonenumber });
}
和按钮代码是
and button code is
protected void Button1_Click1(object sender, EventArgs e)
{
try
{
cg.updateuser(TextBox1.Text, TextBox2.Text, TextBox3.Text);
}
catch
{
Label14.Text = ("Update Succesfully");
}
}
推荐答案
protected void Button1_Click1(object sender, EventArgs e)
{
try
{
cg.updateuser(TextBox1.Text, TextBox2.Text, TextBox3.Text);
Label14.Text = ("Update Succesfully");
}
catch
{
Label14.Text = ("Update Failed");
}
}
请通读microsoft文档。
[]
这有望让你更清楚
please read through microsoft documentation.
http://msdn.microsoft.com/en-us/library/vstudio/0yd65esw.aspx[^]
This will hopefully make things clearer for you
cg.updateuser(TextBox1.Text, TextBox2.Text, TextBox3.Text);
Label14.Text = TextBox1.Text + " "+ TextBox2.Text + " " + TextBox3.Text;
这篇关于更新个人资料并在标签中显示个人资的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!