Tuesday, 12 March 2013
Simple login form example in asp.net Check Username and Password availability in database
Introduction:
In this post I will explain how to implement simple login form
using asp.net and I will explain how to Check Username and
Password Exists in database using asp.net .
Monday, 11 March 2013
mouse over in jquerry
<!DOCTYPE html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("p").mouseover(function(){
$("p").css("background-color","yellow");
});
$("p").mouseout(function(){
$("p").css("background-color","lightgray");
});
});
</script>
</head>
<body>
<p>Move the mouse pointer over this paragraph.</p>
</body>
</html>
What is Constructor and Purpose of Constructor in Class
When a class or struct is created, its constructor is called. Constructors have the same name as the class or struct, and they usually initialize the data members of the new object.
In the following example, a class named Taxi is defined by using a simple constructor. This class is then instantiated with the new operator. The Taxi constructor is invoked by the new operator immediately after memory is allocated for the new object.
Multiple Toggless in same page
Description:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="Scripts/jquery.min.1.3.2.js" type="text/javascript"></script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="Scripts/jquery.min.1.3.2.js" type="text/javascript"></script>
Sunday, 10 March 2013
Exception Handling in SQL Server Stored Procedure with TRY CATCH
Introduction:
Here I will explain how to handle exceptions in SQL Server or exception handling in SQL Server for stored procedure by using try catch or error handling in SQL Server.
Description:
In previous articles I explained Pass table as parameter to stored procedure in SQL Server, Difference between joins in SQL Server, Convert rows to columns in SQL Server, SQL Query to get duplicate records count and many articles relating to SQL Server, jQuery, JavaScript. Now I will explain how to handle exceptions in SQL Server.
To handle exceptions in SQL Server we can use TRY…… CATCH blocks. To use TRY…… CATCH blocks in stored procedure we need to write the query like as shown below
Tuesday, 5 March 2013
.NET 4 New GAC Locations/GacUtil
This is what I know, let me know if you know otherwise. There are now 2 distinct GAC locations that you have to manage as of the .NET 4 Framework release.
The GAC was split into two, one for each CLR (2.0, 3.5 AND 4.0). The CLR version used for both .NET Framework 2.0 and .NET Framework 3.5 is CLR 2.0. To avoid issues between CLR 2.0 and CLR 4.0 , the GAC is now split into private GAC’s for each runtime. The main change is that CLR v2.0 applications now cannot see CLR v4.0 assemblies in the GAC.
In previous .NET versions, when I installed a .NET assembly into the GAC (using gacutil.exe or even drag and drop to the c:\windows\assembly directory), I could find it in the ‘C:\Windows\assembly’ path.
With .NET 4.0, GAC is now located in the 'C:\Windows\Microsoft.NET\assembly’ path.
In order to install a dll to the .NET 4 GAC it is necessary to use the gacutil found C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\GacUtil.exe In addition, you can no longer use the drag n' drop (in reality the drag n' drop really executed the gacutil via a windows explorer extension).
After you use the gacutil.exe -i {path to dll} you can view that it is indeed in the gac via gacutil -l (which will list all dlls in the gac). I used this command and piped the results to a text file via > out.txt which made it easier to find the recently added component.
How to Install MVC4 application in VisualStudio.net 2010
HOW TO Install MVC4:
While you start MVC34Application you Must Install " VS 2010 With Sp1 " by using this Following link You can Directly install the MVC3.
http://www.asp.net/mvc
It consisting of MVC3 And MVC4 Tools Updated
MVC 4 using Entity Framework
This article is a brief introduction to the use of unit testing in MVC 4 using Entity Framework with Repository Pattern.
What is Unit testing: The basic purpose of unit testing is to test the methods of business logic of ASP.NET or MVC projects.
What is Entity Framework
Entity Framework (EF) is an object-relational mapper that enables .NET developers to work with relational data using domain-specific objects. It eliminates the need for most of the data-access code that developers usually need to write. For more see: http://msdn.microsoft.com/en-us/data/ef.aspx
DropDown Cascading in MVC4 Using Entity Framework
Getting Started
Create a new Project. Open Visual Studio 2012.
Go to "File" => "New" => "Project...".
Select "Web" in installed templates.
Select "ASP.NET MVC 4 Web Application".
Enter the Name and choose the location.
Click "OK".
I would recommend reading this article first to learn about Entity Framework: http://aspdotnetbylakshmi.blogspot.in/2013/03/mvc-4-using-entity-framework.html
Once you configure Entity Framework your window will look like this:
SELECT, INSERT, UPDATE and DELETE Using LINQ to SQL
Language-INtegrated Query (LINQ) is a Microsoft .NET Framework component that adds native data querying capabilities to .NET languages. In other words LINQ has the power of querying on any source of data (Collection of objects, database tables or XML Files). We can easily retrieve data from any object that implements the IEnumerable<T> interface and any provider that implements the IQueryable<T> interface.
Microsoft basically divides LINQ into the following three areas:
LINQ to Object : Queries performed against in-memory data
LINQ to ADO.Net
LINQ to SQL (formerly DLinq) : Queries performed against the relation database; only Microsoft SQL Server is supported.
LINQ to DataSet : Supports queries by using ADO.NET data sets and data tables.
LINQ to Entities : Microsoft ORM solution
LINQ to XML (formerly XLinq) : Queries performed against the XML source.
Subscribe to:
Comments (Atom)


