安装时客户端系统上映像文件的位置. [英] Position of an image file on Client System while installation.

查看:55
本文介绍了安装时客户端系统上映像文件的位置.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在安装应用程序时,映像文件在客户端系统上的位置应该是什么.

What should the position of an image file on the client system while installation of application. Where the image has to be displayed and printed in DataGridView report through PrintPage() event.

推荐答案

如何将客户端图像文件保存到服务器端

How to save client side image file to server side

This code shold be copied in .aspx page:


<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

    <title>File Upload Sample</title>

</head>

<body>

  <form id="form1" runat="server">

    <div>

      <table cellpadding="10" cellspacing="0" border="2" width="40%" height="100px">

        <tr>

        <td align="center" valign="top" style="padding-top:20px; background-color: #ffccff;">

           <asp:FileUpload ID="FileUpload1" runat="server" BackColor="#C0FFFF" BorderColor="Cyan" ForeColor="Green" /><br /><br />

           <asp:Button ID="Button1" runat="server" Onclick="Button_click" Text="Upload File" BackColor="#C0C0FF" BorderColor="#8080FF" BorderStyle="Outset" />

           <asp:RegularExpressionValidator  id="FileUpLoadValidator" runat="server"



            ErrorMessage="Upload Jpegs and Gifs only."



ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\


?)(\\(\ w [\ w].*))(.jpg |. JPG | .gif | .GIF)
?)(\\(\w[\w].*))(.jpg|.JPG|.gif|.GIF)


" span> =" FileUpload1" < /asp:RegularExpressionValidator > < /td > < /tr > < /table > < /div > < /form > < /body > < /html > 以下代码应复制到文件后面的代码中: 使用系统; 使用System.Data; 使用System.Configuration; 使用System.Web; 使用System.Web.Security; 使用System.Web.UI; 使用System.Web.UI.WebControls; 使用System.Web.UI.WebControls.WebParts; 使用System.Web.UI.HtmlControls; 使用System.IO; 公共局部类_Default:System.Web.UI.Page { 受保护的void Page_Load(对象发送者,EventArgs e) {} 受保护的void Button_click(对象发送者,EventArgs e) { 字符串str1 = FileUpload1.PostedFile.FileName; 字符串str2 = Path.GetFileName(str1); 字符串str3 = @"d:/puru/photo"; //提供您要上传文件的路径. FileUpload1.PostedFile.SaveAs(Path.Combine(str3,str2)); } }
" ControlToValidate="FileUpload1"> </asp:RegularExpressionValidator> </td> </tr> </table> </div> </form> </body> </html> The below code should be copied in the code behind file: using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.IO; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) {} protected void Button_click(object sender, EventArgs e) { string str1 = FileUpload1.PostedFile.FileName; string str2 = Path.GetFileName(str1); string str3 = @"d:/puru/photo"; //give the path where you want to upload the file. FileUpload1.PostedFile.SaveAs(Path.Combine(str3, str2)); } }


这篇关于安装时客户端系统上映像文件的位置.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆