文件:edit.aspx
我从表中读出信息
//读一条信息
void ShowOneTypes()
{
int id=Convert.ToInt32(Request["id"]);
mysoft.ShowSoftidTypes(id);
string mytypes=mysoft.strTypes;
types.Text=mytypes; //假设它的值为:AA
}
现在要更新记录
int id=Convert.ToInt32(Request["id"]);
string txtTypes=types.Text.ToString().Trim();
Response.Write(txtTypes+"<br>"+id+"<br>");
mysoft.editSoftidTypes(id,txtTypes);
无论我在文本框中输入什么内容,我得到的值就是从数据库中读出来的,也就是它的值永远是AA,怎么会不变???????????
page_load:
if not ispostback then
绑定数据
end if