ASPForums.Net RSS Feed additions to the content that appears on ASPForums.Net(c) 2019 All rights reserved.Unable to read or fetch values set in Class Properties in C# .Net<p>Hi Mahesh,</p> <p>Its right, It should work only such a way.</p> <p>Its as per Object Oriented Concept. As you cannot use one objects property by any other object. Proerty set by Bobj can be accessible only by Bobj, no one else.(Even not by&nbsp;other object having same name). How ever do the following thing.</p> <p>Declare that property as static and use it without object. I am giving you example for one of the properties than you have to implement this to all other in exacly same manner.</p> <p>1) Declare as static.</p> <pre class="brush: csharp">public static string AccountNo { get; set; }</pre> <p>2) Assign value(as its static you cannot use object but the class name directly as follow)</p> <pre class="brush: csharp">BasePage.AccountNo = txtAccount.Text;</pre> <p>3) User its value directly as</p> <pre class="brush: csharp"> ltAccount.Text = BasePage.AccountNo;</pre> <p>-- Please Read Object oriented concept to enjoy programming.</p> <p>Thanks and Regards,</p> <p>Rk_Hirpara.</p>, 08 May 2013 03:30:29 GMT