阅读没有回发的PlaceHolder [英] Read a PlaceHolder without postback

查看:68
本文介绍了阅读没有回发的PlaceHolder的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,我创建了一个包含占位符的网站,我通过代码以动态方式插入文本框矩阵:

即:

TB1.1 TB1.2 TB1.3 TB1.4
TB2.1 TB2.2 TB2.3 TB2.4
...
...

我激活了"AutoPostBack"。这些文本框。
我添加了:

AddHandler MyTextBox.textboxEvent,AddressOf getMyEvent

到文本框。
这个事件绑定到TextBox.TextChanged事件

因此,当我更改文本框中的值时,将调用getMyEvent方法。

问题是每次我更改文本框中的值时,所有重新加载网页(触发回发事件)。
页面刷新需要2/3秒,所以我不想在avery文本框更改时刷新页面,但只有当我按下Submit按钮时才会刷新(异步)更新)。

问题是,当我解析占位符时,在文本框中我读取旧值,而不是刚修改的最后值。

我怎么读插入文本框中的实际值是否没有提出回发?。
问候郎Emanuele

Dear all,
I create a web site containing a placeholder where I dinamically insert a matrix of textboxes by code:

i.e.:

TB1.1    TB1.2    TB1.3   TB1.4
TB2.1    TB2.2    TB2.3   TB2.4
...
...


I activated the "AutoPostBack" to these textboxes.
I added:

AddHandler MyTextBox.textboxEvent, AddressOf getMyEvent

to the textboxes.
This event is bound to TextBox.TextChanged event

So, when I change the value in a the textbox, the getMyEvent method is called.

The problem is that every time I change the value in the textbox, all the web page is reloaded (postback event is triggered).
The page refresh required 2/3 seconds, so I'd like not to refresh the page at avery textbox change, but only when I press a Submit button (asynchronous update).

The problem is that when I parse the placeholder, in the textboxes I read the old values, not the last values a just modified.

How could I read the actual value inserted in a textbox without raise a postback?.

Regards
              Emanuele

推荐答案

我认为你将不得不使用javascript或jquery或任何其他脚本语言。但是,因为这是一个ASP.NET问题,最好在 ASP.NET论坛上提出这个问题。
I think you will have to use javascript or jquery or any other scripting language. But since it's a ASP.NET question is better to ask this question on ASP.NET Forum.


这篇关于阅读没有回发的PlaceHolder的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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