gridview stuff
protected void QtyTextBox_TextChanged(object sender, EventArgs e)
Posted in Labels: ASP.NET | at 9:35 AM
protected void QtyTextBox_TextChanged(object sender, EventArgs e)
Posted in Labels: ASP.NET | at 9:31 AM
Posted in Labels: ASP.NET | at 11:09 AM
ASP.NET maps HTTP requests to HttpHandlers. Each HttpHandler enables processing of individual HTTP URLs or groups of URL extensions within an application. HttpHandlers have the same functionality as ISAPI extensions with a much simpler programming model Ex An HttpHandler can be either synchronous or asynchronous. A synchronous handler does not return until it finishes processing the HTTP request for which it is called. An asynchronous handler usually launches a process that can be lengthy and returns before that process finishes
1.Default HttpHandler for all ASP.NET pages ->ASP.NET Page Handler (*.aspx)
2.Default HttpHandler for all ASP.NET service pages->ASP.NET Service Handler (*.asmx)
After writing and compiling the code to implement an HttpHandler you must register the handler using your application's Web.config file.
Posted in | at 11:03 AM
Caching is a technique of persisting the data in memory for immediate access to requesting program calls. This is considered as the best way to enhance the performance of the application.
Caching is of 3 types:
Output Caching - Caches the whole page.
Fragment Caching - Caches a part of the page
Data Caching - Caches the data
Posted in Labels: ASP.NET | at 10:58 AM
Multilingual website can be created using Globalization and Localization. Using Globalization we change the Currency Date Numbers etc to Language Specific Format. To change the string which is there in the label button etc to language specific string we use Localization. In Localization we have to create different Resource files for different languages. During this process we use some classes present in System.Resources/ System.Globalization System.Threading namespaces.
Posted in Labels: ASP.NET, Prepare for an Interview | at 10:56 AM
Coming to Session State In case of InProc Session Info will be stored inside the process where our
As we know for every process some default space will be allocated by OS.
application is running.
In case of StateServer Session Info will be stored using ASP.NET State Service.
In case of SQLServer Session info will be stored inside Database. Default DB
which will be created after running InstallSQLState Script is ASPState.
Session Management can be achieved in two ways
1)InProc
2)OutProc
OutProc is again two types
1)State Server
2)SQL Server
InProc
Adv.:
1) Faster as session resides in the same process as the application
2) No need to serialize the data
DisAdv.:
1) Will degrade the performance of the application if large chunk of data is stored
2) On restart of IIS all the Session info will be lost
State Server
Adv.:
1) Faster then SQL Server session management
2) Safer then InProc. As IIS restart
won't effect the session data
DisAdv.:
1) Data need to be serialized
2) On restart of ASP.NET State Service session info will be lost
3)Slower as compared to InProc
SQL Server
Adv.:
1) Reliable and Durable
2) IIS and ASP.NET State Service
restart won't effect the session data
3) Good place for storing large chunk of data
DisAdv.:
1) Data need to be serialized
2) Slower as compare to InProc and State Server
3)Need to purchase Licensed
version of SQL Serve
Posted in Labels: ASP.NET | at 9:57 PM
The lambda expression syntax in C# looks like this: The code begins with the set of parameters to the lambda expression. The => is the “goes to” or lambda operator. The remainder of the code is the expression itself. In this case, checking for the item in the list where CustomerId is 4. 2)... Customer foundCustomer = null; 3)... Customer foundCustomer = null;
foundCustomer = custList.FirstOrDefault(c =>
c.CustomerId == 4);
Debug.WriteLine(foundCustomer);
var query = from c in custList
where c.CustomerId == 4
select c;
foundCustomer = query.FirstOrDefault();
Debug.WriteLine(foundCustomer);
foreach (var c in custList)
{
if (c.CustomerId == 4)
{
foundCustomer = c;
break;
}
}
Debug.WriteLine(foundCustomer);
Posted in | at 10:22 PM
Regex syntax is : Regex re = new Regex("Regular Expression string",Regular Expression Options); Regular Expression Options are options that we can use along with regular expression like RegexOptions.IgnoreCase or RegexOptions.Compiled Here I am lisitng some Regular Expressions: [a-zA-Z]* - Regular Expression to allow only charactors [0-9]* - Regular Expression to allow only numbers [a-zA-Z0-9]* - Regular Expression to allow only alphanumeric charactors [0-9]*(\.[0-9]{1,2})? - Regular Expression to validate a float number with 1 or 2 decimal points
Posted in | at 8:15 AM
XAML itself is a larger language concept than WPF.
When represented as text, XAML files are XML files that generally have the .xaml extension. The files can be encoded by any XML encoding, but encoding as UTF-8 is typical.
The following example shows how you might create a button as part of a UI. This example is just intended to give you a flavor of how XAML represents common UI programming metaphors.
Posted in | at 6:35 AM
Creational Patterns Abstract Factory Creates an instance of several families of classes Builder Separates object construction from its representation Factory Method Creates an instance of several derived classes Prototype A fully initialized instance to be copied or cloned Singleton A class of which only a single instance can exist Structural Patterns Adapter Match interfaces of different classes Bridge Separates an object’s interface from its implementation Composite A tree structure of simple and composite objects Decorator Add responsibilities to objects dynamically Facade A single class that represents an entire subsystem Flyweight A fine-grained instance used for efficient sharing Proxy An object representing another object Behavioral Patterns Chain of Resp. A way of passing a request between a chain of objects Command Encapsulate a command request as an object Interpreter A way to include language elements in a program Iterator Sequentially access the elements of a collection Mediator Defines simplified communication between classes Memento Capture and restore an object's internal state Observer A way of notifying change to a number of classes State Alter an object's behavior when its state changes Strategy Encapsulates an algorithm inside a class Template Method Defer the exact steps of an algorithm to a subclass Visitor Defines a new operation to a class without change
Posted in | at 9:04 AM
FILESTREAM is a new feature introduced in SQL Server 2008 which provides an efficient storage and management option for BLOB data. Many applications that deal with BLOB data today stores them in the file system and stores the path to the file in the relational tables. Storing BLOB data in the file system is more efficient that storing them in the database. However, this brings up a few disadvantages as well. When the BLOB data is stored in the file system, it is hard to ensure transactional consistency between the file system data and relational data. Some applications store the BLOB data within the database to overcome the limitations mentioned earlier. This approach ensures transactional consistency between the relational data and BLOB data, but is very bad in terms of performance. FILESTREAM combines the benefits of both approaches mentioned above without the disadvantages we examined. FILESTREAM stores the BLOB data in the file system (thus takes advantage of the IO Streaming capabilities of NTFS) and ensures transactional consistency between the BLOB data in the file system and the relational data in the database.What is FILESTREAM?
Posted in | at 8:00 AM
Posted in Labels: ADVANCED TOPICS | at 7:42 AM
There are three basic classification of patterns Creational, Structural, Behavioral patterns.
Posted in Labels: SQL SERVER | at 8:35 AM
use Northwind declare @CategoryList varchar(1000) select ‘Results = ‘ + @CategoryList
select @CategoryList = coalesce(@CategoryList + ‘, ‘, ”) + CategoryName from Categories
Posted in Labels: ASP.NET | at 8:54 PM
Posted in Labels: SQL SERVER | at 8:52 PM
Ex :
Posted in Labels: ASP.NET | at 2:23 AM
BatchExeProduct batchExeProductObject = batchExeProducts.Find(delegate(BatchExeProduct ep) {return ep.ExecutiveCode == exeCode; });
Posted in Labels: ASP.NET | at 8:24 PM
So far I've tried the page directive: @ OutputCache Duration="1" Location="None" The Meta tags: <meta http-equiv="Expires" CONTENT="0"> <meta http-equiv="Cache-Control" CONTENT="no-cache"> <meta http-equiv="Pragma" CONTENT="no-cache"> And the code: Response.ExpiresAbsolute = DateTime.Now Response.Expires = -1441 Response.CacheControl = "no-cache" Response.AddHeader("Pragma", "no-cache") Response.AddHeader("Pragma", "no-store") Response.AddHeader("cache-control", "no-cache") Response.Cache.SetCacheability(HttpCacheability.NoCache) Response.Cache.SetNoServerCaching()
Posted in Labels: SQL SERVER | at 9:31 PM
WHERE convert (datetime, convert (varchar, datecol, 101), 101) = @yourdate
Copyright 2009
Happy Programming
Free WordPress Themes
designed by
EZwpthemes
Converted into Blogger Templates by Theme Craft | Falcon Hive