asp.net - DataGrid showing in the design window, but not in the webpage -


I have just started learning ASP.net and when I compile, to show me Gridview correctly It may not seem to be Using Visual Studio '08 in Design View, it looks just fine, but when I compile it is absent.

  & lt;% @ Page language = "vb" AutoEventWireup = "false" CodeBehind = "Default.aspx.vb" Inherits = "WebAppTest._Default"% & gt; & Lt ;; DOCTYPE HTML PUBLIC "- // W3C // DTT XHTML 1.0 Transcription // N" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; Head runat = "server" & gt; & Lt; Title & gt; Untitled Page & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Form runat = "server" & gt; & Lt; Div & gt; & Lt; Asp: GridView id = "gridview1" runat = "server" AutoGenerateColumns = "False" BackColor = "white" border collar = "#ccccc" border style = "none" borderwidth = "1px" cellpadding = "3" & gt; ; & Lt; RowStyle ForeColor = "# 000066" /> & Lt; Columns & gt; & Lt; Asp: boundfield header text = "test1" /> & Lt; ASP: Boundfield header text = "Test 2" /> & Lt; Asp: TemplateField HeaderText = "choose one" & gt; & Lt; ItemTemplate & gt; & Lt; Asp: RadioButton id = "rbut1" runat = "server" GroupName = "test" /> & Lt; / ItemTemplate & gt; & Lt; Item style horizontal alliance = "center" vertical alliance = "middle" /> & Lt; / ASP: TemplateField & gt; & Lt; / Column & gt; & Lt; FooterStyle BackColor = "White" ForeColor = "# 000066" /> & Lt; PagerStyle BackColor = "White" ForeColor = "# 000066" horizontal Align = "Left" / & gt; & Lt; SelectedRowStyle BackColor = "# 669999" font-bold = "true" ForeColor = "white" /> & Lt; HeaderStyle BackColor = "# 006699" font-bold = "true" ForeColor = "white" /> & Lt; / ASP: GridView & gt; & Lt; / Div & gt; & Lt; / Form & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

Are you binding any data to the grid? Just populate it with some data.

If there is no data then nothing will be visible. Therefore, if you are using some databases ... use MS-SQL server ... grid properties ... Use the data-banding functionality and link it with some tables.

Now, after compiling your grid, all the contents of the table will be displayed along with the respective headings in DB.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -