if the purpose is to show or hide a part of the page then you can do the following things
1) wrap it in markup with
<% if(somecondition) { %>
some html
<% } %>
2) Wrap the parts in a Panel control and in codebehind use the if statement to set the Visible property of the Panel.
More Related Contents:
- Avoid web.config inheritance in child web application using inheritInChildApplications
- How to set correct file permissions for ASP.NET on IIS
- How should I perform a long-running task in ASP.NET 4?
- Chrome localhost cookie not being set
- IIS7 Overrides customErrors when setting Response.StatusCode?
- Can we use multiple forms in a web page?
- X-Frame-Options Allow-From multiple domains
- Escape quote in web.config connection string
- Wcf-The maximum message size quota for incoming messages (65536) has been exceeded?
- The transaction manager has disabled its support for remote/network transactions
- How can I get a MAC address from an HTTP request?
- Any way to clear/flush/remove OutputCache?
- IFrame: This content cannot be displayed in a frame
- Monitor data changes in SQL Azure
- Using a variable from a VBScript in a ASP.Net website
- User Authentication in ASP.NET Web API
- Adding System.Web.Script reference in class library
- What is the proper way to send an HTTP 404 response from an ASP.NET MVC action?
- How to enable Auto Logon User Authentication for Google Chrome
- Select multiple value in DropDownList using ASP.NET and C#
- Specify more than one directory in Web.Config’s Location Path element
- Web authentication state – Session vs Cookie?
- Why are .docx files being corrupted when downloading from an ASP.NET page?
- Gridview row editing – dynamic binding to a DropDownList
- Columns of two related database tables in one ASP.NET GridView with EntityDataSource
- LINQ to SQL Web Application Best Practices
- asp.net 4.0 web forms routing – default/wildcard route
- Cross Origin Resource Sharing for c# WCF Restful web service hosted as Windows service
- Singleton Per Call Context (Web Request) in Unity
- Response.Redirect which POSTs data to another URL in ASP.NET