Hi there! I need your help on the WebDropDown control. I changed the existing control to Infragistics' latest version control for the Drop Down and this is the error I got.
"Compiler Error Message: CS0433: The type 'Infragistics.Web.UI.ListControls.WebDropDown' exists in both 'c:\Windows\assembly\GAC_MSIL\Infragistics35.Web.v9.2\9.2.20092.1003__7dd5c3163f2cd0cb\Infragistics35.Web.v9.2.dll' and 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\Infragistics4.Web.v14.1\v4.0_14.1.20141.1015__7dd5c3163f2cd0cb\Infragistics4.Web.v14.1.dll'"
What should I do in order to have it working? Thank you.
Hello Andrea,
This error indicates that there are both 9.2 and 14.1 assemblies referenced in the project. I would therefore suggest removing all 9.2 assemblies from the project references, web.config and the individual pages and ensuring that only a single version of the IG assemblies is ultimately referenced. A similar scenario is described at:
http://ko.infragistics.com/community/forums/t/33439.aspx
Hope this helps. Please feel free to contact me if you have any questions.
Do I need to remove these too?
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
If so, what should I change them with?
The System.Web.UI reference is a general .NET reference and should not be removed. Looking at it more closely however, the project may need to be updated to .Net 4.0 in order to be able to use the latest Infragistics version:
http://msdn.microsoft.com/en-us/library/vstudio/dd483478%28v=vs.100%29.aspx
Regarding the assembly reference exception still being thrown for version 9.2, please ensure that the Bin folder of the project does not contain any copies of the 9.2 assemblies.
Hope this helps.
Hi Petar,
How will I know if the project is already in .Net 4.0? And also, how will I know the assemblies that the Bin should contain?
Approaches to determine which .NET version a project is targeting can be found at:
http://stackoverflow.com/questions/3231632/how-to-find-the-net-framework-version-of-a-visual-studio-project
The required Infragistics assemblies can be determined based on the controls used in your project and referring to the documentation at:
http://help.infragistics.com/doc/ASPNET/2014.1/CLR4.0/?page=Web_Deployment_Overview.html
Please feel free to contact me if you have any questions.
Please feel free to contact me if you have any further questions regarding this matter.
The WebDropDown worked already. I edited the SourceData. However, is there a way that the items would not appear as a link?
It seems that that issue is already being discussed at:
http://ko.infragistics.com/community/forums/t/90694.aspx
Please refer to that thread regarding this matter.
This is the code I have:
protected void setCombo() { string strConn = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["ORIGSAMPLE"].ToString();
SqlConnection cn = new SqlConnection(strConn);
try { cn.Open();
string strSQL = "SELECT * FROM [qry_Original_Brands] ORDER BY 1";
SqlCommand cmd = new SqlCommand(strSQL, cn); SqlDataReader dr = cmd.ExecuteReader();
cboOriginalBrand.Items.Add("*");
if (dr.HasRows) { while (dr.Read()) {cboOriginalBrand.Items.Add(dr[0].ToString()); } }
I'm having a problem with cboOriginalBrand.Items.Add("*"); and cboOriginalBrand.Items.Add(dr[0].ToString());
Please help me in this.
The text of an individual item may be changed after the dropdown has been databound by using the item's Text property. Therefore after data binding, for instance by handling an event like DataBound, the item text may be changed using something like:
protected void WebDropDown1_DataBound(object sender, EventArgs e) { WebDropDown1.Items[0].Text = "Some Changed Text"; }
That solved it! :) Is there a way for a text not included in the DataSource to appear during load time? I tried DropDown.TextField="*"; but when it runs, the items disappear.
In order to not have anchors rendered for items, the EnableRenderingAnchors property can be set to false.
Hope this helps. Please let me know if you have any additional questions.