• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 149
  • Last Modified:

ASP.NET

I am using visual basic 2008 and I am doing my final project and every time I put my GridView it doesn't appear in the debugging. Please help me
0
mah766
Asked:
mah766
1 Solution
 
Chandan_GowdaCommented:
can u please be more clear on the question that you have asked
0
 
informaniacCommented:
Ya that's true. Please be more clear and if possible post snapshots of the problem u r facing.
0
 
mah766Author Commented:
OK, the problem basically is that when I drag the GridView from the tools bar in the body and connect it with fields I want to display. After I hit Display in Browser Nothing appear. I got empty page
Here is my code :
 
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Admin.aspx.cs" Inherits="Admin" %>
 
<!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="GridView1" runat="server">
        </asp:GridView>
    
    </div>
    </form>
</body>
</html>

Open in new window

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
mrcoolcoderCommented:
Gridview needs a datasource and something to display.

Here is an article on databinding.
http://www.4guysfromrolla.com/articles/110905-1.aspx
0
 
mah766Author Commented:
Even when I add datasource still Nothing appear. I don't now it was working fine
0
 
mrcoolcoderCommented:
So the question is what changed?  The code above has no binding unless it is in code behind.  Do you have a sample of code that was working before but isn't now?

Have you tried starting a new website in Visual Studio, perhaps one of your files (web.config?) is changed somehow.

What version are you using?
0
 
mah766Author Commented:
Yes I tried that, and I am using VB 2008. Actually it is the same code I put above
0
 
mrcoolcoderCommented:
Can we see the file
Admin.aspx.cs?
0
 
mah766Author Commented:
Here is the code
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
public partial class Admin : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
 
    }
}

Open in new window

0
 
mrcoolcoderCommented:
Again, there is no databinding code in either file, so It is not possible that this used to display something.  Either your code was removed or these are not the files that were working before.

Please read the above article on databinding.
0
 
mah766Author Commented:
it wasn't working with the firfox and Google Chrome bu it does work with the window explorer, and I don't know why and also when I didn't link it to the master page I have it didn't appear

Thanks for your response
0
 
mah766Author Commented:
I found the solution and it doesn't relate to any of the comment your wrote
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now