Showing dynamically generated bitmap in ASP.NET page -


I need to create some block diagrams on my ASP.NET page. Is it done by drawing at best? How do the dynamically generated Bitmap objects appear?

Write a bitmap to create an HTH handler response stream

Handlers yourself There is a link on

If you can write a file in the file system, you can use the naming convention, so you can not make it again and again.

If you have written it in a file, then you can write it in the response stream using the context.Response.WriteFile (path);

You need to set the proper headers for the response, if you want to do something like the bottom then it should be fine.

  context.Response.Cache.SetCacheability (HttpCacheability.Public); Context.Response.Cache.SetLastModified (lastWrite); Context.Response.Cache.Setetag (string.Format ("\" {0} \ ", last quote.Ticks); Context.Response.ContentType = "image / png";   

You can check these headers on incoming requests and return 304 with something (first make a random check)

  If (context.Request Headers [from then]> gt; final writing] reference.Headers [itag] gt gt = last write) {context.Response.StatusCode = 304; Context.Response.StatusDescription = "Not Modified"; Return; }   

If you need to refresh each time, do not worry about caching and just type your code context.response.OutputStream . div>

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -