This is a migrated thread and some comments may be shown as answers.

Add RadGrid assembly to web.Config file

2 Answers 309 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Prathibarani
Top achievements
Rank 1
Prathibarani asked on 26 Mar 2013, 04:54 PM
Hi,

We are using RadControls for ASP.NET AJAX suite (2013 Q1 version) for our applications. We use Visual studio 2012 ultimate version with C#. When I drag control from toolbox on to the page, the following gets added to the page:

<%

 

@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

 


I do not want to have this on each and every page. So, I would like to add assembly to web.config file with details like public token, version, culture etc. Further, I would like to add controls element also with control details.

For eg:

<

 

 

assemblies>

 

<

 

 

add assembly="Infragistics2.WebUI.Shared.v10.3, Version=10.3.20103.2217, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>

 

</

 

 

assemblies>

 


<

 

 

pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">

 

<

 

 

controls>

 

<

 

 

add tagPrefix="igtbl" namespace="Infragistics.WebUI.UltraWebGrid" assembly="Infragistics2.WebUI.UltraWebGrid.v10.3"/>

 

<

 

 

add tagPrefix="igtblexp" namespace="Infragistics.WebUI.UltraWebGrid.ExcelExport" assembly="Infragistics2.WebUI.UltraWebGrid.ExcelExport.v10.3"/>

 

</

 

 

controls>

 

</

 

 

pages>

 


This avoids having assembly registration on each and every page.

Thanks,
Prathiba

2 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 29 Mar 2013, 09:36 AM
Hello,

In order to achieve your goal you could add the tag prefix in the Web.Config and thus it will be applied to all pages from the project:

<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
  <controls>
    <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/>
  </controls>
</pages>

The same applied for the assembly reference. However, you will need to have the exact values for the Culture, PublicKeyToken and Version attributes.

Regards,
Andrey
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
ajay
Top achievements
Rank 1
answered on 23 Jan 2018, 11:52 AM

How can I know that which version of Telerik.Web.UI is compatible with .net framework 4.6?

We have upgraded our application from .net framework 3.5 to 4.6 and Telerik.Web.UI not rendering in UI after changing  <pages controlRenderingCompatibilityVersion="4.6" clientIDMode="AutoID">

Tags
General Discussions
Asked by
Prathibarani
Top achievements
Rank 1
Answers by
Andrey
Telerik team
ajay
Top achievements
Rank 1
Share this question
or