Remote API Implementation > Writer > Sample Code - ASP dot NET

Sample Code - ASP dot NET

Tags:  

ASP.NET Sample


When you wish to edit and save your document using Zoho Writer's editor to your remote server, you need to do a form submit from your application to Zoho Writer as mentioned here.

The response for this form will be a Zoho Writer editor with the content of the document loaded. After editing your document, when you press save, Zoho Writer converts the document to the required format(doc/pdf/sxw...etc.,) specified in the above form and sends the modified content to the saveurl.

Assume your saveurl is - http://yourwebsite.com/SaveDoc.aspx

This is how your SaveDoc.aspx will look like:
 


'this is page load event

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

'declaring variable - object declared to get the file upload content

 Dim m_objFile As HttpPostedFile

 Dim filename As String

'here we get the request file name

m_objFile = Request.Files("content")

'here we are getting the exact file name what we send in the input html

filename = Request.QueryString("filename")

'saving the path in the local server

Request.Files("content").SaveAs("C:\inetpub\" + filename)

End Sub
 


Please note that any text inside the code preceded by single quotes (') is a comment in ASP.Net.




 RSS of this page