Page 1 of 1

asp.net web page with master page file

Posted: Fri Jan 11, 2013 7:40 pm
by PQSIK
Hi there,

I have two question and both would be solved with the same idea and code.

1:
I have tried to set the License Number with a this js and I get the license not set message.

Code: Select all

function unlockGdPicture() {
        m_GdPictureImaging.SetLicenseNumberUpgrade('<%=OldVal %>','<%=NewVal %>');
    }
and in the codebehind I have

Code: Select all

Public ReadOnly Property NewVal As String
        Get
             Return "xxxx"
        End Get
    End Property
    Public ReadOnly Property OldVal As String
        Get
            Return "xxxx"
        End Get
    End Property
2:
I also want to set the path to tiff file paths selected in a grid. How can I set the tiff in gdpicture view

I tried

Code: Select all

function displayDoc() {
        var f = document.getElementById("GdViewer1");
        f.DisplayFromFile('<%=FilePath %>');
    }

'code behind

Public Property FilePath As String
        Get
            Return m_FilePath
        End Get
        Set(value As String)
            m_FilePath = value
        End Set
    End Property
Should this work or I'm I doing it wrong. What would be the correct way?

Thanks

pqsik

Re: asp.net web page with master page file

Posted: Tue Jan 15, 2013 12:42 am
by PQSIK
Hi,

I now have the viewer showing tiffs but I cannot get it to work with this

Code: Select all

function displayDoc() {
            //unlockGdPicture();
            var oGdViewer = document.getElementById("GdViewer1");
            oGdViewer.DisplayFromFile('<%=FilePath %>');
            }
but this does work

Code: Select all

function displayDoc() {
            //unlockGdPicture();
            var oGdViewer = document.getElementById("GdViewer1");
            oGdViewer.DisplayFromFile("");
            }
I think it maybe permissions loading the file, The web project is a file system.

Re: asp.net web page with master page file

Posted: Wed Jan 16, 2013 10:12 pm
by PQSIK
Hi,

I have been trying to get this working for a few days now and still no luck.

I have now used a hidden field code below.

Code: Select all

        var oGdViewer = document.getElementById("GdViewer1");
        alert(document.getElementById('<%= HiddenField1.ClientID %>').value);
        var img = document.getElementById('<%= HiddenField1.ClientID %>').value;
        oGdViewer.DisplayFromFile(img);
The alert show the path to the file, but its not showing the tiff in the gdpviewer.
I can remove the img from oGdViewer.DisplayFromFile(img); and
use oGdViewer.DisplayFromFile(""); it opens the file dialog box and shows the tiff.

My question is can oGdViewer.DisplayFromFile only work with two double quotes?
If not how can it be done.

Thanks
pqsik

Re: asp.net web page with master page file

Posted: Fri Jan 18, 2013 2:28 pm
by PQSIK
I have it working now

post closed

pqsik