1
Answer

Multiple instance of User-Control in a Windows Form

sasikumar

sasikumar

13y
1.9k
1
Hi,

I've a UserControl which contains a Button click event in it. Then I've a form Form1.cs which contains multiple instances of the UserControl - uc1, uc2, uc3, etc.,

On the Button Click event of the UserControl, How do I identify in the form (Form1.cs), that from which instance(uc1\uc2\uc3) of the usercontrol, was the Button Click event triggered ?

Any suggestions?

Thanks,
SK.
Answers (1)
0
Kirtan Patel

Kirtan Patel

NA 35k 2.8m 15y
i also having that issue

ito solve this i have coded my Own Encryption and decryption Function

and Stored Setting like

below


             <Settings>
<setting name="server" serializeAs="String">
<value>75ƒ105ƒ114ƒ116ƒ97ƒ110ƒ45ƒ80ƒ67ƒ92ƒ83ƒ81ƒ76ƒ69ƒ88ƒ80ƒ82ƒ69ƒ83ƒ83ƒ</value>
</setting>
<setting name="username" serializeAs="String">
<value>115ƒ97ƒ</value>
</setting>
<setting name="password" serializeAs="String">
<value>49ƒ50ƒ51ƒ52ƒ53ƒ</value>
</setting>
<setting name="databasename" serializeAs="String">
<value>103ƒ119ƒ101ƒ100ƒ99ƒ</value>
</setting>
<setting name="gwedcConStr" serializeAs="String">
<value>68ƒ97ƒ116ƒ97ƒ32ƒ83ƒ111ƒ117ƒ114ƒ99ƒ101ƒ61ƒ75ƒ105ƒ114ƒ116ƒ97ƒ110ƒ45ƒ80ƒ67ƒ92ƒ83ƒ81ƒ76ƒ69ƒ88ƒ80ƒ82ƒ69ƒ83ƒ83ƒ59ƒ85ƒ115ƒ101ƒ114ƒ32ƒ73ƒ100ƒ61ƒ115ƒ97ƒ59ƒ80ƒ97ƒ115ƒ115ƒ119ƒ111ƒ114ƒ100ƒ61ƒ49ƒ50ƒ51ƒ52ƒ53ƒ</value>
</setting>
<setting name="LogedUser" serializeAs="String">
<value />
</setting>
<setting name="adminuser" serializeAs="String">
<value>97ƒ100ƒ109ƒ105ƒ110ƒ</value>
</setting>
<setting name="adminpass" serializeAs="String">
<value>49ƒ50ƒ51ƒ52ƒ53ƒ</value>
</setting>
</Settings>
</userSettings>

if Anyone Have better Idea Tell me too .....