DotNet By Satya

Blog that contains articles about new technologies related or not with programming. I will describe and solves some problems that I encounter in my career. ASP .NET, AJAX, Javascript, C++, C# and SQL are some of the subjects that will appear.

28 October 2011

validate checkbox list using javascript

›
function valid() { var chkBoxList = document.getElementById('CheckBoxList11'); var chkBoxCount= chkBoxList.get...
24 October 2011

add js functions in .cs file in simple

›
Literal li = new Literal(); li.Text = "alert('hello');"; Page.Controls.Add(li); ------------------------------------ Page....

check whether the given value is string or not

›
public static bool IsNumeric(String strVal) { Regex reg = new Regex("[^0-9-]"); Regex reg2 = new Regex("^-[0-9]+$|^...

get files from a directory folder

›
string[] files = System.IO.Directory.GetFiles(serverpath + "/" + inputfolder);

filter data of dataset / datatable

›
ds.Tables[0].Select("Name LIKE %" + "abc%" ); ------------------------------ DataView dv = ds.Tables[0].DefaultView; dv....

don't allow duplicates for a listbox

›
if (!ContactsListBox.Items.Contains(item)) { ContactsListBox.Items.Add(item); }

get datetime in user friendly (datetime convertion) in sqlserver

›
select convert (varchar(10), getdate(),101) ------------------------------------------ ddat = new Date(); ddat = new Date(ddat.setDate(new D...

how to disable the all controls in a page

›
private void Disable(Control c) { if ((c is TextBox) || (c is LinkButton) || (c is Button) || (c is CheckBox) || (c is CheckBoxList) || (c i...

how to use gridview datarow bound event

›
protected void gvSkinLoc_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { if (e.Row....
03 October 2011

get the ascii value as well as the typed value in alert

›
function getval() { var keyASCII = window.event.keyCode; alert(keyASCII); var keyValue = String.fromCharCode(keyASCII); aler...
30 September 2011

split last string in sqlserver

›
username emp/satya md/sai emp/develop/suresh clerk/surya comp/sam select reverse(substring(reverse(username),0,charindex('/',reverse...

creating new row for a gridview dynamically

›
if (!IsPostBack) { getdata(); } ---------------------------- void getdata() { dalLogin dal = new dal...
29 September 2011

checking regular expression for different date formats

›
string spl = @"([/|\-|.|\s])?"; string d = "(0?[1-9]|[12][0-9]|3[01])"; string m = "(0?[1-9]|1[012]...
27 September 2011

date regular expressions in .net

›
@"(([0-9]{1,31})[/|-|(\s)]([0-9]{1,12})[/|-|(\s)](\d{4}|\d{2}))" //DD/MM/YY(YY) @"(([0-9]{1,12})[/|-|(\s)]([0-9]{1,31})[/|-|(...
19 September 2011

how to find out rank of employees based on their salaries

›
select empname,dense_rank()over(order by salary)as rank from tblEmp
‹
›
Home
View web version

DotnetBySatya About

satyabhaviri
View my complete profile
Powered by Blogger.