473,669 Members | 2,372 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How To Force a PostBack

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

Thanks

Tom
Nov 15 '05 #1
4 26187
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******** ************@ne ws2.central.cox .net...
when do you want the postback to happen? you can have some controls auto
post back when you set AutoPostBack=tr ue;

"Tom" <da*****@fhlbci n.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=t rue;" 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*****@fhlbci n.com>
| Sender: "Tom" <da*****@fhlbci n.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: AcNuPF7mAfLNO1W FQXioU2kR8HHl8g ==
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| Path: cpmsftngxa06.ph x.gbl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1806 86
| NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.NETFramework SDKv1.1/cpguidenf/html/cpconpostbackus ingjavascript
sample.htm

--

Regards,
Gaurav Khanna
----------------------------------------------------------------------------
----------------
Microsoft MVP - .NET, MCSE Windows 2000/NT4, MCP+I
WinToolZone - Spelunking Microsoft Technologies
http://www.wintoolzone.com/
"Tom" <da*****@fhlbci n.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.NETFramework SDKv1.1/cpguidenf/html/cpconpostbacku
singjavascripts ample.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.NETFramework SDKv1.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*****@fhlbci n.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
4326
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() { key=event.keyCode; if (key==9) { **WOULD LIKE TO FORCE A POSTBACK HERE ON cboTest **WOULD LIKE TO MOVE TO txtNext HERE. DO I NEED TO PASS THE
3
2195
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 two reasons: 1) not everyone wants to see it every time. 2) Depending on the complexity of the part, it can take a while. Everything works great. However, on complex parts (say that return 10,000 + lines) the browser says it is "Not...
4
1624
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, but when the function finishes the page needs to postback, but my function is in codebehind. What command do I need to call to say in my finnaly to postback my page??? -- D @ premierdata
7
3309
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 event sequence for a postback, including LoadViewState, ProcessPostData, etc.) Even when Sever.Transfer transfers a page to itself (i.e., Page A.aspx contains Server.Transfer("A.apsx")) the request is seen as a first-time request, not a Postback....
2
1843
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
1202
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 for the boolean and datetime field. I've tried every combination testing ispostback and forcing postbacks with return. I either end up having to click twice or am finding that what's on screen is not matching the db. Presuming the checkbox is...
2
1904
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 missing something? I just want the link to postback to this site. "~/Misc/Forms.aspx?InsertMode=Yes"
2
5954
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 viewstate memory and does not update unless I hit F5 to to refresh the page. Is there a way to force a PostBack/rRefresh from the C3 code?
3
10572
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 second of which resides within an UpdatePanel control which responds to a change in the first DropDownList. I also have a hidden button nested inside the UpdatePanel to force a postback via JS. The user uses these two DropDownList controls to create...
0
8465
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8383
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8894
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8587
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8658
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7407
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5682
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2792
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2029
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.