![]() |
# 1 |
משתמש - היכל התהילה
|
בעיות בקוד ASP.net
ב"ה
יש לי את הקוד דוגמא הזה: קוד:
<%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.ADO" %> <html> <script language="VB" runat="server"> sub Page_Load(obj as Object, e as EventArgs) 'set up connection dim myConnection as ADOConnection = new ADOConnection _ ("Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=D:\Bnaya\59347\banking.mdb") 'open connection dim myCommand as ADODataSetCommand = new ADODataSetCommand _ ("SELECT * FROM tblUsers", myConnection) 'fill dataset dim ds as DataSet = new DataSet() myCommand.FillDataSet(ds, "tblUsers") 'select data view and bind to server control MyDataList.DataSource = ds.Tables("tblUsers"). _ DefaultView MyDataList.DataBind() end sub </script> <body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0"> <asp:DataList id="MyDataList" RepeatColumns="2" RepeatDirection= "Vertical" runat="server"> <%# DataBinder.Eval(Container.DataItem, "FirstName") %> <%# DataBinder.Eval(Container.DataItem, "LastName") %> </i></b> </div> <br /> <b>Address: </b><%# DataBinder.Eval(Container.DataItem, _ "Address") %><br /> <b>City: </b><%# DataBinder.Eval(Container.DataItem, _ "City") %><br /> <b>State: </b><%# DataBinder.Eval _ (Container.DataItem, "State") %><br /> <b>ZIP: </b><%# DataBinder.Eval _ (Container.DataItem, "Zip") %><br /> <b>Phone: </b><%# DataBinder.Eval _ (Container.DataItem, "Phone") %><br /> </div> </template> </asp:DataList> </body> </html> קוד:
Parser Error Message: Code blocks are not supported in this context.
__________________
קו ישר, כי אפשר גם אחרת |
![]() |
![]() |
חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים) | |
|
|