Gridview无法显示 [英] Gridview not displaying

查看:79
本文介绍了Gridview无法显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只有简单的网格视图,我在设计页面上拖放。我尝试运行它但它没有显示它



我采取的步骤解决:

我累了绑定数据 - 仍然没有运气

我以为我的VS2010可能会出现一些问题 - 尝试修复它仍然没有运气

尝试打开Chrome浏览器 - 在IE中显示空白页面

我不知道有什么问题可以帮助我这个问题

我尝试在gridview,AllowPaging,AutogenerateDelete / edit上更改几个属性 - 仍然无法正常工作



DesignPage

I just have simple grid view which i dragged and dropped on the design page. I tried running it but it is not displaying it

Steps I took to resolve:
I tired binding the data-Still no luck
I thought i could be some issue with my VS2010-Tried Repairing it still no luck
Tried opening Chrome Browser--Displays empty page as it did in IE
I am not sure what is the problem can anyone help me on this
I tried changing the couple of properties on gridview ,AllowPaging,AutogenerateDelete/edit--still not working

DesignPage

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GridView._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 runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:GridView ID="gvEmpdata" runat="server">
        </asp:GridView>
    </div>
    </form>
</body>
</html>





Code-Behind Pag e $>



Code-Behind Page

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace GridView
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}

推荐答案

尝试添加gridview动态来自.cs文件





检查.net框架组件并重置

step-1单击工具箱项目并选择选择项目
try to add the gridview dynamically from .cs file

or
check the .net framework component and reset
step-1 rtclick on toolbox item and select choose items


这篇关于Gridview无法显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆