Tuesday 22 January 2013

Gradient Text Effect or Button CSS Sample

Gradient Texture In Button or Text

If u guys are looking stuff like you want to gradient effect to a text or button .
then below is the simple code without much bugs.











<style>
h1 {
  font-size: 72px;
  background: -webkit-linear-gradient(#eee, #333);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.clr {
  font-size: 72px;
  background: -webkit-linear-gradient(#eee, #333);
  -webkit-background-clip:button;
  -webkit-text-fill-color: transparent;
}

.clrtwist {
  font-size: 72px;
  background: -webkit-linear-gradient(#333,#eee );
  -webkit-background-clip:button;
  -webkit-text-fill-color: transparent;
}</style>


<h1>vijay negi and the gradient!</h1>
    <input id="Button1" class="clr" type="button" value="button" />
        <input id="Button2" class="clrtwist" type="button" value="button" />

below one is the output



Monday 14 January 2013

SQL Transaction In C#,ASP.Net

 Transaction In C#,ASP.Net
 



SqlTransaction transaction;
con.Open();
transaction = con.BeginTransaction();
try
{
for (int i = 0; i < dtTemp.Rows.Count; i++)
{
SqlCommand cmd = new SqlCommand("insert command....", con,transaction);
cmd.ExecuteNonQuery();
}
transaction.Commit();
}

catch (Exception Error)
{


}

In above Part the only thing you have to care about is

SqlTransaction transaction;
con.Open();
transaction = con.BeginTransaction();
try {
  SqlCommand cmd = new SqlCommand("insert command....", con,transaction);
cmd.ExecuteNonQuery();
transaction.Commit();                    //whenever you call commit it means now finaly
                                                       //all execution will take place else rollback to catch
}
catch
{
  transaction.Rollback(); 

Print Only Grid View in ASP.net

ASP.net How to Print Only GridView < div id ="gridviewDiv" >   < asp:GridView ID ="gridViewToPri...