Rotate Image 360 degree using Jquery & CSS
Add animation effect without flash using jquery and css. Add following code of block under HEAD section and before BODY section.
<style>
.rotate{
-webkit-transition-duration: 0.4s;
-moz-transition-duration: 0.4s;
-o-transition-duration: 0.4s;
transition-duration: 0.4s;
-webkit-transition-property: -webkit-transform;
-moz-transition-property: -moz-transform;
-o-transition-property: -o-transform;
transition-property: transform;
overflow:hidden;
}
.rotate:hover
{
-webkit-transform:rotate(360deg);
-moz-transform:rotate(360deg);
-o-transform:rotate(360deg);
}
</style>
<body>
<img src=”Demo1.png” class=”rotate” />
</body>
<script type=”text/javascript” language=”javascript”>
$(document).ready(function(){
$(‘#trDateFilter’).hide();
$(‘#<%= cbDateFilter.ClientID %>’).click(function(){
if($(this).attr(‘checked’))
$(‘#trDateFilter’).show();
else
$(‘#trDateFilter’).hide();
});
});
</script>
<table>
<tr>
<asp:CheckBox ID=”cbDateFilter” runat=”server” Text=” Allow Date Filter” TextAlign=”Right” />
</tr>
<tr id=”trDateFilter”>
<td>Hello World..!!!</td>
</tr>
</table>
For more information please mail me nipulwordpress@live.in
To remove comma from string….
private string RemoveComma(string InputStr)
{
string strret = InputStr;
if (InputStr.Length – 1 == InputStr.LastIndexOf(“,”))
{
strret = InputStr.Substring(0, InputStr.Length – 1);
}
if (0 == InputStr.IndexOf(“,”))
{
strret = strret.Substring(1, strret.Length – 1);
}
return strret;
}
Happy Coding….!!!
To Create comma separated string…..
Declare 3 variable called min, max, and intString to hold value. [you can use string also]
int max = 10;
int min = 1;
int intString = “”;
for (int icnt = min; icnt <= max; icnt++)
{
if intString == “”)
{
intString = Convert.ToString(icnt);
}
else
{
intString = Convert.ToString(intString) + “,” + Convert.ToString(icnt);
}
}
Happy Coding…!!!
Sometime you required to erase all your data from application table but you don’t want to loos your precious data. there are two ways to take backup of data.
- first, To take backup of whole database, which contains .mdf file and log file.
- second, to take only one table backup in same database.
To take one table back in same database use following query.
SELECT * INTO <NEW TABLE NAME> FROM <OLD TABLE NAME>
NEW TABLE NAME – BACK UP TABLE NAME (I.E.NEW TABLE)
OLD TABLE NAME – NAME OF THE TABLE YOU WANT TO TAKE BACKUP
Add New Column in Table Use following Query:
ALTER TABLE <TABLENAME>
ADD <COLUMN NAME> <DATA TYPE> <NULL / NOT NULL>
Alter Table Column, Use following Query:
ALTER TABLE <TABLE NAME>
ALTER COLUMN <COLUMN NAME> <DATA TYPE>
HAPPY QUERYING…:)
To install or uninstall windows service (which was created using .NET Framework) using InstallUtil.exe. This tool can be found in the following path (use appropriate framework version number).
- Open Visual Studio Command Prompt
open start menu –> go to Microsoft Visual Studio 2005 –> Visual Studio Tools –> Visual Studio 2005 Command Prompt
- Install .NET Windows Service
InstallUtil.exe <Service exe path>
- Uninstall .NET Windows Service
InstallUtil.exe /u <Service exe path>
The Following Phrase Is Used For Checking The String With Case Sensitivity:
COLLATE sql_latin1_general_cp1_cs_as
and is used like the following:
Lets Take simple example to understand how it work: CASE SENSITIVE
UserName = admin Password = Admin
- SELECT * FROM tbUsers WHERE UserName=’Admin’ and Password=’Admin’ COLLATE sql_latin1_general_cp1_cs_as
- SELECT * FROM tbUsers WHERE UserName=’admin’ and Password=’Admin’ COLLATE sql_latin1_general_cp1_cs_as
It check the string and return you precise result.
The inverse of the above phrase is default and the following which is used the same way: CASE INSENSITIVE
- SELECT * FROM tbUsers WHERE UserName=’Admin’ and Password=’Admin’ COLLATE sql_latin1_general_cp1_ci_as
“Sometimes You Need To Be Faster In Taking Action Than The Decision Is Made.
Because If You Don’t Make A Choice, The Choice Will Make You.”
Overview
Here I will explain how to use WCF (windows communication foundation) service in web application using c#.net.
Creating simple application using WCF
Here I am going to do WCF sample to insert new record and display user details based on email for that first create table in your database like this
After that First open Visual Studio and click file —> Select New —> Website Under that select WCF Service and give name for WCF Service and click OK
Once you created application you will get default class files including Service.cs and IService.cs
Here IService.cs is an interface it does contain Service contracts and Data Contracts and Service.cs is a normal class inherited by IService where you can define all the methods and other stuff.
Now open IService.cs, check following namespaces and it not in file, add the following namespaces
After that write the following code in IService.cs file
After that open Service.cs class file and add the following namespaces
After that write the following code in Service.cs class file,
Now set the database connection string in web.config file because in above I am getting the connection string from web.config file
Our WCF service ready to use with basicHttpBinding. Now we can call this WCF Service method console applications
After completion of WCF service creations, publish or deploy your WCF Service in your system using F5.
After completion of deploy webservice now we can see how to use WCF Service in our Web application
Calling WCF Service using Web Application
To call WCF service we have many ways like using console app, windows app and web app.
Now I will explain how to use WCF service in web application.
Create new website from visual studio select New—> Website and give some name as you like.
After Creation Website now we need to add WCF reference to our web application for that right click on your web application and select Add Service Reference
Now one wizard will open in that give your WCF service link and click Go after add your service click OK button.
After completion of adding WCF Service first open Default.aspx page and write the following code
Now open Default.aspx.cs file and add following namespaces
After adding namespaces write the following code in codebehind
After completion of adding code check your endpoint connection for WCF Service reference that should be like this
Now everything is ready run your application.
Happy Coding..!!
Just a day ago I was working with database. I wanted to know the recently modified date of Store procedure and table. After searching on net I come up with solution. I found simple script to get list of store procedure modified in last 3 days.
Using this script you can retrieve created date and modified date.
SELECT name, modify_date, create_date,
FROM sys.objects
WHERE type = ‘P’
AND DATEDIFF(D,modify_date, GETDATE()) < 3
ORDER BY modify_date DESC
Type: whether it is table, store procedure, etc.
- S = System Table
- PK = Primary Key
- U = User Table
- P = Stored Procedure
- TF = Table Value Function
- FN = Scalar Function
- D = Default Constraint
- create_date = Date when it is created
- modify_date = Last modified date time of table, store procedure, etc.














