본문 바로가기

Web Program/Asp.net Lecture41

이미지를 db에 저장하기 // Create a byte[] from the input file int len = Upload.PostedFile.ContentLength; byte[] image = new byte[len]; Upload.PostedFile.InputStream.Read (image, 0, len); // Insert the image and comment into the database SqlConnection connection = new SqlConnection (@"server=test;database=pub;uid=sa;pwd=1234"); try { connection.Open (); SqlCommand cmd = new SqlCommand ("insert into Image " + "(Image, m.. 2009. 5. 14.
Crystal Reports TextObject ignores newline, carriage return, \r\n I have a text object in my crystal report, and i set the value programatically for it, using something like this: (rpt.Section3.ReportObjects["txtDate"] as TextObject).Text = DateTime.Now.ToShortDateString();this works fine, until you put a string with line breaks inside it, specifically \r\n or the carriage return character. This is a bug in CR for .Net, you can read the official blurb here. th.. 2009. 5. 14.
ImageCanvas Web User Control Source Code: ImageCanvas.zip 22 KB Introduction: Sending dynamic image content to browser has always been tricky issue. With System.Drawing namespace available to ASP.Net creating images on fly has become relatively simpler. In normal case we would use aspx page to stream image to web form like Now for image to be dynamic we need to pass some information to aspx page, which we are doing by passi.. 2009. 5. 14.
Adding Images dynamically at runtime in Crystal report 검증 되지 않음 Method I: Using recordset 1. Add a recordset and add a table in that. Add a column of System.Byte[] (Only System.Byte is available in the data type of data Table, Manually add the System.Byte[] in that. System.Byte not allowed for images).Then use the below code 2. Design the report with that dataset. You can add this System.Byte[] column as part of your main data table which have the a.. 2009. 5. 13.