使用c#在asp.net中的文本框事件更改事件 [英] textbox event change event in asp.net using c#

查看:438
本文介绍了使用c#在asp.net中的文本框事件更改事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

学生编号10



Textbox1



当我输入学生ID 10我想显示来自数据库的文本框中的studentname。

如果数据库中没有学生ID,则标签学生ID中的消息无效。





我怎么能在asp.net上用c#。

Student id 10

Textbox1

When i type the student id 10 i want to display studentname in textbox from the datbase.
if student id is not there in the database display the message in the label student id is invalid.


for that how can i do in asp.net using c#.

推荐答案

是的,你可以做到,你应该使用 jQyery AJAX 要求这样做。

这是示例 [ ^ ]
Yes, you could do it, and you should use jQyery and AJAX call for doing this.
Here is an example[^]


请使用textchange文本框事件

Please use textchange event of textbox
protected void TextBox1_TextChanged(object sender, System.EventArgs e)
    {
      // bind a gridview or repeater associated with this event
 }



如何在asp.net中使用TextBox OnTextChanged事件c# [ ^ ]



C#TextChanged [ ^ ]


这篇关于使用c#在asp.net中的文本框事件更改事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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