-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathYorumYap.aspx.cs
43 lines (34 loc) · 1.28 KB
/
YorumYap.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
public partial class YorumYap : System.Web.UI.Page
{
sqlsinif bgl = new sqlsinif();
string Yemekid = "";
protected void Page_Load(object sender, EventArgs e)
{
Yemekid = Request.QueryString["Yemekid"];
SqlCommand komut = new SqlCommand("Select YemekAd From Tbl_Yemekler where Yemekid=@p1", bgl.baglanti());
komut.Parameters.AddWithValue("@p1", Yemekid);
SqlDataReader dr = komut.ExecuteReader();
while (dr.Read())
{
Label1.Text = dr[0].ToString();
}
bgl.baglanti().Close();
}
protected void Button1_Click1(object sender, EventArgs e)
{
//SqlCommand komut = new SqlCommand("insert into Tbl_Yorumlar (YorumAdSoyad,YorumMail,Yorumicerik,Yemekid) values (@p1,@p2,@p3,@p4)", bgl.baglanti());
//komut.Parameters.AddWithValue("@p1", Txt_Gonderen.Text);
//komut.Parameters.AddWithValue("@p2", Txt_Mail.Text);
//komut.Parameters.AddWithValue("@p3", Txt_Mesaj.Text);
//komut.Parameters.AddWithValue("@p4", Yemekid);
//komut.ExecuteNonQuery();
//bgl.baglanti().Close();
}
}