用户数据持久性 [英] UserData Persistance

查看:104
本文介绍了用户数据持久性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用UserData Persistance将数据持久化在回发中,但是我已经将其绑定到
形式的元素上

I have used UserData Persistance to persist the data in postbacks, but i have binded it to the element of the form like

var oPersist=form1.oPersistInput;
oPersist.setAttribute("sPersist",oPersist.value);
oPersist.save("oXMLBranch");



oPersistInput是输入类型的文本.

但是我不想将其绑定到表单中的元素,而是想将其绑定到正文或表单ID.

您能帮我吗?



oPersistInput is the Input type text.

But I dont want to bind it to element in the form instead i want to bind it body or form ids.

Can you please help me.

推荐答案

嗨 斯里拉米哈吉(

您可以使用上述方法指定body的值,但是在回发期间将不会持续存在.因此您必须使用隐藏字段 inputbox 代替body属性.因为已经启用 viewstate属性的隐藏字段输入框为真


如果您有疑问,请告诉我

谢谢,
Imdadhusen
Hi Srilaxmijakki,

You can assign a value of body using above method, but this will not persist during postback. so you should have to use hidden field or inputbox instead of body attribute. because the hidden field or inputbox which already enabled viewstate property is true


Please do let me know, if you have doubt

Thanks,
Imdadhusen


尝试使用Viewstate变量,其值可以在
Try using Viewstate variables, their value can be obtained on InitComplete[^] event.


这篇关于用户数据持久性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆