日期:2014-05-17  浏览次数:20411 次

为什么从数据库获取值后 显示不出来啊
我在父页面放了个gridview 选择数据的时候会传递3个值去子页面 子页面有三个不同id的div 为甚卖我调试的时候都获取到了数据库里的数值 但却显示不出来啊 下面上代码    
父页面gridview选择事件
protected void GrvGMMailbox_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
        {
            name = GrvGMMailbox.Rows[e.NewSelectedIndex].Cells[1].Text;
            reportID = GrvGMMailbox.Rows[e.NewSelectedIndex].Cells[3].Text;
            type = GrvGMMailbox.Rows[e.NewSelectedIndex].Cells[4].Text;
            sendInfo();                      
        }
        
        protected void sendInfo()
        {
            Session["reportName"] = name;
            Session["reportID"] = reportID;
            Session["type"] = type;
            //Response.Redirect("ShowReportInfo.aspx");
            Response.Write("<script>window.showModalDialog('ShowReportInfo.aspx', 'width=481;height=300;status=no;resizable=no;screenX=300;screenY=350;top=200;left=300');</script>");
        }

子页面显示代码
public partial class ShowReportinfo : System.Web.UI.Page
    {        
        string sql;
        protected void Page_Load(object sender, EventArgs e)
        {                
            string reportID = Session["reportID"].ToString();
            string reportName = Session["reportName"].ToString();
            string type = Session["type"].ToString();
            getReportInfo(reportID, reportName, type);
        }
        protected void getReportInfo(string reportID, string reportName, string type)
        {
            //判断报告类型
            //维修完成报告
            if (type == "维修完成报告")
            {
                sql =