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.

22 July 2012

SQL Command Types

›
DDL is Data Definition Language statements. Some examples: CREATE - to create objects in the database ALTER - alters the structure of th...

select distinct of rows from a table of multiple duplicate columns

›
create table emp(empid int,empname varchar(50),sal money,status bit) insert into emp select 1,'satya',20000,1 union all select 1,...
16 July 2012

array conversions

›
using System; using System.Collections.Generic; --------------------------- arraylist to array > string[] a = (string[])arraylist.toarray...
15 July 2012

General Page Life-Cycle Event Stages

›
The events occur in the following sequence. Its best to turn on tracing(<% @Page Trace=”true”%>) and track the flow of events : PageRe...
09 July 2012

convertion differences between Convert.ToInt32 and int.Parse

›
int.Parse("12") --> 12 int.Parse("12.12") --> Format Ex int.Parse(null) --> Null Ex int.Parse("88970888888...
28 June 2012

clear all cotrol values of a page

›
<script type="text/javascript">     function allclear()     {    //debugger         var elements=document.getElementsByTagNa...

make listbox items colorful

›
protected void Page_PreRender(object sender, EventArgs e) {     bool flag=false;     foreach (ListItem li in ListBox1.Items)     {         i...

make webpage title scrolling

›
<script type="text/javascript">     msg = "MyWebPageTitle";     msg = "..." + msg;pos = 0;     function ...

javascript handlers

›
// Add handler using the getElementById method $addHandler(Sys.UI.DomElement.getElementById("Button1"), "click", toggleC...

String formats

›
String strVal = "a(1), a1(2), a.3(3), a'4 (4), a.5:(5)"; Regex.Replace(strVal, @"[\w\s';.&,:]+\((\d+)\)", ...
01 June 2012

image file path to byte[] format

›
private byte[] imgStream(string filePath) { MemoryStream stream = new MemoryStream(); tryagain: try { Bitmap bmp = new Bitmap(filePath);   b...
25 May 2012

Get RowCount all tables of a Database in SqlServer

›
SELECT [TableName] = O.name, [RowCount] =MAX(I.rows)FROM sysobjects O, sysindexes I WHERE O.xtype ='U'AND I.id =OBJECT_ID(O.name) GR...

Email validation javascript

›
function emailCheck(str) { var at="@"; var dot="."; var lat=str.indexOf(at); var lstr=str.length; var ldot=str.indexOf(d...
18 April 2012

Get current date n time in sqlserver

›
select current_timestamp go select {fn now()} go select getdate() go select convert(varchar,getdate(),101)* go sqlserver2005 -- select conve...
29 March 2012

get web.config appsettings in javascript

›
var conn = '<%=ConfigurationManager.ConnectionStrings["MyConnString"].ConnectionString %>' alert(conn); var v1 = ...
‹
›
Home
View web version

DotnetBySatya About

satyabhaviri
View my complete profile
Powered by Blogger.