Tuesday, January 25, 2011

Meazure




What are the dimensions of that image? How big is this window? Does this layout fit on an NTSC display? What color are these pixels? What does this icon look like close up? How can I capture an arbitrary portion of the screen? These are just a few of the questions that kept coming up as I developed applications and web pages. Various tools are available to answer some of these questions but I could not find any that answered them all or that had a usable interface. So I created Meazure, a program that measures, magnifies and captures the screen by providing a battery of features in a cohesive user interface. Even better, Meazure is free!

Saturday, January 15, 2011

Simple way to return pdf from an Action

Is it very easy to return a pdf file from server in Asp.net MVC:


// controller(Basket) code =

public ActionResult GetTradingCondition()
{
HttpContext.Response.AddHeader("content-disposition", " inline; filename=" + "TradingCondition.pdf");
return File(Server.MapPath("~/Content/Files/TradingCondition.pdf"), "application/pdf","TradingCondition.pdf");
}


// view code
<% =Html.ActionLink("Trading_conditions", "GetTradingCondition", "Basket",new{@target="_blank"})%>



=========================================

Thursday, January 13, 2011

numeric input validation

Most of the times we need to validate the input box. Using the following java script we can take only numeric value as an input


$(document).ready(function () {

    $(".number").live("keyup", function () {
        this.value = this.value.replace(/[^0-9\.]/g, '');
    });})

we can use the script following ways:

<input  ="" class="number" type="text" />

5 Strategies for Getting More Work Done in Less Time

Summary.    You’ve got more to do than could possibly get done with your current work style. You’ve prioritized. You’ve planned. You’ve dele...