CasCading DropDownList using Generic Handler and JQuery in Asp.net

CasCading DropDownList using Generic Handler and JQuery in Asp.net

ometimes we need to do fill dropdownlist using JQuery and Generic Handler in Asp.net Explanation given below: Design Page: SELECT YOUR STATE Generic Handler: public void ProcessRequest(HttpContext context) { context.Response.ContentType = "application/json"; int id = Convert.ToInt32(context.Request["id"]); string sJSON = GetProduct(id); context.Response.Write(sJSON); } public string GetProduct(int id)
Database Normalization Tutorial with example

Database Normalization Tutorial with example

Normalization is the process of efficiently organizing data in a database. There are two goals of the normalization process: eliminating redundant data (for example, storing the same data in more than one table) and ensuring data dependencies make sense (only storing related data in a table). Both of these are worthy goals as they reduce the amount of space a database consumes and ensure that data is logically stored. Database normalization is the process of organizing the fields and tables of a relational database to minimize redudancy and dependency. Normalization usually involves dividing large tables into smaller (and less redundant) tables and defining relationships between them. The objective is to isolate data so that additions, deletions, and modifications of a field can be made in just one table and then propagated through the rest of the database using the defined relationships. Normalization is a process of simplifying the relationship between the data in a record it is carried out for the following reasons. To simplifying the maintenance of data through updates, insertion and deletions To allow simple retrieval of data in response to query and requests To avoid restructuring of data when new application requirements arises. To structure the data so that any relationship can be easily represented
Difference Between Sql Server CHAR, VARCHAR and NVARCHAR Data Type

Difference Between Sql Server CHAR, VARCHAR and NVARCHAR Data Type

CHAR is a Fixed Length Data Type. For example if you declare a variable/column of CHAR (10) data type, then it will always take 10 bytes irrespective of whether you are storing 1 character or 10 character in this variable or column. And in this example as we have declared this variable/column as CHAR(10), so we can store max 10 characters in this column. OR It stores fixed length of character. if you declare char(50) then it allocates memory for 50 characters. if you store 10 character word then it store it in 10 characters memory location and other 40 character's memory location will be wasted. Char datatype can store upto 8000 bytes of fixed-length character. VARCHAR is a variable length Data Type. For example if you declare a variable/column of VARCHAR (10) data type, it will take the no. of bytes equal to the number of characters stored in this column. So, in this variable/column if you are storing only one character then it will take only one byte and if we are storing 10 characters then it will take 10 bytes. And in this example as we have declared this variable/column as VARCHAR (10), so we can store max 10 characters in this column.
JQuery Validate RadioButtonList in Asp.Net Example

JQuery Validate RadioButtonList in Asp.Net Example

I will explain how to validate Radiobuttonlist using Jquery using Asp.net. Script For Validation Design Page :
Introduction to Web Service

Introduction to Web Service

Web Service is an application that is designed to interact directly with other applications over the internet. In simple sense, Web Services are means for interacting with objects over the Internet. The Web serivce consumers are able to invoke method calls on remote objects by using SOAP and HTTP over the Web. WebService is language independent and Web Services communicate by using standard web protocols and data formats, such as HTTP XML SOAP Advantages of Web Service Web Service messages are formatted as XML, a standard way for communication between two incompatible system. And this message is sent via HTTP, so that they can reach to any machine on the internet without being blocked by firewall. Examples for Web Service Weather Reporting: You can use Weather Reporting web service to display weather information in your personal website. Stock Quote: You can display latest update of Share market with Stock Quote on your web site.
Import Data from Excel and CSV to SQL server using C# in Asp.net

Import Data from Excel and CSV to SQL server using C# in Asp.net

The Page having a FileUpload control and the Upload button, on selecting the Excel or CSV file user needs to click on Upload button to store the data to Server. Here we are treating the uploaded file as database hence we need to create OLEDB connection to this file, from this connection will be created and the data is fetched to C# as DataTable. '[Sheet1$]' is the Name of the Worksheet where requires data is present. Table CREATE TABLE [dbo].[Tag]( [ID] [int] IDENTITY(1,1) NOT NULL, [TagType] [int] NULL, [TagCode] [nvarchar](100) NULL, [Status] [bit] NULL, [Duration] [int] NULL) Stored Procedure Create proc [dbo].[ExcelTag] @TagType int, @TagCode nvarchar(100), @Status bit, @Duration int as if Not exists(Select top 1 TagCode from dbo.[Tag] where TagCode=@TagCode) Begin insert into dbo.[Tag](TagType,TagCode,[Status],Duration)values(@TagType,@TagCode,@Status,@Duration) End
System Function in SQL-Server

System Function in SQL-Server

GETDATE() Gives current date time (server’s time zone) E.g. SELECT GETDATE()return 2011-08-25 09:54:39.963 GETUTCDATE() Gives current date time (GMT + 0 Time zone) E.g. SELECT GETUTCDATE() return 2011-08-25 04:27:30.163 ISDATE('Value') Returns bool value whether given value is proper date or not E.g. SELECT ISDATE('2011-08-25') return 1 SELECT ISDATE('2011-13-25') return 0 LTRIM('Value') Trims from left E.g. SELECT LTRIM(' SQL SERVER ') return ‘SQL SERVER ‘ RTRIM('Value') Trims from right E.g. SELECT LTRIM(' SQL SERVER ') return ‘ SQL SERVER‘ REPLACE() replace all occurrence of string with other string E.g. SELECT REPLACE('SQL SERVER ','S','A') return ‘AQL AERVER’
New Features in SQL Server 2008

New Features in SQL Server 2008

IntelliSense for Query Editing IntelliSense offers a few additional features besides just completing the world. You can see those options from SSMS List Members Parameter Info Quick Info Complete Word Refresh Local Cache Table-Value Parameter In many situations, it is necessary to pass a set of table structured values to a stored procedure or function. These values may be used for updating/population a table. CREATE TYPE Customer AS TABLE ( CustomerId INT IDENTITY(1,1), CustomerName VARCHAR(30) ); GO DECLARE @T as Customer INSERT INTO @T(CustomerName) VALUES ('a'),('b'),('c'),('d'),('e') SELECT * FROM @T Grouping Sets Grouping Sets is an extension to the GROUP BY clause that lets users define multiple grouping in the same query. Grouping Sets produce a single result set that is equivalent to a UNION ALL of differently grouped rows, making aggregation querying and reporting easier and faster. Example SELECT year (order_date) AS Year, quarter (order_date) AS Quarter, COUNT (*) AS Orders FROM sales_order GROUP BY GROUPING SETS ((Year, Quarter), (Year)) ORDER BY Year, Quarter File Stream data