VBTrain.Net Documentation

LmsApi2.GetDevProperty Function

Returns the value of an LmsApi2 property that was previously set using the SetDevProperty method.

Public Function GetDevProperty( _
ByVal propName As String _
) As String

Parameters

propName
Name of the property.

Remarks

Use SetDevProperty to store properties to an LmsApi object, GetDevProperty to retrieve a stored value, and RemoveDevProperty to remove a stored property.

Example

The following example assumes the VBTrain.WebTracking namespace has been imported. In this example, the LmsApi for the session has been stored as a property (LmsApiObject) of the current class.

[Visual Basic]
Dim apiObject As LmsApi = Me.LmsApiObject

If Not IsNothing(apiObject) Then
    If apiObject.GetDevProperty("studentName") <> Nothing Then
        sNameLabel.Text = apiObject.GetDevProperty("studentName")
        sNameLabel.Visible = True
    Else
        sNameLabel.Visible = False
    End If
Else
    sNameLabel.Visible = False
End If

See Also

LmsApi2 Class | LmsApi Members | SetDevProperty | RemoveDevProperty