get telerik version and if trial (title)

1 posts, 0 answers
  1. Doug
    Doug avatar
    68 posts
    Member since:
    Aug 2014

    Posted 08 Jun 2015 Link to this post

    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()
Back to Top