How to post to .ashx from .aspx page


I have a .ashx handler that is used to upload images from flash, however testing through flash is cumbersome, so I wish to use a fileUpload control in an aspx page and post to the handler. Is this possible and what would be the correct way of doing it? 



5/4/2009 9:52:45 PM 93655 articles. 2 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 40


setting PostBackUrl on your submit button should do the job:

Hope it helps. Bye!

Helping someone does not mean giving them what they need, but making them able to get it themselves
The Code Golem
5/4/2009 10:03:04 PM

Heh. Sometimes the simple way is the right way. I am pleased I didn't spend to long looking at the HttpWebRequest class :)

Thanks a lot. Big Smile

5/4/2009 10:14:29 PM

Similar Artilces:

Could PB .NET Web Form POST security Information to others web page??
This is a multi-part message in MIME format. ------=_NextPart_000_00F9_01C9C4D5.8FB45C90 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: quoted-printable Hi,=20 Have anyone came across the requesion to POST security informations from = PB .NET web form web page to other web site?? I have tried many datys, Could any kind man give me some suggessions?? thanks & Best regards Leon ------=_NextPart_000_00F9_01C9C4D5.8FB45C90 Content-Type: text/html; charset="big5" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML P...

Both C# ASPX pages and VB.NET ASPX in single VB.NET Web Applcation Template
Hi.. Is it possible to have both c# pages and VB pages in same Webapplication, what i chose is VB.NET Web application Template. With Thanks, Jaya.... I don't see why you couldn't, but for the sake of consistency I don't know why you would want to do this. When you choose a C# or VB.NET application template(I'm assuming you're using VS or WebMatrix), it simply creates a .aspx file that includes a page directive that specifies the page language. If you created a C# template but want to use VB.Net instead, you need to go from: <%@ Page Language="C#" .... to...

Can my web page with a form submit to other web pages forms?
I was wondering if I created an aspx page that had a form on it that I could use the submit button to submit this form's contents to other web pages forms(servers accepting those form's data). I am thinking this would be a great way to update data on particular web pages without having to actually visit those similar web pages. Any ideas, examples would be much appreciated. Thanks in advance.  Yes you can.  It's called Cross Page Posting: might ...

Posting values from one web form to another aspx page
How would I post the values from a form in my application to another form in someone elses application using I understand it differs from asp 3.0 as pages in 1.1 post to themselves and a redirect doesn't post the values to the other form. Any help would be appreciated. If its on the same server try Context.Items["name"] = myText; Server.Transfer("page.aspx"); The application is on a different server. Would/Could/Should I have my aspx page redirect to a asp page which would then collect and transmit the values to the "other" app...

How to post static HTML form post to aspx page?
I need help to create two pages. Page 1 is a standard HTML web page with a form which contains 1 hidden field with a numeric value and 3 buttons with a numeric value as well with a button to post data. Ex: Price = $15.00 and Qty = 1, 2 or 3 units on HTML page. Page 2 needs to be a standard aspx page which receives posted data from Page 1 via a Request.Form. Aspx page will show in label fields both the price and qty values. I look forward to any comments and coding examples. Sounds like you are asking for the solution to your homework :-)Remy BlaettlerChief of the SystemSupertext AG Hi, ...

How to pass the form contents of aspx page in .Net to Jsp page
Hi,   I want to pass the login information from aspx page to jsp page. plz help me how to do it. Please reply asap. Thanks...

Posting ASPX page to another ASPX page
Hello ; if i want to post my data from my server to thrid party (payment gatway) , how can i post my from and data  to payment gateway page . As we know ASPX doesn't post to another aspx , it just posts to itself , i read many articles they do this by scripts run at server but i need to post my data and page without anyscript  ? So my question is how can i post form (ASPX) without using scripts to to utilize Session State .?     If you want to post your data to another page, use the Response.Redirect(str url). If you want to transfer all the data on you...

Web Menus / User controls in aspx web page and .aspx C# based web templates
Dear all, I have created several user controls and included in the webpages. (This user control is a navigation menu consisting of images) This has to be included in all webpages. But when i tried to publish i get error messages for them. But i can’t remove since i need these user controls. Error message given below Error 2 The type 'WebUserControl' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\new_latest\d203e69a\d67c356f\App_Web_ijsq-eqk.dll' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\new_la...

FORM POST to .aspx page?
How can I pick up values posted from a regular .html page in my target .aspx page?Say the .html page contains...<CODE><form name="fa" action="insert_email.aspx" method="POST"><b>Email: </b> <input type="text" name="email" size=40> <p><input type="submit" value="Submit"></p></form></CODE>How can I retrieve the emailaddress in insert_email.aspx?/Raymond  void Page_Load()  {     string inputValue = Request.Form["email"];     Response.Write(inputValue);  }"Object reference no...

how to open a web page in form of a popup web page
Hello, I have two web pages, let say. Page A : With a Button on it. PAge B: with some info. Now I need to: When I click on the Button of page A.Page B must open in a pop up window.  I can do this but problem is this when I clicked on the button for first time it does not show me any thing and when I clicked on the button for second time then It shows me Page B .My code is as follow:  1 protected void Page_Load(object sender, EventArgs e) 2 { 3 if (!this.Page.IsPostBack) 4 { 5 6 } 7 else 8...

Urgent!!! Form inside Windows form control (that is embedded to Web page i.e aspx), not displayed on button click
 Hi all I have a Windows Form Control(i.e Windows Control Library), that consists of a Button "button1" and  a panel "panel1". Also I have a form "form1.cs". On form "form1.cs" I have a label whose text value i have set to  "Hi". On click of button "button1" on windows form control i am opening the form "form1.cs"  inside a panel and it displays "Hi". The code of windows form control is as below :  public partial class UserControl1 : UserControl    {    ...

Enbedding aspx page into another aspx page and post back
I have four aspx pages A,B,C and D. My scenerio is whenever there is request for B or C or D , the three should get merged and it should be rendered through A (A is empty page). And if there is any post back from these three, it should be posted to the respective page and the rendering should takes place as in the first request. How can i acheive this? I have tried by writing httpHandler and GetPageCompiled Instance() to merge the three pages.Please Help. Thanks in Advance try server.execute()"One who lacks kindness of the heart lacks all good" [Muslim] I would use a different approach.&...

Is there a way to add MVC to an existing web-forms-based web site so that the old .aspx pages still work alongside MVC?
I have an existing web site that needs to continue working in its old fashion as I make updates to it. I want to add the MVC framework to the web site, and then, as time permits, I want to be able to convert the original web forms-based pages into MVC-style actions/urls/views/etc. All the while, having both styles of pages working at the same time, so that I could for example update one section of the web site to use MVC and leave the rest of the site still using the web form style. Is this possible? Is it just as easy as doing it, or is there some special configuration t...

Calling an aspx page on form submission in another aspx page
I have 2 aspx pages called say page1.aspx and page2.aspx, and I am calling the second aspx page on submission of a form in the first page. Thus, I have the following code in page1.aspx <form name="frmtest" id="frmtest" method="post" runat="server" action="page2.aspx"> Now, when I submit the form, I am getting the following error message: The viewstate is invalid for this page and might be corrupted. Could anyone help me in this? Thanx in advance. Himanshu Hi, currently ASP.NET sets the action back to itself (...

Web resources about - How to post to .ashx from .aspx page -

Huffington Post Canada - Canadian News Stories, Breaking News, Opinion.
Get the latest Canadian and world news covering politics, business, lifestyle and the viral web. Join the conversation on issues that matter ...

'Be a leader' - Bangkok Post: news
US Secretary of State Clinton (above) meets the Thai foreign minister in Washington and urges Thailand to now assume a greater leadership role ...

Christian News, The Christian Post
Christian news on The Christian Post, the largest Christian newspaper in the world featuring world Christian news, Christian news sites, and ... - Connecticut Post
Copyright 2013 Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

Colorado Breaking News, Sports, Weather, Traffic - The Denver Post
Denver and Colorado local breaking news from The Denver Post, including sports, weather, traffic, business, politics, photos, multimedia, Twitter ...

The Fandom Post
Anime, Movies, Comics, Entertainment & More

Hays Post - Hays Kansas News, Opinion, Video
Topic Hays News Kansas News Sports Editor's Choice Police Department Arrest Log Obituaries Cancellations/Delays Entertainment Agriculture Announcements ...

Breaking News and Opinion on The Huffington Post
BreakingNews and Opinion Editorial Director, AOL Huffington Post Media Group Dick Lugar was a nice guy who stayed too long. But his crushing ...

Boston, MA, 07/12/2013 (nysepost) - The shares of Apollo Group Incorporation (NASDAQ:APOL), which is the one of the for-profit education company ...

The Post and Courier - Charleston SC, News, Sports, Entertainment delivers the latest breaking news and information on the latest top stories, weather, business, entertainment, politics, and ...

Resources last updated: 2/9/2016 6:56:56 AM