creating a file in client side

Hi ,
I am a newbie in C# language.
I want to create a XML file in client system whenever a button is clicked.(The button is in WEBPAGE.)
.Is it possible Can any one please help me
Thanks,
justindhas.




Answer this question

creating a file in client side

  • Dasa

    Hi Babak,
    Thanks for your reply.
    My problem was " I am creating one Windows service,which runs in client machine ,The service get the IP address,other details from the web through XML and Upload some files to the corresponding server."
    (Here I need one XML file(in client machine) to get the IP address from web thats what I asked about xml file creation in Client machine.so that only I can easily upload the files).
    How can I get the IP address and other details from web to my client machine.
    Is it possible.or Any other way to solve this problem.Please help me.....
    Regards,
    Justin



  • bilalso

    Hi,

    Take a look at SSI, or server side includes, they contain the information you are looking for with regards to a web request.

    I take it you are using ASP.NET it does not actually matter if you only wish to get the information into the client, SSI must be enabled on the web server and then you can use a simple echo directive in your HTML to have it print out the value of a specific server environment variable.

    <!--#echo var="REMOTE_HOST"-->

    Prints the public IP address of the client, if you want the private ip address then you will need a process on the client to provide that for you such as a java applet.

    To obtain that information on the server side, such as with ASP.Net use Request.ServerVariables("$variable");

    If you want to generate an XML file it will be easiest to generate on the server side using XmlDocument, take a look at :

    http://www.codeproject.com/soap/myXPath.asp

    If you then want to pass that document to the client for processing (sorry I am not totally clear on your requirements) consider researching AJAX, which is a collection of javascript dependant method of dynamically loading web content, usually via XML, take a look at this: http://devzone.skillfusion.com/ajaxArticle4.php

    Regards



  • Shailendra Kumar

    hi

    so ur client is random user or specific if it's specific namely u know the ip and port first, i think u could establish a connection between the service of the client and ur server .then when the user click ur webpage,ur webserver can do some work to communicate the specific user..if the user is random,how can u setup a windows service on it i have no idea ...

    it's just my thought.i am a beginner too....:D



  • redshock

    Dear Justin,

    For security reasons, you can not save anything on your clients machine (except cookies).
    Please explain more about you problem, maybe I can help you.

    ___________________________________________
    May the God blessings be.

    LotraSoft Ltd.



  • creating a file in client side