473,586 Members | 2,491 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Automate Post

I have a web page that I want to automate a post to. I would use the web
request. However the post involves a file upload. What would be the best way
of doing this? Regards, Chris.
Feb 4 '07 #1
4 1944
Unfortunately, there is no way to do that. The reason for this is because as
a security measure, there is no way to programmaticall y select the file that
the FileUpload control (which generates an input type="file" tag). Sorry,
but security does have it's occasional drawbacks.
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

"Chris" <no****@nospam. comwrote in message
news:eZ******** ******@TK2MSFTN GP03.phx.gbl...
>I have a web page that I want to automate a post to. I would use the web
request. However the post involves a file upload. What would be the best
way of doing this? Regards, Chris.

Feb 4 '07 #2
Sorry I didn't make myself clear. There is a form I manually have to upload
a file to. I have the file and want to automate the process by posting a
stream to the form and have it upload and process the file.Regards, Chris.

"Nathan Sokalski" <nj********@hot mail.comwrote in message
news:eY******** ******@TK2MSFTN GP04.phx.gbl...
Unfortunately, there is no way to do that. The reason for this is because
as a security measure, there is no way to programmaticall y select the file
that the FileUpload control (which generates an input type="file" tag).
Sorry, but security does have it's occasional drawbacks.
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

"Chris" <no****@nospam. comwrote in message
news:eZ******** ******@TK2MSFTN GP03.phx.gbl...
>>I have a web page that I want to automate a post to. I would use the web
request. However the post involves a file upload. What would be the best
way of doing this? Regards, Chris.


Feb 4 '07 #3
"Nathan Sokalski" <nj********@hot mail.comwrote in message
news:eY******** ******@TK2MSFTN GP04.phx.gbl...
Sorry, but security does have it's occasional drawbacks.
Though not in this case, obviously...
Feb 4 '07 #4
You can use one of the overloaded methods of the simplified WebClient Class.
I believe it is "UploadData ".
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Chris" wrote:
Sorry I didn't make myself clear. There is a form I manually have to upload
a file to. I have the file and want to automate the process by posting a
stream to the form and have it upload and process the file.Regards, Chris.

"Nathan Sokalski" <nj********@hot mail.comwrote in message
news:eY******** ******@TK2MSFTN GP04.phx.gbl...
Unfortunately, there is no way to do that. The reason for this is because
as a security measure, there is no way to programmaticall y select the file
that the FileUpload control (which generates an input type="file" tag).
Sorry, but security does have it's occasional drawbacks.
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

"Chris" <no****@nospam. comwrote in message
news:eZ******** ******@TK2MSFTN GP03.phx.gbl...
>I have a web page that I want to automate a post to. I would use the web
request. However the post involves a file upload. What would be the best
way of doing this? Regards, Chris.


Feb 5 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5263
by: [nix] | last post by:
Hi, I'm trying to automate a process to upload a file to hotmail, but having a strange error and I don't know what I'm doing wrong with the script. below is the code: use HTTP::Request::Common; use LWP;
3
1163
by: robboll | last post by:
Hi -- I have a Data entry/sequencing problem. Any help appreciated. Here is the scenario: Given -- A table with the following fields and sample data: LineNo Pri Comp Init Tgtno PMno 1 1 1 1 a 1 2 1 1 2 a 1 3 1 1 2 b 1 4 1 1 2 c 1
5
3836
by: James Johnson | last post by:
Dear C#dex, You can automate a POST and interrogate the resulting HTTP stream using code such as: HttpWebRequest hwreq = (HttpWebRequest)WebRequest.Create(url); hwreq.Method = "POST"; hwreq.ContentType = "application/x-www-form-urlencoded"; hwreq.ContentLength = buffer.Length; hwreq.Proxy = new WebProxy("Gloriadias", true);
1
1931
by: Vijay Neelam | last post by:
How can I automate Microsoft Word from ASP.NET. My requirement is like this I have Datagrid with checkboxes... I need to export checkbox selected rows into Microsoft Word. I tried to automate using vbscript got some problems on ASP.NET page the same code worked fine in .html file.
1
1453
by: branden.hughes | last post by:
I'm trying to automate this for a mass-processing of GDC number information (scrapping). I've tried everything I can think of and every example I've come across to no avail. The root site is: http://www.dcor.state.ga.us/GDC/OffenderQuery/jsp/OffQryForm.jsp posting the following:...
1
2061
by: morau99 | last post by:
I want to create a "phrase of the day" post to an online language forum I participate in. I would like to automate this process so that I can randomly pull out of a big table a phrase and easily keep track of used phrases and not have to copy and paste over and over. The site requires a login, the HTML source reveals the following relevant...
10
2174
by: Killer42 | last post by:
Hi all. If necessary I'll repost this in the Windows forum, but I thought this would be a good place to hit a fair cross-section of the community. Besides, anyone can see that all the best brains post here. ;-) I have a bit of a problem with scripting an FTP under Windows XP, and was hoping someone can shed some light on it. I'm quite...
9
9301
by: Ots | last post by:
I'm using SQL 2000, which is integrated with a VB.NET 2003 app. I have an Audit trigger that logs changes to tables. I want to apply this trigger to many different tables. It's the same trigger, with the exception of the table name. I could manually change the table name in the trigger and create it, over and over, but I'd like to automate...
2
1502
by: =?Utf-8?B?QWxleGFuZGVyIFd5a2Vs?= | last post by:
Is it possible to automate a COM object ebmeded in an excel document run the process and return the results in a C# .NET application? Or better yet extract the com object some how and just run it in .NET? -- Alexander L. Wykel AW Software Works
0
7915
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7841
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8204
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8339
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7965
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5712
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3869
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.