Click here to Skip to main content
15,914,608 members
Home / Discussions / C#
   

C#

 
AnswerRe: ExecuteNonQuery Problem Pin
musefan2-Dec-10 1:47
musefan2-Dec-10 1:47 
GeneralRe: ExecuteNonQuery Problem Pin
musefan2-Dec-10 6:25
musefan2-Dec-10 6:25 
QuestionError regarding crystal report? Pin
Tridip Bhattacharjee2-Dec-10 1:31
professionalTridip Bhattacharjee2-Dec-10 1:31 
AnswerRe: Error regarding crystal report? Pin
Hiren solanki2-Dec-10 1:50
Hiren solanki2-Dec-10 1:50 
QuestionWinForms VS. WebForms Pin
treuveni2-Dec-10 1:24
treuveni2-Dec-10 1:24 
AnswerRe: WinForms VS. WebForms Pin
Hiren solanki2-Dec-10 1:32
Hiren solanki2-Dec-10 1:32 
AnswerRe: WinForms VS. WebForms Pin
Sathesh Sakthivel2-Dec-10 1:50
Sathesh Sakthivel2-Dec-10 1:50 
GeneralRe: WinForms VS. WebForms Pin
Hiren solanki2-Dec-10 1:57
Hiren solanki2-Dec-10 1:57 
GeneralRe: WinForms VS. WebForms Pin
Ankur\m/2-Dec-10 2:44
professionalAnkur\m/2-Dec-10 2:44 
GeneralRe: WinForms VS. WebForms Pin
Chris Maunder2-Dec-10 12:24
cofounderChris Maunder2-Dec-10 12:24 
QuestionC# window app to listen multiple port simultaneously.. Pin
ayandelhi1-Dec-10 23:41
ayandelhi1-Dec-10 23:41 
AnswerRe: C# window app to listen multiple port simultaneously.. Pin
Luc Pattyn2-Dec-10 0:38
sitebuilderLuc Pattyn2-Dec-10 0:38 
GeneralRe: C# window app to listen multiple port simultaneously.. Pin
ayandelhi2-Dec-10 5:57
ayandelhi2-Dec-10 5:57 
AnswerRe: C# window app to listen multiple port simultaneously.. Pin
Luc Pattyn2-Dec-10 5:59
sitebuilderLuc Pattyn2-Dec-10 5:59 
GeneralRe: C# window app to listen multiple port simultaneously.. Pin
ayandelhi2-Dec-10 6:09
ayandelhi2-Dec-10 6:09 
GeneralRe: C# window app to listen multiple port simultaneously.. Pin
Luc Pattyn2-Dec-10 6:35
sitebuilderLuc Pattyn2-Dec-10 6:35 
GeneralRe: C# window app to listen multiple port simultaneously.. Pin
ayandelhi2-Dec-10 6:44
ayandelhi2-Dec-10 6:44 
GeneralRe: C# window app to listen multiple port simultaneously.. Pin
DaveyM692-Dec-10 9:37
professionalDaveyM692-Dec-10 9:37 
QuestionSocket programming Pin
Tichaona J1-Dec-10 23:29
Tichaona J1-Dec-10 23:29 
Hi I have two application which I have managed to get them to exchange data however, I would like to be able to sort the data out when it is recieved by the other end (server). On the client side, the data is taken from the various forms and sent as below:

  String Pname = LblName.Text;
 String Pdob = LblDOB.Text;
 String PnhsNo = LblNHSno.Text;
 String Paddress = RtxtBxAddre.Text;
 String PmedicalCon = RtxtBxMedCon.Text;
 String pcallOutDetails = RTxtBxCallOut.Text;

 byte[] forwardMessage = Encoding.ASCII.GetBytes(Pname + Pdob + PnhsNo + Paddress + PmedicalCon + pcallOutDetails);
sock.Send(forwardMessage);

 sock.Shutdown(SocketShutdown.Both);
 sock.Close();


On the other end I would now like to take each item and display it in a form, so "Pname" is taken when received and displayed in a text box and then same with the rest of the data. Unlike displaying it in a message box like I have done below:



Socket listener = new Socket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp);
          listener.Bind(new IPEndPoint(IPAddress.Any, 2112));
          listener.Listen(10);

                  
           Socket socket = listener.Accept();
           string receivedValue = string.Empty;

           
                     byte[] receivedBytes = new byte[1024];
                      int numBytes = socket.Receive(receivedBytes);
                          
                              receivedValue = Encoding.ASCII.GetString(receivedBytes,0, numBytes);
                             
                                    MessageBox.Show(receivedValue);
                                                                    
                                    listener.Close();


Help....Confused | :confused:
AnswerRe: Socket programming Pin
Pete O'Hanlon1-Dec-10 23:47
mvePete O'Hanlon1-Dec-10 23:47 
AnswerRe: Socket programming Pin
Luc Pattyn2-Dec-10 0:04
sitebuilderLuc Pattyn2-Dec-10 0:04 
GeneralRe: Socket programming Pin
musefan2-Dec-10 0:12
musefan2-Dec-10 0:12 
GeneralRe: Socket programming Pin
Tichaona J2-Dec-10 1:28
Tichaona J2-Dec-10 1:28 
GeneralRe: Socket programming Pin
musefan2-Dec-10 1:34
musefan2-Dec-10 1:34 
GeneralRe: Socket programming Pin
Luc Pattyn2-Dec-10 2:20
sitebuilderLuc Pattyn2-Dec-10 2:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.