ASPForums.Net RSS Feed additions to the content that appears on ASPForums.Net(c) 2019 All rights reserved.Access Modifier Error: Cannot specify accessibility modifiers for both accessors of the property or indexer <p>Hi <a class="username" rel="Gayatri">Gayatri</a>,</p> <p>As the error states that you Cannot specify accessibility modifiers for&nbsp;accessors of property. So change your code with below.</p> <pre class="brush: csharp">public FileUpload ucFileUpload { &nbsp;&nbsp;&nbsp; get &nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return this.FileUpload1; &nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp; private set &nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.FileUpload1 = value; &nbsp;&nbsp;&nbsp; } } public HiddenField ucHiddenContainer { &nbsp;&nbsp;&nbsp; get &nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return this.hfContainerNo; &nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp; private set &nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.hfContainerNo = value; &nbsp;&nbsp;&nbsp; } }</pre> <p>Only one accessor can be modified.</p> <p>For more details refer below link.</p> <p><a href=""></a></p> <p>&nbsp;</p>, 27 Feb 2018 00:26:22 GMT