Posts

Showing posts from December, 2018

Advance c# : Generics , LINQ

Image

Validation with help of Java Script

Image
JavaScript is Client Side Scripting Language. we can use them for validation too. here I am going to introduce you a small demo. First of all, See this is designing portion. On client's Click, it will call the function Validation(). which is a basically a javascript function. which have different methods related to javascript in validation function we had created many small functions which will return an error message or confirm validation respond. in alert(errors) we are going to print Error Message. it will be a pop-up message.  The check name function will allow entries between a to z (a-z) and A to Z(A-Z). so basically it will not accept Special character and numbers in the name. and also will not accept the blank value. TextName: will get the value of textbox - txtname which we had created above. expValidation : have a pattern for UserName.  CheckMail() function is used to check that textbox value is fulfill...

AJAX Complete Demo

Image
what is Ajax .? Ajax Stands for Asynchronious Java Script and XML. the word Asynchronious means user dont need to wait for the server respond to a request. but can continue using web page.It is client side technolog. Java script use AJAX for altering the page. XML use AJAX for exchanging information ASP and JSP use AJAX in server side handeling. so we can say that AJAX is more interactive, faster and user friendly. AJAX controll : -It enable the client side behaviour more rich without client side scripting language. the control tool Box in VS IDE contains group of controls called : Ajax Extantion. 1. ScriptManager Control 2. ScriptManagerProxy Control. 3. UpdatePanel Control. 4. The Update Progress Control. 5. the Timer Control. 1. Script Manager Control : This ScriptManager control provides support for client-side AJAX features in an AJAX enabled web pages. It actually registers and loads the Microsoft AJAX library to enable the AJAX features 2. ScriptM...

C# collection Part-3(Queue-HashTable)

What is a Queue in C#? The Queue is a special case collection which represents a first in first out concept. Declaration of the Queue The declaration of a Queue is provided below. A Queue is created with the help of the Queue Datatype. The "new" keyword is used to create an object of a Queue. The object is then assigned to the variable qt. Queue qu = new Queue(); Adding elements to the Queue The enqueue method is used to add an element into the queue. The general syntax of the statement is given below. Queue.enque(element); Count This property is used to get the number of items in the queue. Below is the general syntax of this statement. Queue.count Contains This method is used to see if an element is present in the Queue. Below is the general syntax of this statement. The statement will return true if the element exists, else it will return the value false. Queue.contains(element) using System; using System.Collections; using System.Collection...

c# collection part-2 (Stack)

What is Stack in C#? The stack is a special case collection which represents a last in first out (LIFO) concept. To first understand LIFO,  example :  a stack of books with each book kept on top of each other. Declaration of the stack A stack is created with the help of the Stack Datatype. The keyword "new" is used to create an object of a Stack. The object is then assigned to the variable st. Stack st = new Stack(); Adding elements to the stack The push method is used to add an element to the stack. The general syntax of the statement is given below. st.push(Element); Removing elements from the stack The pop method is used to remove an element from the stack. The pop operation will return the topmost element of the stack. The general syntax of the statement is given below st.pop(); Contains This method is used to see if an element is present in the Stack. Below is the general syntax of this statement. The statement will return true if the e...

c# collection part-1

Collection in c#. Collections are commonly similar to Array. It provides a much good way to work with a group of objects. We don't have to define the size of the collection as we had done in Array. we can add element and remove an element at any point in the collection. 1. Array List :  The ArrayList collection is similar to the Arrays data type in C#. The biggest difference is the dynamic nature of the array list collection. which means we don't have to set the size of the ArrayList before. 2. Stack :  The stack is a special case collection which represents a last in first out (LIFO) concept 3. Queues. The Queue is a special case collection which represents a first in first out concept. 4. HashTable : A hash table is a special collection that is used to store key-value items What is ArrayList in C#? The ArrayList collection is similar to the Arrays data type in C#. The biggest difference is the dynamic nature of the...

Serialization and deserialization

Image
 C# Serialization In C#, serialization is the process of converting the object into byte stream so that it can be saved to memory, file or database. The reverse process of serialization is called deserialization. C# SerializableAttribute To serialize the object, you need to apply  the SerializableAttribute  attribute to the type. If you don't apply  the SerializableAttribute  attribute to the type,  SerializationException  exception is thrown at runtime. C# Deserialization In C# programming, deserialization is the reverse process of serialization. It means you can read the object from the byte stream. Here, we are going to use  BinaryFormatter.Deserialize(stream)  method to deserialize the stream.