Hello
can some one point me in the right direction?
I want to use local pictures as buttons on the html respons from an WebEvent.
Here is my code in short form
void webEventTest_WebEventReceived(string path, WebServer.HttpMethod method, Responder responder)
{
byte[] messageBytes = System.Text.Encoding.UTF8.GetBytes(TestPage());
responder.Respond(messageBytes, "");
}
static string TestPage()
{
string s = "<html>\n"; // First the page type
s += "<head><title>Test Page</title></head>\n"; // now the page header
s += "<body>\n"; // start the body
s += "<a href=\"test\"><img style=\"border:0px;width:100%;height:20%;\" src=\"IMAGE.png\" onMouseDown==\"IMAGE.png\" onmouseout=\"IMAGE.png\" alt=\"IMAGE.png\" /></a><script type=\"text/javascript\">img=new Image();img.src= \"IMAGE.png\";</script>";
s += "</body>"; // close the body section
s += "</html>"; // close the page type
return s;
}
So what do i need to put in the “IMAGE.png” to make it work with png files in the Resources folder?
To code works fine with images files like http//www.picturesite.com/picture.png