c# how to execute code and then submit a form
- From: j1dopeman@xxxxxxxxx
- Date: Wed, 18 Jun 2008 08:20:14 -0700 (PDT)
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: David Wier
- Re: c# how to execute code and then submit a form
- Prev by Date: Re: Who's accessing what pages on my website.
- Next by Date: Re: vb.net to c#
- Previous by thread: Who's accessing what pages on my website.
- Next by thread: Re: c# how to execute code and then submit a form
- Index(es):