hi friends.. In asp.net , i want to show the gridview when keypress in textbox.. how to do in javascript..

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>

sir... i want to set visible=true for gridview when i keypress in textbox.. in asp.net

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

add this to the design view of gridview

Style="visibility: hidden"

if so then its better u mark the thread as solved so that others wont view this thread