omerayna
New member
- Joined
- Sep 16, 2023
- Messages
- 1
- Programming Experience
- Beginner
HTML:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="onurty.aspx.cs" Inherits="JOIN_PROJEM.onurty" %>
<!DOCTYPE html>
<html xmlns="[URL='http://www.w3.org/1999/xhtml']XHTML namespace[/URL]">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table>
<% while dr1.read() { %>
<tr>
<td> Ürün Adı :</td>
<td> <%=dr1("urunadi");%> </td>
<td> <%=dr1("urunlinki");%> </td>
</tr>
<% } %>
</table>
</div>
</form>
</body>
</html>
---------------
C#:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.IO;
using System.Text;
using System.Drawing;
using System.Data.Common;
using System.Data.OleDb;
namespace JOIN_PROJEM
{
public partial class onurty : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OleDbConnection connection = new OleDbConnection(ConfigurationManager.ConnectionStrings["constr"].ToString());
string query = "select * from urunler";
OleDbCommand dr1= new OleDbCommand(query, connection);
dr1.ExecuteReader();
}
}
}
ı dont want grıdvıew repeater buıldıngstrıng literal and vs ı waNT WHILE datareader in web desıgner wıth vstutıo2015 ı dont want mvc project dr1 error explaın : dr1 does not exıst context what can i do
Last edited by a moderator: