Re: c# how to execute code and then submit a form
- From: "David Wier" <dw@xxxxxx>
- Date: Wed, 18 Jun 2008 11:44:39 -0500
With one event handler, and using the built in Button control, with ASP.Net,
you can do any number of things easily.
Just call the save and then do whatever you need it to do after that.
Are we talking about an HTML form, or an ASP.Net form?
David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
<j1dopeman@xxxxxxxxx> wrote in message
news:6d723339-e689-4158-8418-2e69de907f68@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I'd like to use a button to save and then submit a form. I can set
the onlick of the button to mahButton_click or submit, but I can't
figure out how to do both.
It looks like c# can't call a form's submit. I've found how to post
programatically, but I need to use the form's target attribute so that
the response goes into another frame, and I can't figure out how to do
that programatically.
I looking into using javascript to call the c# method and then submit,
but I keep finding that javascript can't call c# methods.
The timing isn't important, I just need to find a way for the button
to execute my method and also submit the form. The only way I can
think of is to use another hidden button that calls my method, and
have the visible button call a javascript method that will click the
hidden button and also submit, but this doesn't seem like a very good
solution. Also, I don't want to write to the page, so using
response.write in mahButton_click to write out a javascript submit is
out.
Any help is very much appreciated.
Thanks,
John
.
- Follow-Ups:
- Re: c# how to execute code and then submit a form
- From: j1dopeman
- Re: c# how to execute code and then submit a form
- References:
- c# how to execute code and then submit a form
- From: j1dopeman
- c# how to execute code and then submit a form
- Prev by Date: Re: All Sorts of Trouble with the Personal Site Starter Kit
- Next by Date: Re: c# how to execute code and then submit a form
- Previous by thread: c# how to execute code and then submit a form
- Next by thread: Re: c# how to execute code and then submit a form
- Index(es):
Loading