文本框中的文本更改事件,触发该事件后需要在同一页面中显示结果吗? [英] Text change event in Textbox and after firing that event need to display the result in same page?

查看:77
本文介绍了文本框中的文本更改事件,触发该事件后需要在同一页面中显示结果吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用mvc3,我有以下情形:我有一个数据库表,其中包含RecordID,RecordName和RecordType.显示的是三个文本框,一个用于前面提到的每个字段.我的问题是,当我在相关文本框中输入RecordID时,我希望能够显示该特定RecordID的RecordName和RecordType.

解决方案

您需要根据您的上下文在get或post中使用回调方法.
这是实现它的方法.
post-and-get-in-mvc-razor-jquery. html [ ^ ]
其他
在步骤6中抢劫如何使用json对象获取值并分配给字段.
implementing-using-aspnet-web-api.html [ ^ ]

用户输入RecordID后,只需触发另一个查询以获取相关详细信息,然后使用datareader进行读取,然后将其显示在相关框中.


I have the following scenario, using mvc3: I have a database table which holds a RecordID, RecordName and RecordType. Displayed are three text boxes, one for each of the fields mentioned previously. My Question is, when i enter a RecordID into the relevant text box, i want to be able to show the RecordName and RecordType for that particular RecordID. How can i achieve this?

解决方案

Yu need to use the call back methods either in get or post depending on your context.
This is how you can implement it.
post-and-get-in-mvc-razor-jquery.html[^]
else
loot at step 6 how to use json object to get values and assign to fields.
implementing-consuming-aspnet-web-api.html[^]


After user enters the RecordID just fire another query to fetch the related details and then read using datareader and then display it in relevant boxes.


这篇关于文本框中的文本更改事件,触发该事件后需要在同一页面中显示结果吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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