Friday, 12 October 2012

ASP.NET Ajax framework failed to load client side framework

ASP.NET Ajax framework failed to load client side framework

 I face below errors at a same time.

ASP.Net Ajax framework failed to load client side framework
Microsoft JScript runtime error: 'Sys' is undefined
and Telerik is undefined.

If somebody else also got this error, below is what i did to resolve this error.
I had below in my web.config 

<add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd"
                 type="Telerik.Web.UI.WebResource" verb="*"
                 preCondition="integratedMode,runtimeVersionv2.0"/>  


I removed runtimeversion2.0 and it worked well.

Just to update you that it was working well in IIS6.0 but error occured when i deploy it on IIS7.0

So the above entry was in <system.webServer> tag, which is basically for iis7 specific.

It took my lot of time to resolve this issue.

 

Wednesday, 3 October 2012

Basic LINQ Query





LINQ Queries



Basic LINQ Query Operators

From (Specify the Data Source)

In LINQ query first step is to specify the data source that you want to query.
Dim custdata = from  cust in customers
Filtering
Filtering the data. Query returns only those elements for which the expression is true.
Dim custdata = from  cust in customers                                            Where cust.city= “Delhi”
Ordering
Order by clause return the data in order which we asked for
Dim custdata = from  cust in customers                                            Where cust.city= “Delhi”
Order by cust.name ascending
Selecting
Select clause is used for specify the fields you want to incluse In the result.
Dim custdata = from  cust in customers                                            Where cust.city= “Delhi”
Order by cust.name ascending
Select cust.namr



LINQ Data Providers



LINQ Data Providers

The Following lists the core data types LINQ supports in the .Net Framework

Provider
Description
LINQ to Objects
The LINQ to Objects provider enables you to query in-memory collections and arrays. If an object supports either the IEnumerable or IEnumerable(Of T) interface, the LINQ to Objects provider enables you to query it.
You can enable the LINQ to Objects provider by importing the System.Linq namespace, which is imported by default for all Visual Basic projects.
LINQ to SQL
The LINQ to SQL provider enables you to query and modify data in a SQL Server database. This makes it easy to map the object model for an application to the tables and objects in a database.
Visual Basic makes it easier to work with LINQ to SQL by including the Object Relational Designer (O/R Designer). This designer is used to create an object model in an application that maps to objects in a database. The O/R Designer also provides functionality to map stored procedures and functions to the DataContext object, which manages communication with the database and stores state for optimistic concurrency checks.
System.data.Linq
LINQ to XML
The LINQ to XML provider enables you to query and modify XML. You can modify in-memory XML, or you can load XML from and save XML to a file.
LINQ to Dataset
The LINQ to Dataset provider enables you to query and update data in an ADO.NET dataset. You can add the power of LINQ to applications that use datasets in order to simplify and extend your capabilities for querying, aggregating, and updating the data in your dataset.
LINQ to Entities
This LINQ to Entities allows you to write queries against data modeled by using the Entity Framework.