Discussion Forum > sending Dynamic Webpage to Socket using .NET MicroFramework on
Hi,
I am new to .NET Micro Framework, and am facing some problems with the SocketServer - Socket Client Examples.
I am using the SocketServer example to send a webpage to my device (TCP/IP).
// Create a socket, bind it to the server's port and listen for client connections Socket server = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
// Wait for a client to connect Socket clientSocket = server.Accept();
using (m_clientSocket) { // Return a static HTML page back to the client String s = "<html><head><title>Sample Website!</title></head></html>"
m_clientSocket.Send(Encoding.UTF8.GetBytes(s)); }
Whereas the example sends a simple HTML page, I want to send a interactive dynamic webpage.
I am new to .NET Micro Framework, and am facing some problems with the SocketServer - Socket Client Examples.
I am using the SocketServer example to send a webpage to my device (TCP/IP).
// Create a socket, bind it to the server's port and listen for client connections
Socket server = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
// Wait for a client to connect
Socket clientSocket = server.Accept();
using (m_clientSocket)
{
// Return a static HTML page back to the client
String s = "<html><head><title>Sample Website!</title></head></html>"
m_clientSocket.Send(Encoding.UTF8.GetBytes(s));
}
Whereas the example sends a simple HTML page, I want to send a interactive dynamic webpage.
How is it possible? Any code tips?
Thanks a lot to all who could help! :)