From:Open-source projectsCrab: chinasaas Sample ApplicationCrab Introduction
The workflow is displayed on the web page, and crab creates a workflowimage. aspx web page (actually a dynamic image). In page_load, the image is sent back to the browser to display the workflow page customizeworkflow. aspx adds a Control to direct the SRC of the image control to workflowimage. aspx. The following code dynamically generates a workflow Image Using workflowimage. aspx:
Protected voidpage_load (Object sender, eventargs E)
{
Response. clearcontent ();
Response. contenttype = "image/PNG ";
Byte [] binaries = workflowproxy. getworflowdefinitiongraphic (0 );
If (binaries! = NULL & binaries. length! = 0)
{
Response. addheader ("Content-Length", binaries. length. tostring ());
Response. binarywrite (binaries );
}
Else
{
Response. addheader ("Content-Length", "0 ");
}
Response. Flush ();
Response. End ();
}
Create Delegation