Blog信息 |
blog名称:注册会计师(注会)练习软件 日志总数:398 评论数量:116 留言数量:27 访问次数:3268721 建立时间:2005年6月6日 |

| |
[borland eco 技术]IsPostBack的问题 软件技术
吕向阳 发表于 2007/10/14 10:04:52 |
procedure teditnewspage.Page_Load(sender: System.object; e: System.EventArgs);var Id: string; listitem1: listitem; user1: tleftpanel;begin
... Id := Request.Params['RootId']; if Assigned(Id) and (Id <> '') then anews := objectforid(id).AsObject as news;
listitem1 := dropdownlist1.Items.FindByText(anews.newstype.mc); txt1.Text := anews.title; fckeditor1.Value := anews.news; dropdownlist1.SelectedIndex := dropdownlist1.Items.IndexOf(listitem1);
if not IsPostBack then begin DataBind; end;
// TODO: Put user code to initialize the page hereend;
在修改信息保存时,总是不能保存自己在文本框中输入内容,测试不保存文本框内容,而只是一个具体的字符串时正确,才意识到ispostback问题,每次都对这个文本框元件进行了刷新,所以我将红色的这段代码放到 if语句里面,问题解决.
|
|
|