Saturday, February 20, 2010
Microsoft Next Generation Bing Map
Monday, December 14, 2009
Pass Javascript value to server side object & Event
Its is very tuff job to transfer any javascript object to server side (code behind) objects and event by javascript. but .NET Framework 4 make this job very easy you can now pass Javascript from Javascript to code behind file using Ajax.
Passing parameters as primitive type
The easiest and most common way to passing javascript object information to server side method is Send it as individual parameters to the sever side method, please check below code show how to call server side "AddPerson" method with 4 argument
<script language="javascript" type="text/javascript">
var p1 = new Person('Adday', 'Michel','New York', 28);
var a = 0;
function passvalue() {
JavaWebApps.PersonService.AddPerson(p1.firstName,p1.lastName,p1.City,customer.age,function (response) {
});
}
</script>
The Person JavaScript class is a simple class with four properties firstName, lastName,City and age.
function Person(firstName, lastName,City, age) {
this.firstName = firstName;
this.lastName = lastName;
this.City=City;
this.age = age;
}
And code for server side AddPerson Method code
[WebMethod]
public string IAddPerson(string firstName, string lastName, string City, int age) {
return "Person added";
}
Thursday, October 22, 2009
Delete all tables along with Constraint
DECLARE @ConstraintName NVARCHAR(MAX)
DECLARE Constraints CURSOR FOR
SELECT TABLE_NAME, CONSTRAINT_NAME FROM INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE
OPEN Constraints
FETCH NEXT FROM Constraints INTO @TableName, @ConstraintName
WHILE @@FETCH_STATUS = 0
BEGIN
EXEC('ALTER TABLE [' + @TableName + '] DROP CONSTRAINT [' + @ConstraintName + ']')
FETCH NEXT FROM Constraints INTO @TableName, @ConstraintName
END
CLOSE Constraints
DEALLOCATE Constraints
DECLARE Tables CURSOR FOR
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
OPEN Tables
FETCH NEXT FROM Tables INTO @TableName
WHILE @@FETCH_STATUS = 0
BEGIN
EXEC('DROP TABLE [' + @TableName + ']')
FETCH NEXT FROM Tables INTO @TableName
END
CLOSE Tables
DEALLOCATE Tables
Monday, August 10, 2009
આ માણસ જાણે મોબાઇલ થઈ ગયો
જરૂર જેટલી જ લાગણીઓ
રિચાર્જ કરતો થઈ ગયો
ખરે ટાણે જ ઝીરો બેલેન્સ
દેખાડતો થઈ ગયો
આ માણસ જાણે મોબાઈલ થઈ ગયો!
સામે કોણ છે એ જોઈને
સંબંધ રિસિવ કરતો થઈ ગયો
સ્વાર્થનાં ચશ્મા પહેરી મિત્રતાને પણ
સ્વીચ ઓફ કરતો થઈ ગયો
આ માણસ જાણે મોબાઈલ થઈ ગયો!
આજે રીટા તો કાલે ગીતા એમ
મોડેલ બદલતો થઈ ગયો
મિસિસને છોડીને મિસને
એ કોલ કરતો થઈ ગયો
આ માણસ જાણે મોબાઈલ થઈ ગયો!
પડોશીનુ ઊંચું મોડેલ જોઈ
જુઓને જીવ બાળતો થઈ ગયો
સાલું, થોડી રાહ જોઈ હોત તો!
એવું ઘરમાં યે કહેતો થઈ ગયો
આ માણસ જાણે મોબાઈલ થઈ ગયો!
હોય બરોડામાં અને છું સુરતમાં
એમ કહેતો એ થઈ ગયો
આજે હચ તો કાલે રિલાયન્સ એમ
ફાયદો જોઈ મિત્રો પણ બદલતો થઈ ગયો
આ માણસ જાણે મોબાઈલ થઈ ગયો!
ઈનકમિંગ – આઉટ ગોઈંગ ફ્રીનાં ચક્કરમાં
કુટુંબનાં જ કવરેજ બહાર એ થઈ ગયો
હવે શું થાય બોલો
મોડેલ ફોર ટુ ઝીરો એ થઈ ગયો
આ માણસ જાણે મોબાઈલ થઈ ગયો!
Swine Flu
In now days Swine flu is biggest threat spread in every human.So I decide to write this post apart from technical post on .NET framework and VS2008
The following information can be very useful. Also the attached PDF will guide you enough to understand the symptoms and the common mistakes you should avoid to further spread this deadly disease. Take some time and go through the same.
I believe a little awareness always helps. Hope this indeed will.
Cheers,
Swine Flu (H1N1)
With the first swine flu death being recorded in INDIA few days back, it is all the more important to have readily available information regarding the symptoms, prevention and the right place for treatment. This will not only minimize the chances of us contracting it but in case we know someone who has these symptoms we can guide them to the right hospital.
The attached presentation will give you additional details about the swine flu, its symptoms and prevention measures.
As a unified force we can stop the spread of this EPIDEMIC and help cure the affected ones with timely and correct treatment.
Friday, August 7, 2009
Query Hierarchical data Using CTE in T-SQL 2005
1) The maximum number of childern for a parent is 2^33. But you can enlarge this number by expanding the slots in s column (currently, it's 10 characters wide for each level).
2) The maximum number of levels is 100. This is the limitation of T-SQL.
CREATE TABLE Hierarchy(
Parent VARCHAR(20) NOT NULL,
Child VARCHAR(20),
CONSTRAINT UIX_ParentChild
UNIQUE NONCLUSTERED (Parent,Child)
)
GO
CREATE CLUSTERED INDEX CIX_Parent ON Hierarchy(Parent)
GO
INSERT Hierarchy VALUES('World','Europe')
INSERT Hierarchy VALUES('World','North America')
INSERT Hierarchy VALUES('Europe','France')
INSERT Hierarchy VALUES('France','Paris')
INSERT Hierarchy VALUES('North America','United States')
INSERT Hierarchy VALUES('North America','Canada')
INSERT Hierarchy VALUES('United States','New York')
INSERT Hierarchy VALUES('United States','Washington')
INSERT Hierarchy VALUES('New York','New York City')
INSERT Hierarchy VALUES('Washington','Redmond')
--The following row will generate a loop regarding the 'World'
INSERT Hierarchy VALUES('Redmond', 'World')
GO
Declare @Root nvarchar(100);
Set @Root ='World';
With t as (
Select parent = convert(varchar(20),'--'),
Child = convert(varchar(20),@Root),
L = 0,
S = Convert(varchar(max),'')
union all
select h.*, t.L+1, t.S+ convert(varchar(max),right('0000000000'+convert(varchar, row_number() over (order by h.Parent )),10))
from hierarchy h
join t on h.parent = t.child and h.Child <> @Root
)
Select space(L)+Child, * from t order by s;
Sunday, August 2, 2009
Total solution for PDF(pdfdonkey)
Hi friend this is very small but use full tool which me and my friend wrote for PDF solutions
PDF Donkey is where you can find all solutions related to PDF Utilities.
PDF Donkey can performs following tasks for you.
PDF Splitter/Merger
PDF Encrypter/Decrypter
PDF to Image
Image to PDF
Image Extraction from PDF File.
for download this project visit this web site
http://pdfdonkey.com/products.html