Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/338.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何在asp.net(c)中访问jquery指定的代码隐藏映像_Javascript_C#_Jquery_Html_Asp.net - Fatal编程技术网

Javascript 如何在asp.net(c)中访问jquery指定的代码隐藏映像

Javascript 如何在asp.net(c)中访问jquery指定的代码隐藏映像,javascript,c#,jquery,html,asp.net,Javascript,C#,Jquery,Html,Asp.net,我从谷歌下载了管理模板,我使用FileUpload控件加载图像 模板使用插件在运行时加载图像,用户在加载时可以看到图像 但当用户从任何位置选择图像时,图像在img控件中是可见的,但我在我的aspx页面上看不到它,我认为jquery在选择时分配图像 以下是图像描述: 我在我的aspx页面上的div 在jquery中,我认为适用于此的行是 reader.onload = function(e) { preview.html('<img src="' + e.target.r

我从谷歌下载了管理模板,我使用FileUpload控件加载图像

模板使用插件在运行时加载图像,用户在加载时可以看到图像

但当用户从任何位置选择图像时,图像在img控件中是可见的,但我在我的aspx页面上看不到它,我认为jquery在选择时分配图像

以下是图像描述:

我在我的aspx页面上的div

在jquery中,我认为适用于此的行是

reader.onload = function(e) {
          preview.html('<img src="' + e.target.result + '" ' + (preview.css('max-height') != 'none' ? 'style="max-height: ' + preview.css('max-height') + ';"' : '') + ' />')
          element.addClass('fileupload-exists').removeClass('fileupload-new')
        }
我需要在服务器端访问此运行时映像控件,以便我需要对此控件应用一些检查

我在jquery方面很弱,所以我需要你的帮助

如果有人不明白这一点,请尽管问,我是来听你讲话的

我正在使用asp.NETC


提前感谢

您想将上传的图像或预览图像放回服务器端吗?如果是上传,则文件上传程序本身应使用回发请求发布文件。但是如果是预览图像url,那么您可能需要将e.target.result添加到一个隐藏的输入字段中,并自己发起回发。或者,您可以使用ajax请求并使用Page方法ScriptMethod从ajax请求接收URL。这非常有帮助,我让您的点文件上传程序本身应该将文件与回发一起发布,实际上我是这样管理我的问题的。感谢您的时间和建议,您希望上传的图像或只是预览图像回到服务器端?如果是上传,则文件上传程序本身应使用回发请求发布文件。但是如果是预览图像url,那么您可能需要将e.target.result添加到一个隐藏的输入字段中,并自己发起回发。或者,您可以使用ajax请求并使用Page方法ScriptMethod从ajax请求接收URL。这非常有帮助,我让您的点文件上传程序本身应该将文件与回发一起发布,实际上我是这样管理我的问题的。谢谢你的时间和建议,
<div id="ContentPlaceHolder1_divImages" type="image" class="fileupload-preview fileupload-exists thumbnail" style="max-width: 200px; max-height: 150px; line-height: 10px;">
<img src="here is image source......" style="max-height: 150px;"> // I need this image control id at code behind in asp.net
</div>
reader.onload = function(e) {
          preview.html('<img src="' + e.target.result + '" ' + (preview.css('max-height') != 'none' ? 'style="max-height: ' + preview.css('max-height') + ';"' : '') + ' />')
          element.addClass('fileupload-exists').removeClass('fileupload-new')
        }