• λ我爱Aspx >> Asp.Net >> 介绍几个ASP.NET中容易忽略但却很重要的方法函数
  • 介绍几个ASP.NET中容易忽略但却很重要的方法函数

  • :aspxer  Դ:5iaspx  :2007-8-1 13:15:00  ؼ:.net,asp.net,asp
  • 给大家介绍几个.NET中Path类的几个方法:

    1. Path.combine(string, string)

    根据给出的两个路径, 返回一个路径.

    例如:

    string CompletePath = System.IO.Path.Combine(@"c:\MyApp", @"Images\skyline.jpg");

    将会返回一个全路径 c:\MyApp\Images\skyline.jpg

    第一个参数中有无"\"结尾都可以.

    2. Path.GetExtension(string)

    返回给定文件路径的扩展名.例如:

    string FileExtention = System.IO.Path.GetExtention(@"C:\MyApp\Images\skyline.jpg");

    将会返回 "jpg"

    3. Path.GetFileName(string)

    给出文件名的全路径,返回文件名(包括扩展名).例如:

    string fileName = System.IO.Path.GetFileName(@"c:\MyApp\Images\skyline.jpg");

    将会返回"skyline.jpg"

    Ҷƪл˵?
  • һƪ將datagrid控件內容輸出到excel文件
    һƪjavascript 操作 ListBox 的问题