usually most developers use J Query/CSS to toggle the visibility of webpage elements. for example a DIV tag, however even it is not visible in a webpage, if you examine the source code you will be able to see the div tag in source code. because it is already being rendered by server. however in asp.net we can use following code to do the same trick.
Page.FindControl("YourDivId").Visible = false;
Advantage of using this way is,
- Easy to use.
- Server do not render the div tag. completely invisible, even to java script web crawlers
- Most of all its pure .Net. no need to write too many lines of code. simple yet powerful