FileUpload到已知的托管提供者本机类型没有映射

FileUpload到已知的托管提供者本机类型没有映射

本文介绍了我发现错误....从对象类型System.Web.UI.WebControls.FileUpload到已知的托管提供者本机类型没有映射。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我正在发送错误.... 从对象类型System.Web.UI.WebControls.FileUpload到已知的托管提供者本机类型不存在映射。 使用以下代码: cmd.Parameters.AddWithValue( @ Uploadphoto,,PhotoUpload); 解决方案 没有足够的代码可以确定,但看起来好像你试图将实际的FileUpload CONTROL转换为字节流而不是其中包含的内容。 尝试阅读 FileUpload [ ^ ]控件,具体来说, FileBytes [ ^ ]和 FileContent [ ^ ]属性。 i am geting error.... No mapping exists from object type System.Web.UI.WebControls.FileUpload to a known managed provider native type.With the code:cmd.Parameters.AddWithValue("@Uploadphoto,",PhotoUpload); 解决方案 There's not enough of he code to be sure, but it appears as though you're trying to convert the actual FileUpload CONTROL to a stream of bytes and not the contents contained within.Try reading the documentation on the FileUpload[^] control, specifically, the FileBytes[^] and FileContent[^] properties. 这篇关于我发现错误....从对象类型System.Web.UI.WebControls.FileUpload到已知的托管提供者本机类型没有映射。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-30 02:52