Quantcast
Channel: Learn C# » CSharp
Browsing all 10 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

How to execute Stored Procedure in C#

Executing Stored Procedure in C# SQLCommand Command = new SqlCommand(“StoredProcedureName”, Connection); Command.CommandType = CommandType.StoredProcedure; Command.Parameters.Add(new...

View Article



Image may be NSFW.
Clik here to view.

How to bind Combobox to a table field?

Binding ComboBox to a table using Stored Procedure SqlDataAdapter da = new SqlDataAdapter(“StoredProcedureName”,Connection); da.SelectCommand.CommandType = CommandType.StoredProcedure;...

View Article

Image may be NSFW.
Clik here to view.

Customizing TextBox

Allowing Only numbers in TextBox Insert this code in KeyPress event of textBox private void txtYear_KeyPress(object sender, KeyPressEventArgs e) { if (!char.IsDigit(e.KeyChar) &&...

View Article

Image may be NSFW.
Clik here to view.

How to pass tablename as parameter to Stored Procedures

Passing Tablename create procedure SAll (@tablename varchar(25)) as EXEC (‘select * from ‘ + @tablename) udhaya PiSquare Soft Solns

View Article

Image may be NSFW.
Clik here to view.

How to make TextBox accept only Deecimal Values?

How to make textbox to allow decimal values in textbox in c#.net windows forms. private void txtRate_KeyPress(object sender, KeyPressEventArgs  e) {     if (!char.IsDigit(e.KeyChar) &&...

View Article


Image may be NSFW.
Clik here to view.

Login Failed for user ‘sa’.Reason:Not associated with a trusted SQL connection

How to connect to a remote SQL database using c# windows application? 1.First Ensure that Mixed mode authentication is enabled on your SQL Server. To Enable Mixed Mode authentication Open ENTERPISE...

View Article

Image may be NSFW.
Clik here to view.

How to rename Columnname in a table?

Renaming fieldname in a table ALTER TABLE Tablename RENAME COLUMN ColumnName to NewColName ALTER TABLE Employee RENAME COLUMN Employee_number to Emp_id Udhaya Pi Square Simsys

View Article

Image may be NSFW.
Clik here to view.

How to add controls to a form at runtime?

Dynamic creation of controls Label lbl = new Label(); this.Controls.Add(lbl); lbl.Name = lblName; lbl.Text = “Name”; Udhaya Pisquare Simsys

View Article


Image may be NSFW.
Clik here to view.

How to change the location of a control at runtime in c#?

Changing the position of control at runtime Label1.Location = new Point(X position,Y position); Udhaya Pisquare

View Article


Image may be NSFW.
Clik here to view.

How to add Yes and No buttons to Message Box?

DialogResult button = MessageBox.Show(“Are you sure want to  exit”, “Exit”, MessageBoxButtons.YesNo); if (button == DialogResult.Yes) {    Application.Exit() } Udhaya Pisquare

View Article
Browsing all 10 articles
Browse latest View live




Latest Images