c# - get and set property value of one user control from another inside the later usercontrol method -


I have two user printers U1 and U2. Now in U1 I have an override method ( void Commit () ) and a public string property ( NewCompanyID ). From U2, I have to set the NewCompanyID public property to call U1 commit () method and in the method of committed.

The code is as follows:
U2 code

  // Some code obj.Commit (); Company id = obz. Newcompany ID;  

U1 code

  public string newcompanyId {get (if string string. "]))) Return Setting {ViewState ["NewcompanyID"] = Value;}}  

  Public override Zero Commit () {// some code NewCompanyID = results.Entity.Id.ToString ();}  

Output NewCompanyID is empty.


Comments