Raziyeh Karimi

Raziyeh Karimi

  • NA
  • 5
  • 8.1k

how can i print a id card

May 30 2013 3:26 PM

hi i want print a id card so i have a panel with idcard backgrund and some lable and i don't know how do that

my code

Panel1.Controls.Add(sho);

Panel1.Controls.Add(nameab);

Panel1.Controls.Add(last);

Panel1.Controls.Add(tal);

Panel1.Controls.Add(amo);

string mcon = ConfigurationManager.ConnectionStrings["ing"].ConnectionString;

SqlConnection con = new SqlConnection(mcon);

SqlCommand com = new SqlCommand();

SqlDataReader dr;

con.Open();

com =

new SqlCommand("select name,lastname,stdid,school,stdtel,kodmali from studenta where kodmali='" + TextBox1.Text + "'", con);

dr = com.ExecuteReader();

if (dr.HasRows)

{

Panel1.Visible =

true;

Button1.Visible =

true;

while (dr.Read())

{

sho.Text = dr[

"stdid"].ToString();

nameab.Text = dr[

"name"].ToString();

last.Text = dr[

"lastname"].ToString();

tal.Text = dr[

"stdtel"].ToString();

amo.Text = dr[

"school"].ToString();

}

}

else

{

Response.Write(

"???? ????? ?? ??? ?? ??? ????? ??? ????");

}

}

v