Click here to Skip to main content
15,917,176 members
Home / Discussions / C#
   

C#

 
GeneralRe: WPF - Changing Fill property for group of shapes Pin
Shawn Horton15-Jan-08 1:17
Shawn Horton15-Jan-08 1:17 
Generaldeveloping fingerprint software using c# Pin
ayie13-Jan-08 16:22
ayie13-Jan-08 16:22 
GeneralRe: developing fingerprint software using c# Pin
Vasudevan Deepak Kumar13-Jan-08 18:17
Vasudevan Deepak Kumar13-Jan-08 18:17 
GeneralRe: developing fingerprint software using c# Pin
ayie15-Jan-08 21:14
ayie15-Jan-08 21:14 
GeneralSp Pin
new2pgrmg13-Jan-08 16:09
new2pgrmg13-Jan-08 16:09 
GeneralRe: Sp Pin
tcsoccerman13-Jan-08 16:17
tcsoccerman13-Jan-08 16:17 
GeneralRe: Sp Pin
new2pgrmg13-Jan-08 17:06
new2pgrmg13-Jan-08 17:06 
GeneralRe: Sp Pin
new2pgrmg15-Jan-08 5:00
new2pgrmg15-Jan-08 5:00 
------------
--------------
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;


public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
SqlConnection sqlObj = new SqlConnection();

sqlObj .ConnectionString = System.Configuration.ConfigurationManager.AppSettings["connectionStrings"].ToString();





SqlCommand sqlCmdObj = new SqlCommand();
sqlCmdObj.Connection = sqlObj;

//We have a command and connection object -this data adapter is the interface for the two

SqlDataAdapter sqlAdapterObj = new SqlDataAdapter();
sqlAdapterObj.SelectCommand = sqlCmdObj;

DataSet dSetObj = new DataSet();

sqlCmdObj.CommandText = "selQry";
sqlCmdObj.CommandType = CommandType.StoredProcedure;

sqlAdapterObj.Fill(dSetObj);

GridView1.DataSource = dSetObj.Tables[0];
GridView1.DataBind();


}
protected void btnEnter_Click(object sender, EventArgs e)
{
SqlConnection sqlObj = new SqlConnection();

sqlObj.ConnectionString = System.Configuration.ConfigurationManager.AppSettings["connectionStrings"].ToString();



SqlCommand sqlCmdObj = new SqlCommand();
sqlCmdObj.Connection = sqlObj;

sqlObj.Open();


sqlCmdObj.CommandText = "insQry";
sqlCmdObj.CommandType = CommandType.StoredProcedure;
if (txtName.Text != ""&& txtAddress.Text!="")
{
sqlCmdObj.Parameters.AddWithValue("@txtname", txtName.Text);
sqlCmdObj.Parameters.AddWithValue("@txtAddress", txtAddress.Text);


sqlCmdObj.ExecuteNonQuery();
}
else
return;
}
protected void txtDelete_Click(object sender, EventArgs e)
{
SqlConnection sqlObj = new SqlConnection();

sqlObj.ConnectionString = System.Configuration.ConfigurationManager.AppSettings["connectionStrings"].ToString();

SqlCommand sqlCmdObj = new SqlCommand();
sqlCmdObj.Connection = sqlObj;
sqlObj.Open();
sqlCmdObj.CommandText = "delQry";
sqlCmdObj.CommandType = CommandType.StoredProcedure;
sqlCmdObj.Parameters.AddWithValue("@txtname", txtName.Text);
sqlCmdObj.Parameters.AddWithValue("@txtAddress", txtAddress.Text);



sqlCmdObj.ExecuteNonQuery();
}
protected void txtName_TextChanged(object sender, EventArgs e)
{

}
}
GeneralThe value of message box Pin
Strategic_Thinker13-Jan-08 5:27
Strategic_Thinker13-Jan-08 5:27 
GeneralRe: The value of message box Pin
tcsoccerman13-Jan-08 5:30
tcsoccerman13-Jan-08 5:30 
GeneralRe: The value of message box Pin
Strategic_Thinker13-Jan-08 7:00
Strategic_Thinker13-Jan-08 7:00 
GeneralRe: The value of message box Pin
Christian Graus13-Jan-08 9:20
protectorChristian Graus13-Jan-08 9:20 
JokeRe: The value of message box Pin
Steve Echols13-Jan-08 21:14
Steve Echols13-Jan-08 21:14 
GeneralRe: The value of message box Pin
Paul Conrad13-Jan-08 6:30
professionalPaul Conrad13-Jan-08 6:30 
QuestionVScrollBar and VisibleArea Pin
tcsoccerman13-Jan-08 4:08
tcsoccerman13-Jan-08 4:08 
GeneralRe: VScrollBar and VisibleArea Pin
Luc Pattyn13-Jan-08 4:55
sitebuilderLuc Pattyn13-Jan-08 4:55 
GeneralRe: VScrollBar and VisibleArea Pin
tcsoccerman13-Jan-08 5:28
tcsoccerman13-Jan-08 5:28 
GeneralRe: VScrollBar and VisibleArea Pin
Luc Pattyn13-Jan-08 5:56
sitebuilderLuc Pattyn13-Jan-08 5:56 
GeneralRe: VScrollBar and VisibleArea Pin
tcsoccerman13-Jan-08 6:49
tcsoccerman13-Jan-08 6:49 
GeneralRe: VScrollBar and VisibleArea Pin
Luc Pattyn13-Jan-08 7:52
sitebuilderLuc Pattyn13-Jan-08 7:52 
GeneralRe: VScrollBar and VisibleArea Pin
tcsoccerman13-Jan-08 16:16
tcsoccerman13-Jan-08 16:16 
GeneralRe: VScrollBar and VisibleArea Pin
Luc Pattyn13-Jan-08 21:44
sitebuilderLuc Pattyn13-Jan-08 21:44 
GeneralRe: VScrollBar and VisibleArea Pin
tcsoccerman14-Jan-08 13:02
tcsoccerman14-Jan-08 13:02 
Questionget text selection [modified] Pin
Askalo13-Jan-08 3:20
Askalo13-Jan-08 3:20 
GeneralRe: get text selection Pin
Paul Conrad13-Jan-08 6:32
professionalPaul Conrad13-Jan-08 6:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.