Showing posts with label Html. Show all posts
Showing posts with label Html. Show all posts

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



Friday, 10 February 2012

Javascript Value To Asp.net Page

Accessing HTML control/Javascript Function Value In Asp.net Page 

Some time situation comes where some Javascript effect/jquery or css make work on html control but not in .net control.
then what to do?Here is the solution to make html control interaction with asp.net control.So that there value can easily access by your asp.net control.



In Normal Cases

Just Make Input Text(html control) runat="server".

<input id="Text1"  runat="server" type="text" />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
   

Now If You Want To transffer Text1 Value To Label1 Just Do This In Your C# Code(In Any Event)


Label1.Text =  Text1.Value;



But SomeTime We Have Fuctions Where We Have Value In Cloud And We Have To Catch Then On Fly.
------------------------------------------------------------------------------------------------------------------
So Here We Start...


Let say you've a html textbox with name txtbox and it has some value...so first thing is we have to save its value to a variable name it C.So that we are sure that the txtbox value is now in a variable and we can pass it to any one.

Next thing is ASP.NET has a control name hiddenControl ,just drag it in your design Page(Because Its Behave As A Mediator Between Html & .Net Control Easily) And finaly.just put that C value in hiddencontrol1



html Control----->var C----------->HiddenControl----->Now Value Is In Your ASP Page!





In HTML

For An Instance Lets Say You Are Firing An Client Side Event(javascript function) Like Below....

<html>
<script>
function yourown()
{
var C=document.getElementById("txtbox").value;
document.getElementById('<%=HiddenField1.ClientID%>').value=C;
return true;
}
 </script>
</html>




In C#

Now Understand The Below Code Where We Are Storing final Value Under HiddenField1 To A string In C# Page

String S=HiddenField1.Value;
Response.Write(S);//Show On Screen
//OR
Label1.Text=S; //Show On Label






Saturday, 10 December 2011

Direct Jump On Line Number In HTML

Jump On Line Number In Html By Just clicking Any link,button or Text
<ul>
<li>
<a linkindex="249" href="#Obj">observer pattern:go to line no 249</a>
</li>
</ul>

Print Only Grid View in ASP.net

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