473,320 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How To Force a PostBack

Tom
Does anyone know how ot force a postback in the codebehind?

Thanks

Tom
Nov 15 '05 #1
4 26157
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Julie Barnet | last post by:
I would like to be able to force a postback when a user tabs off of a user control. I currently have the following code: <script language="JavaScript1.1"><!-- function keyPressed() {...
3
by: Grigs | last post by:
Hello, I have an ASP.Net webform that shows numerous attributes of parts we sell. There is one portion of the form that I have the user click a button to get the information for. I did this for...
4
by: DEWright_CA | last post by:
I need to be able to from C# launch a postback. I have a command button that launches a function, I also have a javascript function that then keeps you from firing any other objects on the page,...
7
by: kaburke | last post by:
Is there a way to make a page at the receiving end of a Server.Transfer think that the request is a Postback? (When I say "think it is a Postback," I mean I want the page to go through the ENTIRE...
2
by: Byron Hopp [MCS] | last post by:
How do you force a postback, we have a button to save our users entry, but the button does not have a postback property (like the dropdownlistbox). Is there a way to force a postback? Byron...
0
by: jobs at webdos | last post by:
I have form with a checkbox with autopostback. When I click on the form I want to update a table with the boolean and stamp a datatime field, then come back and display *EXACTLY* what is in the db...
2
by: Phillip Vong | last post by:
I know how to check IsPostback, but what is the VB code to force a postback? I have a link I want to do a postback with this URL. I've tried using Postback and I've tried using doPostback. Am I...
2
by: DB | last post by:
I have a page that uses ComponentArt components. I have an imagebutton to update one part of the page and there is a graph that should update with it. The problem is the graph has some funky...
3
by: Lohboy | last post by:
Using ASP.NET and IE7. (Sorry if I am posting in the wrong forum but my problem seemed to be more related to the JavaScript side than the ASP.NET side.) I have two DropDownList controls the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.