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

get telerik version and if trial (title)

0 Answers 66 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Doug
Top achievements
Rank 1
Doug asked on 08 Jun 2015, 08:47 PM
I put together some code for my web admin so I can see the versions and the descriptive title (tells you if it is trial or not)

in my example it showed "Telerik.Web.UI Trial Version 2014.3.1209.40"
until I updated it with the full version then it showed "Telerik.Web.UI 2014.3.1209.40"

here is my code I used

Dim item = System.Reflection.Assembly.LoadFile(Server.MapPath("~/bin/Telerik.Web.UI.dll"))
Dim title As String = ""
For Each attr In item.GetCustomAttributes(True)
If TypeOf attr Is System.Reflection.AssemblyTitleAttribute Then
Dim attrTitle As System.Reflection.AssemblyTitleAttribute = CType(attr, System.Reflection.AssemblyTitleAttribute)
title = attrTitle.Title
End If
Next
lblTelerikVersion.Text = title & " " & System.Reflection.Assembly.LoadFile(Server.MapPath("~/bin/Telerik.Web.UI.dll")).GetName().Version.ToString()

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Doug
Top achievements
Rank 1
Share this question
or