易截截图软件、单文件、免安装、纯绿色、仅160KB

asp.net中substring用法


substring
public String substring(int beginIndex)返回一个新的字符串,它是此字符串的一个子字符串。该子字符串始于指定索引处的字符,一直到此字符串末尾。
例如:
"unhappy".substring(2) returns "happy"
"Harbison".substring(3) returns "bison"
"emptiness".substring(9) returns "" (an empty string)
参数:
beginIndex - 开始处的索引(包括)。
返回:
指定的子字符串。
抛出:
IndexOutOfBoundsException - 如果 beginIndex 为负或大于此 String 对象的长度。
--------------------------------------------------------------------------------
substring
public String substring(int beginIndex,
int endIndex)返回一个新字符串,它是此字符串的一个子字符串。该子字符串从指定的 beginIndex 处开始,一直到索引 endIndex - 1 处的字符。因此,该子字符串的长度为 endIndex-beginIndex。
示例:
"hamburger".substring(4, 8) returns "urge"
"smiles".substring(1, 5) returns "mile"
参数:
beginIndex - 开始处的索引(包括)。
endIndex - 结束处的索引(不包括)。
返回:
指定的子字符串。
抛出:
IndexOutOfBoundsException - 如果 beginIndex 为负,或 endIndex 大于此 String 对象的长度,或 beginIndex 大于 endIndex。
C#中 substring() 有两个重载函数
substring(int a) 用法同上
substring(int a,int b) b参数应该为截取后的字符串长度
上面string得用法不知是针对哪种语法
针对的是c#


相关文档:

一个简单的ASP.NET +ACCESS 登录

首页:
<%@ 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 ......

ASP.NET的ACCESS数据库操作类

//private string datapatch = ConfigurationSettings.AppSettings["acessconn"];//数据库地址 
private string datapatch = "db/global.asa";//数据库地址 
/// 
/// 取得dataset 
// 
/// 查询语句 
/// 
public DataSet GetDataSet(string Commandtext) 
{&nbs ......

asp.net文件和文件夹压缩

法一:调用winrar
using Microsoft.Win32;
using System.Diagnostics;
protected void Button1_Click(object sender, EventArgs e)
    {
        RAR(@"E:\95413594531\GIS", "tmptest", @"E:\95413594531\");
    }
    /// < ......

ASP.NET服务器控件使用之GridView

1         ASP.NET 服务器控件GridView使用
本教程不介绍服务器端控件的呈现,事件处理,状态等理论知识,只介绍服务器端控件的使用操作,如果您对服务器控件的知识感兴趣,请参阅《ASP.NET服务器控件高级编程》
阅读本文时最好和 文档 《ASP.NET服务器控件使用之Grid ......

ASP.NET常用代码

http://www.chinaz.com/Program/.NET/101U1142006.html
  1. 打开新的窗口并传送参数:
传送参数:
response.write("<script>window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"')</script>")
接收参数:
string a = Request.QueryString("id");
string b = Request.QuerySt ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号