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.

29 March 2012

get web.config appsettings in javascript

›
var conn = '<%=ConfigurationManager.ConnectionStrings["MyConnString"].ConnectionString %>' alert(conn); var v1 = ...
28 March 2012

restrict textbox to allow only numerics

›
function numerics() {  key = String.fromCharCode(window.event.keyCode);  if (!(key >= '0' && key <= '9'))   wi...
21 March 2012

check all checkboxes in a form

›
$(document).ready(function() {             $('#chkAll').click(              function() {                  $("INPUT[type='ch...

checkbox list javascript validation

›
function valid()     {           var chkBoxList = document.getElementById('<%=CheckBoxList11.ClientID %>');         var chkBox...
13 March 2012

Remove duplicates from an interger array

›
int[] a = { 1, 3, 2, 5, 6, 1, 2, 3 }; string s =","; for (int i = 0; i < a.Length - 1; i++) { if (!s.Contains("," + a...
07 March 2012

cookie in js

›
$.cookie('test', $('#Text1').val());

array in javascript

›
<p id="div_p"></p> var array = ["S", "V", "B"]; document.getElementById("div_p...
31 January 2012

timer countdown in asp.net

›
Label4.Text = "00"; Label5.Text = "02"; Label6.Text = "00";         if (Label6.Text == "00" || Label...
25 January 2012

Tooltip for dropdownlist items

›
It is common in most web pages that whole text in dropdown lists cannot be seen due to width limitation. One solution for this would be addi...
21 January 2012

change the database name in sqlserver using query

›
Supported in SQL Server 2000 and 2005 exec sp_renamedb 'databasename' , 'newdatabasename' Supported in SQL Server 2005 and l...
07 January 2012

Naming conventions in .net

›
Pascal case The first letter in the identifier and the first letter of each subsequent concatenated word are capitalized. Example: BackColor...

Some Coding Standards in .net

›
1.    Use Meaningful, descriptive words to name variables. Do not use abbreviations.     Good:     string address     int salary      Not Go...

factorial of number in console applications

›
int count = 1; Console.Write("Enter Number for factorial: "); int number = Convert.ToInt32(Console.ReadLine()); for (int i = 1; i ...

palindrome in console applications

›
string str = string.Empty; Console.WriteLine("Enter a String"); string s = Console.ReadLine(); int i = s.Length; for (int j = i - ...
06 January 2012

group by and row no in sql

›
SELECT ROW_NUMBER()   OVER ( ORDER   BY   ColumnName1) As SrNo, ColumnName1,  ColumnName2 FROM   TableName SELECT DENSE_RANK()  OVER (ORD...
‹
›
Home
View web version

DotnetBySatya About

satyabhaviri
View my complete profile
Powered by Blogger.