By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,313 Members | 1,240 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,313 IT Pros & Developers. It's quick & easy.

How To Force a PostBack

P: n/a
Tom
Does anyone know how ot force a postback in the codebehind?

Thanks

Tom
Nov 15 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
you can also call the javascript method youself, I think its called
DoPostBack(.....)

"memememe" <[rem]casolorz[rem]@hot[rem]mail.com> wrote in message
news:%i********************@news2.central.cox.net. ..
when do you want the postback to happen? you can have some controls auto
post back when you set AutoPostBack=true;

"Tom" <da*****@fhlbcin.com> wrote in message
news:0c****************************@phx.gbl...
Does anyone know how ot force a postback in the codebehind?

Thanks

Tom


Nov 15 '05 #2

P: n/a
Hi Tom,

Memememe is right.

You can force a PostBack by setting "AutoPostBack=true;" in codebahind; or
you can call "Form1.submit();" in javascript to force a PostBack.

<form id="Form1" method="post" runat="server">
. . .
<INPUT type="button" value="Button" id="btn" onclick ="Form1.submit();">
. . .
</form>

Please let me know if you need more information. Thanks.

Best regards,
Lewis

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "Tom" <da*****@fhlbcin.com>
| Sender: "Tom" <da*****@fhlbcin.com>
| Subject: How To Force a PostBack
| Date: Fri, 29 Aug 2003 07:46:46 -0700
| Lines: 5
| Message-ID: <0c****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Thread-Index: AcNuPF7mAfLNO1WFQXioU2kR8HHl8g==
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:180686
| NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Does anyone know how ot force a postback in the codebehind?
|
| Thanks
|
| Tom
|

Nov 15 '05 #3

P: n/a
Hi!

Check this lin in the MSDN documentation which exemplifies how to do a
client side postback manually:

ms-help://MS.NETFrameworkSDKv1.1/cpguidenf/html/cpconpostbackusingjavascript
sample.htm

--

Regards,
Gaurav Khanna
----------------------------------------------------------------------------
----------------
Microsoft MVP - .NET, MCSE Windows 2000/NT4, MCP+I
WinToolZone - Spelunking Microsoft Technologies
http://www.wintoolzone.com/
"Tom" <da*****@fhlbcin.com> wrote in message
news:0c****************************@phx.gbl...
Does anyone know how ot force a postback in the codebehind?

Thanks

Tom

Nov 15 '05 #4

P: n/a
Tom
Dear Gaurav Khanna

I'm having trouble getting to your link.
I tried this but got a 404 error

ms-
help://MS.NETFrameworkSDKv1.1/cpguidenf/html/cpconpostbacku
singjavascriptsample.htm
Can you resend to me?

-----Original Message-----
Hi!

Check this lin in the MSDN documentation which exemplifies how to do aclient side postback manually:

ms- help://MS.NETFrameworkSDKv1.1/cpguidenf/html/cpconpostbacku
singjavascriptsample.htm

--

Regards,
Gaurav Khanna
---------------------------------------------------------- ----------------------------------
Microsoft MVP - .NET, MCSE Windows 2000/NT4, MCP+I
WinToolZone - Spelunking Microsoft Technologies
http://www.wintoolzone.com/
"Tom" <da*****@fhlbcin.com> wrote in message
news:0c****************************@phx.gbl...
Does anyone know how ot force a postback in the codebehind?
Thanks

Tom

.

Nov 15 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.