Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
C#
protected void btnadd_Click(object sender, EventArgs e)
       {
{
 SqlCommand cmd = new SqlCommand ("insert into personalinformation(name,dob,maritalstatus,)
 values('" + txtname.Text + "','" + txtdob.Text + "','" + ddlmaritalstatus.SelectedItem.Text + "'", conn);

conn.Open();
cmd.ExecuteNonQuery();
conn.Close();
refresh();
ShowMessage("Added Successfully");
            }

And the Refresh Code:
C#
private void refresh()
       {
           txtdob.Text = "";
           txtname.Text = "";
        
           ddlmaritalstatus.selectedItem.Text="Select";
           
           gridviewload();
       }
Posted
Updated 29-Sep-14 19:57pm
v3
Comments
syed shanu 30-Sep-14 0:57am    
So What is your problem
Sergey Alexandrovich Kryukov 30-Sep-14 1:58am    
Please don't re-post.
—SA
Repost of - http://www.codeproject.com/Questions/824491/In-Net-I-Have-Fields-Name-Dob-Marital-Status-I-Hav?arn=0

Question is not clear also.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900