I am employed in C#, and I wish to Publish to some website which has multiple checkboxes and returns a datafile based on which checkboxes are checked.

To begin with, how do you publish an application with checked checkboxes ? And when that's done, how do you obtain the datafile the website transmits me ?

You will want to have WebRequests while using System.Internet.HttpWebRequest namespace.

You may create a GET or a Publish reference to HttpWebRequest.

There is a great article onto it here and you will also take a look at System.Internet.HttpWebRequest on MSDN.

With this particular simple ASP code, we are able to observe how checkboxes values are sent via a Publish request:

tst.asp

<%

Dim chks

chks = Request.Form("chks")

%>

<html>

<head>

    <title>Test page</title>

</mind>

<body>

    <form title="someForm" action="" method="Publish">

    <input type="checkbox" id="chk01" title="chks" value="v1" />

    <input type="checkbox" id="chk02" title="chks" value="v2" />

    <input type="checkbox" id="chk03" title="chks" value="v3" />

    <input type="submit" value="Submit!" />

    </form>

    <h3>Last "chks" = <%= chks %></h3>

</body>

</html>

The H3 line show us this, as we check all of the checkboxes:

Last "chks" = v1, v2, v3

Now we all know the way the data ought to be published. Using the sample code below, you need to have the ability to get it done.

C# method sample

using System.Text

using System.Internet

using System.IO

using System

...

void DoIt()

world wide web-form-urlencoded"

    webrequest.Method = "Publish"

    webrequest.ContentLength = buffer.Length

    using (Stream data = webrequest.GetRequestStream())

    

    using (HttpWebResponse webresponse = (HttpWebResponse)webrequest.GetResponse())

    publish ok */

        

    



Hope I have assisted.

Helpful links: