Migration from ASP .Net 1.1 to 4.0http://forums.asp.net/t/1765525.aspx/1?Migration+from+ASP+Net+1+1+to+4+0Mon, 06 Feb 2012 11:57:54 -050017655254814492http://forums.asp.net/p/1765525/4814492.aspx/1?Migration+from+ASP+Net+1+1+to+4+0Migration from ASP .Net 1.1 to 4.0 <p>I have migrated the application in asp .net 1.1 to 4.0 successfully using wizard. <br> But i am facing some issues in follwoing senario</p> <p>Application uses one dll which contains 2 overloaded methods as below</p> <pre class="prettyprint">public static UltraWebGrid EncodeDatagrid(Infragistics.WebUI.UltraWebGrid.UltraWebGrid dg) { return dg;} public static DataGrid EncodeDatagrid(DataGrid dg) { return dg; }</pre> <p>&nbsp;</p> <p>when i am calling EnocdeDatagrid in the application as below</p> <pre class="prettyprint">Protected WithEvents grdArea As System.Web.UI.WebControls.DataGrid EncodeDatagrid(grdArea)</pre> <p>getting the following compile time error</p> <p>&quot;Reference required to assembly 'Infragistics.WebUI.UltraWebGrid.v5.1, Version=5.1.20051.37, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' containing the type 'Infragistics.WebUI.UltraWebGrid.UltraWebGrid'. Add one to your project.&nbsp;C:\Inetpub\wwwroot\AphelionDotNet\Lockers\AddArea.aspx.vb&quot;</p> 2012-02-03T10:00:26-05:004814693http://forums.asp.net/p/1765525/4814693.aspx/1?Re+Migration+from+ASP+Net+1+1+to+4+0Re: Migration from ASP .Net 1.1 to 4.0 <p>So what's your question?</p> 2012-02-03T11:47:10-05:004817611http://forums.asp.net/p/1765525/4817611.aspx/1?Re+Migration+from+ASP+Net+1+1+to+4+0Re: Migration from ASP .Net 1.1 to 4.0 <p>Why we need the reference of infragistic dll in VS 2010 if we are not&nbsp;calling the function which is having the infragistic control as a parameter? This reference is not required in the VS 2003.</p> 2012-02-06T04:21:32-05:004818008http://forums.asp.net/p/1765525/4818008.aspx/1?Re+Migration+from+ASP+Net+1+1+to+4+0Re: Migration from ASP .Net 1.1 to 4.0 <p>You need a reference because your code is using it. It does not matter that you never call that function - Visual Studio cannot figure out what functions are not called. Hence the reference is required.</p> 2012-02-06T08:00:34-05:004818308http://forums.asp.net/p/1765525/4818308.aspx/1?Re+Migration+from+ASP+Net+1+1+to+4+0Re: Migration from ASP .Net 1.1 to 4.0 <p>With the same senario it does not required the reference in the VS 2003 why this is so?</p> <p>Also if I am not at all&nbsp;calling the EncodeDatagrid() method then it does not required the reference in VS 2010</p> <p><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"><span size="2" face="Consolas" style="font-family:Consolas; font-size:small"></span></span></p> 2012-02-06T10:17:04-05:004818348http://forums.asp.net/p/1765525/4818348.aspx/1?Re+Migration+from+ASP+Net+1+1+to+4+0Re: Migration from ASP .Net 1.1 to 4.0 <p>The last time I saw VS 2003 was about 5 years ago, so it's difficult to say why reference is not required there.</p> <p>HOWEVER, if you don't call this method, can I ask what is it doing in your code? Just comment it out, if you don't call it - you don't need it. Problem solved.</p> 2012-02-06T10:31:33-05:004818557http://forums.asp.net/p/1765525/4818557.aspx/1?Re+Migration+from+ASP+Net+1+1+to+4+0Re: Migration from ASP .Net 1.1 to 4.0 <p>I am calling 1 of the overloaded&nbsp;method from my code as i shown in the code given above.</p> 2012-02-06T11:54:13-05:004818561http://forums.asp.net/p/1765525/4818561.aspx/1?Re+Migration+from+ASP+Net+1+1+to+4+0Re: Migration from ASP .Net 1.1 to 4.0 <p>OK, do the following:</p> <pre class="prettyprint">//public static UltraWebGrid EncodeDatagrid(Infragistics.WebUI.UltraWebGrid.UltraWebGrid dg) //{ // return dg;} public static DataGrid EncodeDatagrid(DataGrid dg) { return dg; }</pre> <p>This will solve your problem with a reference.</p> 2012-02-06T11:57:54-05:00