This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Button Click | |
$("#btn").click(function(){ | |
alert("Button Clicked"); | |
}); | |
// Drop Down List Change | |
$("#ddl").change(function () { | |
alert("Drop Down List Changed"); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- By Name | |
Exec StoredProcName | |
-- or simply | |
StoredProcName | |
-- With input variables | |
StoredProcName 'paramValue1', 'paramValue2', ... | |
-- With nameed input variables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DataTable dt = new DataTable(); | |
// Populate said datatable | |
// ... | |
foreach(DataRow row in dt.Rows) | |
{ | |
TextBox1.Text = row["Name"].ToString(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ListItem selectedListItem = DropDownList1.Items.FindByValue("Test"); | |
if (selectedListItem != null) | |
{ | |
selectedListItem.Selected = true; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ListItem selectedListItem = DropDownList1.Items.FindByText("Test"); | |
if (selectedListItem != null) | |
{ | |
selectedListItem.Selected = true; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void StateDDL() | |
{ | |
DataTable stateTable = new DataTable(); | |
using (SqlConnection conn = new SqlConnection(ConnectionString)) | |
{ | |
SqlCommand sc_command = con.CreateCommand(); | |
sc_command.CommandType = CommandType.Text; | |
sc_command.CommandText = @"Select State | |
, StateCode | |
from States |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected int GetInt(string parameter) | |
{ | |
string _con = ConfigurationManager.ConnectionStrings["SQLCON"].ConnectionString; | |
using (SqlConnection con = _con) | |
{ | |
SqlCommand sc_command = con.CreateCommand(); | |
sc_command.CommandText = "Select Age From Person where ID = @parameter"; | |
sc_command.Parameters.AddWithValue("@parameter", parameter); | |
sc_command.CommandType = CommandType.Text; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Main(string[] args) | |
{ | |
Console.WriteLine("Hello"); | |
Console.WriteLine(HasUniqueCharacters("Hello")); | |
Console.WriteLine("aAbBcCdDeEfFgG"); | |
Console.WriteLine(HasUniqueCharacters("aAbBcCdDeEfFgG")); | |
Console.Read(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.scrollTo = function (x, y) { | |
return true; | |
} |
NewerOlder