Re: c# how to execute code and then submit a form
- From: j1dopeman@xxxxxxxxx
- Date: Wed, 18 Jun 2008 10:15:23 -0700 (PDT)
I need to submit the form after that, how can I do that? I need to
submit it through the page so that the target attribute is set, or if
I do it programmatically I need to make sure the response goes to a
different frame. I'm using an asp.net form.
On Jun 18, 12:44 pm, "David Wier" <d...@xxxxxx> wrote:
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 Wierhttp://aspnet101.comhttp://iWritePro.com- One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
<j1dope...@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: David Wier
- Re: c# how to execute code and then submit a form
- References:
- c# how to execute code and then submit a form
- From: j1dopeman
- Re: c# how to execute code and then submit a form
- From: David Wier
- c# how to execute code and then submit a form
- Prev by Date: Re: c# how to execute code and then submit a form
- Next by Date: SPAM
- Previous by thread: Re: 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):