国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
編程小總結(jié)
Asp.net中支持輸出時(shí)用html控制樣式
Response.Write("<font size=3px color=blue>");
Response.Write("用戶名:"+username.Value+"密碼:"+pwd.Value);
Response.Write("</font>");
可以在Page_Load中初始化下拉列表框的數(shù)據(jù)
protected void Page_Load(object sender, EventArgs e)
    {
        for (int i = 1; i < 150; i++)
        {
            ddlage.Items.Add(new ListItem(i.ToString()));
           
        }
    }
用來(lái)設(shè)置方向問(wèn)題
CheckBoxList1.RepeatDirection = RepeatDirection.Vertical;//水平方向
Horizontal//垂直方向
遍歷checkbox選項(xiàng)組
 foreach (ListItem item in CheckBoxList1.Items)
            {
                if (item.Selected)
                {
                    result += item.Text + "<br/>";
                }
            }
上傳文件
string filename=fileupload.PostedFile.FileName;
int fileLength = fileupload.PostedFile.ContentLength;
fileupload.PostedFile.SaveAs(HttpRuntime.AppDomainAppPath + @"Upload\" + FileName.Text.Trim() + filename.Substring(filename.LastIndexOf('.')));重命名文件
protected void Button1_Click(object sender, System.EventArgs e)
  {
   if (File1.PostedFile != null)
   {
    //上傳文件的文件名(含完整路徑)
    string fileName = File1.PostedFile.FileName ;
    //上傳文件的大?。╞yte)
    int fileLength = File1.PostedFile.ContentLength ;
    string sMsg = null;
    //判斷文件大小是否超過(guò)200K
    if (fileLength > (1024*1024))
    {
     sMsg = fileName + "文件超過(guò)200K字節(jié)!";
    }
    else
    {
     //取文件名
     fileName = fileName.Substring (fileName.LastIndexOf (@"\"));
     //使用SaveAs方法,將文件保存在項(xiàng)目路徑\upload目錄下
     File1.PostedFile.SaveAs (HttpRuntime.AppDomainAppPath  + @"upload\" + fileName);
     sMsg = "成功上傳文件:" + fileName + "文件大?。? + fileLength + "字節(jié)" + "文件類型:" + File1.PostedFile.ContentType  ;
    }
    //使用JavaScript顯示操作結(jié)果信息
    Response.Write ("<script language='JavaScript'>window.alert('" + sMsg + "');</script>");
   }
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開(kāi)APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
C#FileUpload控件
ASP.NET FileUpload應(yīng)用實(shí)例
Asp.Net文件上傳之簡(jiǎn)單文件上傳(上) - ASP.net
FileUpload文件上傳代碼
文件上傳
大家做C#時(shí)上傳附件都用什么控件???要求可以限制上傳文件類型,限制上傳文件大小的
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服