Highlight Gridview Row - mouse over

0 comments

well, i aint gonna say much, cause the question is obvious, so this is how you do it: just add a a CssClass to your gridview:

CssClass="grid-view"


then add the css:


.grid-view th{background-color: #f4f4f4;padding:5px;border:1px solid #EFEFEF;}
.grid-view th:hover{background-color: #f4f4f4;border:1px solid #EFEFEF;}
.grid-view tr{background-color: #FFFFFF;border:1px solid #EFEFEF;}
.grid-view tr:hover{background-color: #f4f4f4;}
.grid-view td{padding-left:5px;padding-right:5px;border:1px solid #EFEFEF;}

Expandable Image Button (Rounded Corner)

0 comments

Okay, so this is a hot topic, and so far i was unable to get a 100% working solution. after much struggle.. here is the code to make your buttons look pretty first you need jQuery (to do some wrapping) you can get the latest version here.


the above will automatically wrap all your buttons with two spans then you will need some css:
input[type="submit"]{ color:White;}
.input-button { display: inline-block; height: 23px; vertical-align: middle; *vertical-align: middle; /* only for IE */ background: white url('BlueRight.png') no-repeat right top; cursor: pointer;}
.input-button span {display: block; _display: inline-block; /* only for IE6 */ line-height: 23px; padding: 0 20px; height: 100%; color: black; background: url('BlueLeft.png') no-repeat left top; overflow: hidden; position: relative;}
.input-button:Hover {display: inline-block; height: 23px; vertical-align: middle; *vertical-align: middle; /* only for IE */ background: white url('GreenRight.png') no-repeat right top; cursor: pointer;}
.input-button span:Hover { display: block; _display: inline-block; /* only for IE6 */ line-height: 23px; padding: 0 20px; height: 100%; color: black; background: url('GreenLeft.png') no-repeat left top; overflow: hidden;position: relative;}
.input-button input { color:White; position: absolute; top: 0; left: 0; height: 100%; width: 100%; cursor: pointer; border:0px solid Transparent !important; background-color:Transparent;}
.input-button:link, .input-button:visited, .input-button:hover, .input-button:active { color: White; text-decoration: none;}
Please make sure to point your images to the right location. below are the images i use: I have tested this in firefox, IE7, IE8 and Chrome Enjoy!

MVC DropDownList

1 comments

If you need to create a DropDownList in your MVC Application, simply follow the following Steps:

Step 1
Add the following code to your Controller
ArrayList title = new ArrayList
{
      new {Value = "Mr", Name = "Mr."},
      new {Value = "Mrs", Name = "Mrs."},
      new {Value = "Ms", Name = "Ms."},
      new {Value = "Miss", Name = "Miss."},
      new {Value = "Prof", Name = "Prof."},
      new {Value = "Dr", Name = "Dr."}
};

ViewData["Title"] = new SelectList(title, "Value", "Name", GetValue("Title", YOURSELECTEDVALUE));
Step 2
Add the Following to your "View" Page
<%=Html.DropDownList(null, "Title", new { Class = "yourClass" })%>

JavaScript Select All / None checkboxes

0 comments

To select and un-select checkboxes simply add the following code in your head tags:


Below is an example of the checkbox code







Disable Copy Command and Right Click

1 comments

The following code will disable Ctrl-C:



<body onkeydown="disableControlC(event);">
You could also do the following to disable your context menus
<meta http-equiv="imagetoolbar" content="no"/>
<body oncontextmenu="return (false);">

Flash IE7 Fix

1 comments

So most of us noticed how IE7 handles an embeded Flash object.

It's that irritating "Click To Activate" message.
Here is a a few steps on how to overcome that:
Step 1
Download the Following File: flashobject.js
Step 2
Add your Flash Object:

This text is replaced by the Flash movie.
Parameter definitions:
SWF: swf file path
ID: The ID of your object
WIDTH: ... width
HEIGHT: ... height
VERSION: supported player version
BACKGROUND COLOR: the hex value of your Flash Movie's background color.
To get more info visit: deconcept

Adding flash to a web page

0 comments

Adding flash to aweb page can be done with the following lines of code: