-2

I have two aspx page. 1) ActionPage.aspx 2) DispalyPage.aspx

  • Inside the DispalyPage.aspx, I have one div displayDiv.
  • Inside the ActionPage.aspx, I have one button btnaction.

If I click on btnaction (ActionPage.aspx), that time I want to update displayDiv (DispalyPage.aspx) text.

Any hint on this would be great help. Thanks in advance.

-- Vina

Gidil
  • 4,137
  • 2
  • 34
  • 50
vina
  • 1
  • :S Are the pages to be displayed side by side? If so, use ajax, if not, you should just bind the text of the div to a variable and change that. – UIlrvnd Sep 10 '13 at 06:23
  • ajax request sent from `ActionPage.aspx` and store result in session and on `DispalyPage.aspx` page continuously check if session exists than perform action – Tushar Gupta - curioustushar Sep 10 '13 at 06:24
  • if the text is short,try using query strings.If the text is long use session as @Tushar Gupta said.. – Sasidharan Sep 10 '13 at 06:29

1 Answers1

2

the behaviour sounds like a chat behaviour. If all our clients/customers are running with modern browser you can do this with websockets. There is a .Net implementation for websockets available here (http://superwebsocket.codeplex.com/). The advantage of websockets are that they are realtime. So you simply press a button on your ActionPage.aspx and send a message to your server and on your Displaypage.aspx got updated instantly.

You can take a look at this Stackoverflow question (server implementation): How to create a WebSocket server using SuperWebSocket

And for the client you can use this tutorial: http://www.tutorialspoint.com/html5/html5_websocket.htm

Community
  • 1
  • 1
Joe
  • 461
  • 4
  • 6
  • No its not like chat behaviour. I have just given a simple scenario. Is there any jquery code to update HTML div from another page? – vina Sep 10 '13 at 07:00