0

I am trying to pass lvsession from the codebehind to aspx file. It keeps telling me is not declared or inaccessible due to its protection level. I've tried making it a Public variable at the class level and still no luck. I am really new to asp.net so thanks in advance.

Default.aspx

   <object xmlns: id="viewer" classid="clsid:d4290153-c4b5-4c27-9d66-44e94d6b0c32"
   codebase="" height="700" name="viewer" width="800">
   <param name="ServiceHandlerURL" value="" />
   <param name="SessionID" value="<%lvsession%>" />
   <param name="DocumentID" value="180484" /> 
   </object>
</body>

</asp:Content>

Default.aspx.vb

Public Class WebForm1
Inherits System.Web.UI.Page
Public Property lvsession As String

Public Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim authProps As OnBaseAuthenticationProperties = Hyland.Unity.Application.CreateOnBaseAuthenticationProperties("https://test.com/", "Manager", "password", "Test")
    Dim app As Hyland.Unity.Application = Hyland.Unity.Application.Connect(authProps)



    lvsession = app.SessionID
End Sub

End Class
Hans Kesting
  • 38,117
  • 9
  • 79
  • 111
user1836775
  • 133
  • 1
  • 1
  • 4

1 Answers1

0

Update: When I use <%lvsession%> it returns me error and when I use this format it returns me the desired value. <%: lvsession %>

Public Property lvsession As String
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    lvsession = DateTime.Now.Year.ToString()
End Sub

So I don't think the problem is related to lvsession unless it works in <%: lvsession %> format.

Can you try :

Dim app As New Hyland.Unity.Application
app.Connect(authProps)

And thank you @mason for your suggestion. Bu my answer was suggesting to create an instance and I think it was clear even if it is short:

I suppose you should create an instance of your lvsession

please see [this answer]2

Community
  • 1
  • 1
wooer
  • 1,677
  • 2
  • 16
  • 27
  • You should provide more detail, rather than leaving it all up to the link to explain. Otherwise, flag the question as a duplicate if the answer you linked to sufficiently explains how to resolve the issue. – mason Sep 11 '14 at 22:24