| | |
analys the programm and reply
Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Mar 2008
Posts: 63
Reputation:
Solved Threads: 1
hai i am using the following code to apply the watermark and save in specific location and then upload the image to database
up to this the program work's perfectly while upload to the database i show the error ..
in that com.ExecuteNonquery() the error show's like (no mapping exits from object type system.drawing .Bimap to a known managed provider native type)
plz reply me .............
asp Syntax (Toggle Plain Text)
[ byte[] img1 = new byte[fileupload1.postedfile.contentlength]; Httppostedfile image = fileupload1.postedfile; image.Inputstream.read(img1,0,(int)fileupload1.postedfile.contentlength); Bitmap bm1 = new bitmap(new system.IO.Memorystream(imd1)); Graphics grp = Graphics.FromImage(bm1); grp.smoothingMode = smoothingMode.AntiAlise; grp.Drawstring("name" ,new font("Arial",20),systemBrushes.WindowText,250,250); string a1 = server.mapPath(@"image\\winteer1.jpg"); bm1.save(a1); image1.imageurl=a1; Bitmap a2 = new Bitmap(image1.imageurl);
up to this the program work's perfectly while upload to the database i show the error ..
asp Syntax (Toggle Plain Text)
sql connection con = new sql connection (conn); sql command com = new sqlcommand (insert into ); com.parameters.Addwith value("@image",a2); con.open(); com.ExecuteNonquery(); con.close();
in that com.ExecuteNonquery() the error show's like (no mapping exits from object type system.drawing .Bimap to a known managed provider native type)
plz reply me .............
Last edited by peter_budo; Apr 4th, 2008 at 5:30 am. Reason: Keep It Organized - please use [code] tags
This post is marked as solved. Did you find solution? Would you mind to share it with others?
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
![]() |
Other Threads in the ASP.NET Forum
- Previous Thread: 301 redirect on a non-aspx page?
- Next Thread: Moving VB.NET Code to ASP.NET Code?
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.net 2.0 activexcontrol advice ajax alltypeofvideos anathor application asp asp.net bc30451 bottomasp.net box browser button c# checkbox click commonfunctions confirmationcodegeneration css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock development dgv dropdownlist dynamically edit expose feedback fileuploader fill flash form formatdecimal forms formview google grid gridview gudi iframe iis javascript jquery listbox login microsoft mono mouse mssql multistepregistration news numerical objects opera panelmasterpagebuttoncontrols parent project radio redirect registration relationaldatabases reportemail richtextbox rotatepage save schoolproject search security select silverlight smartcard smoobjects software sql-server sqlserver2005 suse textbox tracking unauthorized validation vb.net video videos view virtualdirectory vista visualstudio web webapplications webdevelopemnt webprogramming webservice xsl youareanotmemberofthedebuggerusers






