Support
Joined: 18 Jul 2005 Posts: 731
|
Posted: Fri Dec 19, 2008 4:38 am Post subject: HOWTO: Use the controls in an ASP.Net page |
|
|
To use the controls in the ASP.Net page, use the following HTML code:
Code: | <object id="fileView1"
classid="http:LogicNP.FileView.dll#LogicNP.FileViewControl.FileView"
height="300"
width="300" VIEWASTEXT>
</object> |
The LogicNP.FileView.dll file must be in the virtual directory of the ASP.Net application (the virtual directory of the above HTML file).
Set the execution permissions of the virtual directory to scripts. The control will not load correctly if the execution permissions are set to scripts & executables.
Next you need to change the .Net Framework security policy to grant 'Full Trust' permissions to your URL via the '.Net Framework Configuration' tool from Control Panel-->Administrative tools.
If the control does not run correctly, restart Internet Explorer or clear the assembly download cache using "gacutil /cdl" from the command line. Similarly, use "gacutil /ldl" to view the contents of the cache.
Calling methods and setting properties
The control API is accessible via script. For example, you can put a button and a textbox on the HTML page which sets the current folder of FileView as follows :
Code: | <script>
function SetCurrentFolder() {
fileView1.CurrentFolder = path.value;
}
</script>
<input type="text" id="path">
<input type="button" value="Change Text" onclick="SetCurrentFolder()"> |
Note
The above uses FileView as an example but is equally applicable to FolderView, ShComboBox, etc. |
|