Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 1st, 2007, 1:32 AM   #1
venkatramasamy
Newbie
 
Join Date: Oct 2007
Location: INDIA
Posts: 22
Rep Power: 0 venkatramasamy is an unknown quantity at this point
Send a message via AIM to venkatramasamy
Post 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
venkatramasamy is offline   Reply With Quote
Old Dec 1st, 2007, 2:58 AM   #2
ReggaetonKing
Sexy Programmer
 
ReggaetonKing's Avatar
 
Join Date: Nov 2005
Location: New Jersey
Posts: 891
Rep Power: 3 ReggaetonKing is on a distinguished road
Send a message via AIM to ReggaetonKing
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!
ReggaetonKing is offline   Reply With Quote
Old Dec 2nd, 2007, 10:13 PM   #3
venkatramasamy
Newbie
 
Join Date: Oct 2007
Location: INDIA
Posts: 22
Rep Power: 0 venkatramasamy is an unknown quantity at this point
Send a message via AIM to venkatramasamy
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
venkatramasamy is offline   Reply With Quote
Old Mar 7th, 2008, 12:18 AM   #4
dilipv
Newbie
 
Join Date: Mar 2008
Posts: 3
Rep Power: 0 dilipv is on a distinguished road
Re: Chat program

Quote:
Originally Posted by venkatramasamy View Post
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


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
dilipv is offline   Reply With Quote
Old Sep 12th, 2008, 11:44 PM   #5
venkatramasamy
Newbie
 
Join Date: Oct 2007
Location: INDIA
Posts: 22
Rep Power: 0 venkatramasamy is an unknown quantity at this point
Send a message via AIM to venkatramasamy
Smile Re: Chat program

HI Jitesh


Thank u for Your reply,


-Venkatramasamy SN
venkatramasamy is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:00 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC