473,383 Members | 1,801 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,383 software developers and data experts.

WebBrowser Control problem

I am building a Windows application that hosts an ASP.NET application using the MS Web Browser Control. (see http://www.west-wind.com/presentatio...netruntime.asp for a similar app). I run into problems if one of my ASP.NET pages needs to upload a file (via HTTP). I am using the BeforeNavigate2 event of the Web Browser Control to find the target URL that the browser is trying to navigate to, process the page using the .NET runtime, and then redirect the browser to the processed page.

The problem however is whenever the postData should include file data. The postData buffer (a System.Byte array) only includes the data up to the point where the actual file contents should be. An example, trying to upload a text file

[start of postData buffer
-----------------------------7d43d2a4301a
Content-Disposition: form-data; name="__VIEWSTATE

dDwzMzE1NzE4ODE7Oz5UBPSkAU4QqiCLuPn0GKSUITDjpA=
-----------------------------7d43d2a4301a
Content-Disposition: form-data; name="MyFile"; filename="C:\Documents and Settings\schellhase\Desktop\hello.txt
Content-Type: text/plai

[end of postData buffer
The postData contains no more data: not the file, not the boundary string for the file and not any other fields following the file upload in the form. My question is: why does the postData buffer stop here and how can I get the rest of this data? (I realize since this is local I can just use the filename to read the file locally, but I'd rather not do this - this also means I'd lose any fields in the form that come after the file

Thanks

Nov 15 '05 #1
0 1349

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

Similar topics

12
by: Alex Clark | last post by:
Greetings, (.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs). I've decided to take advantage of the layout characteristics of HTML documents to simplify my printing tasks, but...
8
by: Prosperz | last post by:
Hi, I would like to make thumbnails of web page by capture content of a WebBrowser. By example, capture http://www.google.com. I used WebBrowser control with Framework 2.0. I try this : ...
2
by: Jeroen | last post by:
We are experiencing a tuff-to-debug problem ever since we introduced a WebBrowser control into our failry large application. I'm not sure if the problem description below contains enough details,...
4
by: kimiraikkonen | last post by:
Hi, Just to test, i placed a simple webbrowser to login a site, this site has no problems and has same error with IE6 SP2 but it's suppressed as well and no problem with Firefox browser, but using...
11
by: kimiraikkonen | last post by:
Hi there, I needed to use MouseOver event on Webbrowser which is NOT provided by webbrowser control natively(what a disappointment), so i decided to go with another route to simulate this like: ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.