从两个或多个表单C#获取值 [英] Getting values from two or more forms C#

查看:72
本文介绍了从两个或多个表单C#获取值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,在用户成功登录后,将出现一个警告框,显示用户名,然后弹出另一个表单,使用户可以更改其密码。我想在条件语句中使用用户名的值(来自登录表单)来更改密码。

Okay, after a successful user login, an alertbox will display the username and then another form will pop up that enables the user to change his password. I want to use the value of the username (from login form) in a conditional statement to be able to change the password.

我如何获得此值来自另一种形式?谢谢。

How do i get this value that came from another form? Thanks.

在此处查看图像:

推荐答案

您会感到什么困惑?
将用户名传递到下一个表单,我看不出第三种表单必须知道其他任何原因。这将是另一种无用的依赖。

What does confuse u? Pass the username to the next form, I don't see the reason why the 3rd form has to know about any other. It would be one more useless dependency.

这篇关于从两个或多个表单C#获取值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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