Results 1 to 1 of 1

Thread: controls doesnt show.(solved)

Threaded View

  1. #1

    Thread Starter
    Frenzied Member mar_zim's Avatar
    Join Date
    Feb 2004
    Location
    Toledo Cebu City.
    Posts
    1,416

    controls doesnt show.(solved)

    hi to everyone..
    i have this code and it doesnt show the datagrid control..
    wats wrong with it??
    PHP Code:
    <%@  Page Language="VB"%>
    <%@ 
    import namespace="system.data.sqlclient" %>
    <%@ 
    import namespace="system.data" %>
    <
    html>
    <
    head>
    </
    head>
    <
    script  runat=server>
    sub btnonclick(sender as object,as eventargs)
    dim dt as new datatable("sample")
    dt.columns.add(new datacolumn("Name"))
    dim dr as datarow dt.newrow
    dr
    (0)=name.text
    dt
    .rows.add(dr)
    mygrid.datasource dt.defaultview
    'mygrid.databind()
    end sub
    </script>
    <body>
    <center>
    <form runat=server>
    <h3> Name: <asp:textbox id="Name" runat="server"/>
             </h3>
             <asp:button text="btn" onclick="btnonclick" runat="server"/>
             <p>
    <asp:datagrid id="mygrid" backcolor="#ccccff" headerstyle-backcolor="#aaaadd" runat="server"/>
    </form>
    </center>
    </body>
    </html> 
    thanks in advance..

    i forgot to put this mygrid.databind()
    sorry my fault.
    Last edited by mar_zim; Sep 1st, 2004 at 11:25 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width