txtbox.attributes.add("onkeypress","javascript:return gridvisible();");

<script>
function gridvisible()
{
var gd=document.getelementbyid("u r gridview id");
gd.style.visibility="visible";
//in case u want to  the gridview to be not visible use this
gd.style.visibility="hidden";

}

</script>
txtbox.attributes.add("onkeypress","javascript:return gridvisible();");

<script>
function gridvisible()
{
var gd=document.getelementbyid("u r gridview id");
gd.style.visibility="visible";
//in case u want to  the gridview to be not visible use this
gd.style.visibility="hidden";

}

</script>

Thank u Sir.. But i hv one problem. when my page load, control should be visible=false.. when i keypress in textbox, it'll be visible=true..
i hv set visible=false in design.. then used that javascript code.. it s not work out.. if possible, can u solve my problem

This question has already been answered. Start a new discussion instead.