捕获登录名值以存储到数据库中 [英] Capture loginname value to store into database

查看:87
本文介绍了捕获登录名值以存储到数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.
我有loginname工具,用于在用户登录后显示用户的用户名.
我想捕获用户名并在提交页面中的特定表单时自动将其插入表格中.

有任何想法吗?

Hi.
I have loginname tool to display the username of the user after they log in.
I want to capture the username and insert into a table automatically when submiting a particular form in my page.

Any ideas?

推荐答案

两种解决方案:
1.如果您知道您的工具从何处获取信息,那么您就可以在页面中编写逻辑并直接实现它们

2.如果您不知道如何获取信息,则意味着您需要从工具中获取信息.然后,您可以尝试一些非托管的钩子代码,该代码将像C ++中的间谍工具一样工作
Two solutions:
1. If you know where your tool get the information, then you get write the logic in your page and achieve them directly

2. If you don''t know how to get the information, it means you need to get them from the tool. Then you can try some unmanaged hook code, which would work like the spy tool in C++


我明白了:

I got it:

protected void Page_Load(object sender, System.EventArgs e)
             {
                 string getname = Page.User.Identity.Name;
                 TextBox1.Text = getname;
             }





thanks for the guide guys.


阅读您正在使用的控件的文档,如果希望完全控制它们,可以考虑编写自己的控件.
Read the documentation for the control you''re using, and consider writing yuor own controls if you want full control over them.


这篇关于捕获登录名值以存储到数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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