显示在文本框中输入的usernmae的名字?? [英] to display first name insted of usernmae entered in text box??

查看:123
本文介绍了显示在文本框中输入的usernmae的名字??的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何根据在文本框n中输入的用户名从数据库中提取名字,然后在登录区域的另一个页面上显示名字....

how to fetch the firstname from database on the on the basis of the username entered in the textbox n then display the first name on the another page that is login area....

推荐答案

在会话状态中保存用户名(或用户ID,具体取决于您如何在数据库内部识别用户),然后提供存储过程以在提供数据库时从数据库中检索用户的名字和用户名/用户名.

在所需页面的页面加载事件中调用此存储过程.
Save the username (or userid, depending on how you identify your users internally to your database) in the session state, then have a stored procedure to retrieve the user''s first name from the database when supplied with the userid/username.

Call this stored procedure in the page load event for the pages where required.


这篇关于显示在文本框中输入的usernmae的名字??的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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