![]() |
Chat program
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 |
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. |
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 |
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 |
Re: Chat program
HI Jitesh
Thank u for Your reply, -Venkatramasamy SN |
| All times are GMT -5. The time now is 3:59 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC