4
Answers

GDI and web forms

r_chakra

r_chakra

21y
3.2k
1
Am i right in assuming that GDI+ is only for windows forms and not web forms ? In the sense that, if i wanted to drag and drop controls on a web form , i would have to use javascript, but not any server side code (to handle mouse movements ). Is that correct ?
Answers (4)
1
tsuman_in

tsuman_in

NA 152 0 21y
I recently found out that it is possible to build an image for a page without using an aspx page. the example is out on CodeProject.com--search for image without ASPX page.
1
supukrish

supukrish

NA 6 0 21y
Hi, Your question is little confusing. Every thing is possible in Web forms too. The only part that takes little twist is drawing a dynamic graph or… do little drawing that is to be drawn on the spot.. this is still easy and possible. You can find lot of samples in C#corner (main) early articles. Any way go to http://kiwi.bridgeport.edu/cs555/ , our professor Dr. Ausif Mahmood’s one of the web site where he teaches every step after step , all you have to do is follow instructions. Best way is to take print out of the chapter that you need and read each line. You will really end up learning a lot. He also shows you which button on has to click…with diagrams.
1
tsuman_in

tsuman_in

NA 152 0 21y
Since Images are a separate Request from the client to the server, you have to build any graphics for web forms into its own ASPX page. The trick is the same as it was for old-world ASP, you write to the Response stream using the Image.Save(Request.OutputStream, ImageFormat). This is awesome for simple things like getting images from dbs and making bargraphs on the fly. I wrote a cool imagegallery webcontrol that resamples and resizes large images, then streams them to the client, and they are listed in a datagrid--it takes params for file, width, & height. I also put output caching on the page so that the images don't have to get rebuilt on every hit. It makes cleaner thumbnails than the GetThumbnail method since it changes the pixeldepth. My Image Gallery Well, anyways, those are some cool examples of GDI for the web.
1
Mahesh Chand

Mahesh Chand

1 272.2k 241.8m 21y
GDI+ is common for both Windows and Web forms since Web Forms also run on the server where your .NET Framework (including GDI+) sits. For example, I can use Pen, Brush, Graphics and other classes in ASP.NET Web applications to draw stuff. However, you may have to implement drag-drop for Web in a different way. Drag-drop has nothing to do with GDI+, it is more related to Windows Forms.