473,811 Members | 3,135 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Forcing a page to postback

I suppose the answer to this is staring me in the face but....

How do I programmaticall y get a page to post back?

The actual situation is that I am using an aspx table control and
changing the text within a cell. Though the cell text is updadated
successfully it does not show up on the screen until it the page is
posted back..

At the moment I am using a button which does nothing, processes no
code, but ensure a postback .

I wish to be able to force this postback as soon as the text in the
cell is updated (programmatical ly) so that it shows up on the screen
immediately.

I would be grateful for any help,

Best wishes, John Morgan
Jan 22 '07 #1
3 2413
You can setup a client side event that will make a javascript call
myForm.submit() . Alternatively you can use one of the methods exposed by the
Page class: GetPostBackClie ntEvent, GetPostBackClie ntHyperlink,
GetPostBackEven tReference.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"John Morgan" <jf*@XXwoodland er.co.ukwrote in message
news:ll******** *************** *********@4ax.c om...
>I suppose the answer to this is staring me in the face but....

How do I programmaticall y get a page to post back?

The actual situation is that I am using an aspx table control and
changing the text within a cell. Though the cell text is updadated
successfully it does not show up on the screen until it the page is
posted back..

At the moment I am using a button which does nothing, processes no
code, but ensure a postback .

I wish to be able to force this postback as soon as the text in the
cell is updated (programmatical ly) so that it shows up on the screen
immediately.

I would be grateful for any help,

Best wishes, John Morgan

Jan 22 '07 #2
If you are using a table, my guess is that you have multiple cells that you
will be updating, the postback will probably become really annoying.
You should probably look into hooking up ASP.Net Ajax http://ajax.asp.net
or Anthem http://anthemdotnet.com and refreshing just the table,
instead of forcing a postback on the entire page.

Also, tables are really heavy on the HTML and because of your choice not to
use a data grid, you probably don't care about paging, sorting, or
displaying hierarchal data. You would probably be better off writing you own
custom control to display CSS friendly Spans and Divisions.

Regards,
Brian K. Williams

"John Morgan" <jf*@XXwoodland er.co.ukwrote in message
news:ll******** *************** *********@4ax.c om...
>I suppose the answer to this is staring me in the face but....

How do I programmaticall y get a page to post back?

The actual situation is that I am using an aspx table control and
changing the text within a cell. Though the cell text is updadated
successfully it does not show up on the screen until it the page is
posted back..

At the moment I am using a button which does nothing, processes no
code, but ensure a postback .

I wish to be able to force this postback as soon as the text in the
cell is updated (programmatical ly) so that it shows up on the screen
immediately.

I would be grateful for any help,

Best wishes, John Morgan

Jan 22 '07 #3
Thanks both of you for your advice.

I am looking into it at this moment,

Best wishes, John Morgan

On Mon, 22 Jan 2007 13:28:44 GMT, John Morgan <jf*@XXwoodland er.co.uk>
wrote:
>I suppose the answer to this is staring me in the face but....

How do I programmaticall y get a page to post back?

The actual situation is that I am using an aspx table control and
changing the text within a cell. Though the cell text is updadated
successfully it does not show up on the screen until it the page is
posted back..

At the moment I am using a button which does nothing, processes no
code, but ensure a postback .

I wish to be able to force this postback as soon as the text in the
cell is updated (programmatical ly) so that it shows up on the screen
immediately.

I would be grateful for any help,

Best wishes, John Morgan
Jan 22 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1362
by: Earl Teigrob | last post by:
I have a page that reads values from an XML file to display to the user. The page also has a control panel that allows administrators to update the XML file with new values. When an administrator presses the update button in the control panel area of the page and the values are written to the XML file, I want the page to reload with the new values WHILE RETAINING ANY VIEW STATE VALUES. (that are not rewriten by the new XML values) I have...
2
3560
by: Earl Teigrob | last post by:
I have run into a situation where I need to run the !IsPostBack code under one circumstance, even if it is a postback. Something that may complicate matters more is that this is a double postback event. I have a filemanager type application that allows me to dynamically create a new folder on the web server. After the new folder is created, I need to reread the directory and display all the current folders in this directory to the user....
3
4239
by: Ashish | last post by:
Hello All, This is a bit wierd. I have a main page in my webapp that has toolbar to carry out some common operations. Also this main page has an iframe that hosts a page that serves as an introductory page for carrying out common actions. When a user clicks on the links in the intro page, I want the main window (i.e. the main page that hosts the iframe) to perform a postback. Any ideas how this can be accomplished ? Thanks Ashish
2
3634
by: John Lau | last post by:
Hi, Is there documentation that talks about the page lifecycle, the lifecycle of controls on the page, and the rendering of inline code, in a single document? Thanks, John
2
3333
by: Tabrez | last post by:
Hi, I'm doing an online examination page. After the alloted time of the exam the page should be posted back. I've used System.Timers namespace for timekeeping. Please help me post back the form in 'Elapsed event' of the timer object. (i m using ASP.net with VB.net)
6
3066
by: G Dean Blake | last post by:
in my aspx app I am writing a stream that works fine but it replaces what is in the client browser window. The code is as follows: .. .. HttpContext.Current.Response.ClearHeaders() HttpContext.Current.Response.ClearContent() HttpContext.Current.Response.ContentType = "application/pdf" Dim myBuffer(MyStream.Length) As Byte MyStream.Read(myBuffer, 0, CType(MyStream.Length, Integer)) HttpContext.Current.Response.BinaryWrite(myBuffer)
6
2438
by: SkeanDu | last post by:
Ok, here is my problem. I have an aspx page that displays a databound datagrid and in one of the datagrid column headers I have an image that when clicked opens up a modal web dialog (another aspx page). >From this dialog I want the users to be able to select a filter item from a databound combobox and click on the apply button on the web dialog that will then disappear and the filtered data will be displayed on my datagrid.
0
1379
by: Fabuloussites | last post by:
Greetings All, here is my situation. i have a master page that has a login user control embedded on it. within the user control there is a multiview. in the default view, the username/passwords fields are there. once the user is authenticated, the page posts back, and the multiview view changes to another view where a menu is displayed. under this set of circumstances, is it possible to use the postback url propety for the login...
1
1308
by: Jeff | last post by:
I assume that this is an easy newby question... How can I conditionally force the code in a "if not page.ispostback sub" to run even if the page is posting back? More specifically, I have a web application in VB (2005) which runs through a series of questions stored in a database. Answers to the questions are stored back into the database on the first page post back. The user then clicks a "next" button, which is intended to load the...
0
9722
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
10379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10393
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
10124
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
9200
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...
1
7664
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4334
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
3863
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.