473,397 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

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 1935
Unfortunately, there is no way to do that. The reason for this is because as
a security measure, there is no way to programmatically 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********@hotmail.com
http://www.nathansokalski.com/

"Chris" <no****@nospam.comwrote in message
news:eZ**************@TK2MSFTNGP03.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********@hotmail.comwrote in message
news:eY**************@TK2MSFTNGP04.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 programmatically 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********@hotmail.com
http://www.nathansokalski.com/

"Chris" <no****@nospam.comwrote in message
news:eZ**************@TK2MSFTNGP03.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********@hotmail.comwrote in message
news:eY**************@TK2MSFTNGP04.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********@hotmail.comwrote in message
news:eY**************@TK2MSFTNGP04.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 programmatically 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********@hotmail.com
http://www.nathansokalski.com/

"Chris" <no****@nospam.comwrote in message
news:eZ**************@TK2MSFTNGP03.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
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...
3
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...
5
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";...
1
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...
1
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:...
1
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...
10
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...
9
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,...
2
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...
0
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...

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.