简单一:将文本框绑定到整数变量 [英] Easy One: Bind a Text Box to a an Integer Variable

查看:64
本文介绍了简单一:将文本框绑定到整数变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

希望这是一个简单的问题:如何将表单上的文本绑定到整数

变量?可能?谢谢!

Hope this is an easy one: How can I bind a text on a form to a an integer
variable? Possible? Thanks!

推荐答案

不,你不能绑定到变量。


绑定适用于实现的集合一个接口,使得进行绑定的

对象可以将数据输入和输出源

对象。仅仅使用给定的变量就无法完成。


Monty <莫*** @ community.nospam>在留言中写道

新闻:ej ************** @ TK2MSFTNGP14.phx.gbl ...
No, you cannot bind to a variable.

Binding works for collections that implement an interface such that the
objects doing the binding can property get data in and out of the source
object. It can''t be done with just a given variable.

"Monty" <mo***@community.nospam> wrote in message
news:ej**************@TK2MSFTNGP14.phx.gbl...
希望这很容易一:如何将表单上的文本绑定到整数变量?可能?谢谢!
Hope this is an easy one: How can I bind a text on a form to a an integer
variable? Possible? Thanks!





" Monty" <莫*** @ community.nospam>在消息中写道

新闻:ej ************** @ TK2MSFTNGP14.phx.gbl ...

"Monty" <mo***@community.nospam> wrote in message
news:ej**************@TK2MSFTNGP14.phx.gbl...
希望这很简单:如何将表单上的文本绑定到整数变量?可能?谢谢!
Hope this is an easy one: How can I bind a text on a form to a an integer
variable? Possible? Thanks!




???你为什么想要?只需在变量发生变化时更新它。




??? Why would you want to? Just update it when the variable changes.



嗯,你想要的,因为你有20个字段,你不要想要代码

一直手动更新20个变量。出于同样的原因,你想要绑定到一个实际的数据源。


" Homer J Simpson" <无**** @ nowhere.com>在消息中写道

news:tzdYf.24774
Well, you would want to, because you have 20 fields, and you don''t want code
manually updating the 20 variables all the time. It is for the same reasons
you would want to bind to an actual datasource.

"Homer J Simpson" <no****@nowhere.com> wrote in message
news:tzdYf.24774


这篇关于简单一:将文本框绑定到整数变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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