0

Now currently uploading a file only through below code .. what actually looking is need to send a value "myValue" too how can i achieve this

 string message, title, defaultValue; string myValue; message = "Enter Image name please"; title = "Image name"; defaultValue = "1"; myValue =Interaction.InputBox(message, title, defaultValue,100,100); using (System.Net.WebClient Client = new System.Net.WebClient()) { Client.Headers.Add("Content-Type", "binary/octet-stream"); Client.Headers.Add("SESSION-KEY", App.Session_Key); try { byte[] result = Client.UploadFile(Screenshot.Properties.Resources.APIURL + "Upload.php", "POST", "temp.png"); 

here i need to send "myValue " too while file upload

2
  • It is quite unclear what you want to achieve - please read duplicate I selected and see if that aligns with what you are asking, than edit the question if it needs to be re-opened. At very least clarify what server is expecting as request. Commented Jan 3, 2023 at 19:33
  • @AlexeiLevenkov now works for file upload but iam looking how to pass a string to client.uploadfile() like Client.UploadFile(url, "POST", "temp.png","new value"); Commented Jan 3, 2023 at 19:38

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.