![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
|
hi,
i ma new to ASP, good in Vb, now i am trying to write a chat program,i want ot know that how to transfer the text from one form to another, i tried response.redirect and server.transfer in the both it redirects the page, but what i need is simple transfer the text to the next page when a button clicked, Scenario: Chat1-page1 chat2-page22 'my previous code Sub submit(ByVal sender As Object, ByVal e As EventArgs) Dim message As String message = Textmsg.Text TextHistory.Text = TextHistory.Text & vbNewLine & "Me:" & message Textmsg.Text = "" Context.Items("Transmsg") = message Server.Transfer("chat1.aspx", False) end sub it redirects the page, i need to trnsfer the text and want to remain on the same page, is anybody there to help me Thanks in advance venkatramasamy SN |
|
|
|
|
|
#2 |
|
Sexy Programmer
|
Re: Chat program
In first page called Whatever.aspx
Reponse.Redirect("NextPage.aspx?textToSend=whatyouwant");In NextPage.aspx string textFromOtherPage = Request.QueryString[ "textToSend" ]; Do you see how this works? I passed a string value in the URL to the next page and the next page extracts this string and uses it however.
__________________
I would love to change the world, but they won't give me the source code! |
|
|
|
|
|
#3 |
|
Newbie
|
Re: Chat program
hi,
thank you for your reply, that code you send has two problems 1. that redirects the page(i need the page remain same) 2. the msg showm on the address bar(dont want to show on address bar) could you please help me with some other code With thanks & regards Venkatramasamy SN |
|
|
|
|
|
#4 | |
|
Newbie
Join Date: Mar 2008
Posts: 3
Rep Power: 0
![]() |
Re: Chat program
Quote:
Hi there, i saw your quote.there is only one problem with your code. you had set Server.Transfer("chat1.aspx", False) so you have to make it true. because making it true it hold the state of a page.now to retrive the value from the message use the following line of code. Response.Write(Request.Form["Textmsg"]); Hope this will help you to solve your query Thank you Jitesh Programmer Sharepoint Consulting |
|
|
|
|
|
|
#5 |
|
Newbie
|
HI Jitesh
Thank u for Your reply, -Venkatramasamy SN |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Language display in program | Prm753 | C++ | 3 | May 30th, 2006 5:45 PM |
| Creating a program to test a program | sixstringartist | C | 8 | Jan 21st, 2006 1:15 PM |
| Help - Chat PRogram NEeded | Kevin++ | C++ | 4 | Apr 17th, 2005 7:08 PM |
| Nice C++ Chat program tutorial? With TCP | layer | C++ | 6 | Mar 2nd, 2005 2:35 PM |