小编use*_*126的帖子

在asp.net中排序数据集c#

我正在尝试对数据进行排序,但是当我从一个页面跳到另一个页面时,名称不会被排序.

return new dao_StudentGroupStudents().GetNewStudentbyGroup(bureauId, search, groupId, currentPage, pageSize, out totalCount);

    /// <summary>
    /// Get All the students from that Bureau.
    /// </summary>

    public DataSet GetAllStudentGroupByBureau(int? GroupId, int? BureauID)
    {
        DataSet ds = new dao_StudentGroup().GetDataSet(null, null, BureauID);
        ds.Tables[0].DefaultView.Sort = "grouptitle asc";
        return ds;
    }
Run Code Online (Sandbox Code Playgroud)

我正在输入这个,现在我得到了无法找到列columnName.

public DataSet GetAllStudentGroupByBureau(int?GroupId,int?BureauID){DataSet ds = new dao_StudentGroup().GetDataSet(null,null,BureauID);

ds.Tables[0].DefaultView.Sort = "columnName ASC";

DataTable dt = ds.Tables[0].DefaultView.ToTable();

return ds;
Run Code Online (Sandbox Code Playgroud)

}

c# asp.net dataset

1
推荐指数
1
解决办法
2万
查看次数

试图分离整数和十进制asp.net c#

我正在寻找指导可以有人帮助我吗?

我需要将持续时间的值分成整数和小数.

编辑:我在一个页面中有一个文本框.如果有人输入1.5并且它被存储在持续时间中,我想在另一页中检索它,我想将整个数字存储在文本框中,十进制数将根据响应从下拉列表中选择一个值.

抱歉,我偶然增加了两次持续时间.

context.Response.Write(dr["Title"].ToString()
    + '|' + dr["CourseId"].ToString() + '|' + dr["duration"].ToString()
 + '|' + dr["Code"].ToString() + '|'
    + dr["Category"].ToString() + School.NewLine);
Run Code Online (Sandbox Code Playgroud)

c# asp.net

1
推荐指数
1
解决办法
1196
查看次数

标签 统计

asp.net ×2

c# ×2

dataset ×1