Hi Dw.

I'm a bit new to C# I'm used to program with VB.NET and one of my project had force me to do it with C# as I'm sure you are aware that VB.NET it lack with Windows Phone Socket programming APIs or support and C# does support it so my app is a TCP/IP based app. It uses a chat approach but the difference is that in my app a user only type in the credentials (Login details) and login then from there s/he should be presented with a list of data retrieved/sent by a server to this client.

I've got a couple of issues/problems namely:
1) In my server the server assumes that the data sent by a client is Bytes so it convert it using ...ASCII.GetString(data) but the problem is that in my Windows Phone app I don't know how to convert the data from string to byte using the ASCII format. I have this on my windows phone:

    string SendMessageToServer = myclient.Connect(myip,myport);
            SendMessageToServer = myclient.Send("Login:<" + txtUsername.Text + ">:<" + passwordBox1.Password);

As you can see the format of the request to login from a client to a server. The server will then look for signal of which here its Login but that is done after the data has been converted. The problem is that I want all my systems/clients to use the same format so that I wont have many servers for different platforms(Computers, Mobiles).

2) The server when sending the responce it sends it as Bytes, which is also what I would like to know as to how to convert the responce from Bytes to string in Windows Phone using C#.
3) How to keep the connection alive so that only a user can terminate the connection?
4) This is the most essential part. The data originaly should be presented in 4 columns for each record but I don't think this is supported on a mobile phone because of the screen size, so my thought was to have the arrays that will keep some of the data and that data can be presented when a user click the coresponding item on the listview. Basically what I want to do is present the data to the client and a client can click a data and appone clicking the propriate tasks are performed. This data is a database records, this can be very large in record numbers but the server does the retrieval and the server is complete as well as Windows desktop client app and they work accordingly now I'm trying to create the Mobile client app versions.

Any idea to these problems?

This example looks like it will solve my number (4) problem.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.