-
May 22nd, 2007, 08:27 AM
#1
Commenting
i know it looks it is a silly question, but really i'm struggling to comment my ASP.net codes (in HTML mode) {not the code-behind syntax)...
Since it is "Runat = Server" is used, commenting using "<!-- -->" has no effect..
any idea, how to comment the ASP HTML code...
Thanks in adv..
Sample code i need to commant is below:
Code:
<asp:DataGrid id="DataGrid1" style="Z-INDEX: 102; LEFT: 16px; POSITION: absolute; TOP: 56px" runat="server"
Height="40px" Width="328px"></asp:DataGrid>
or
<%# (Container.DataItem)%>
Last edited by bharadwajrv; May 22nd, 2007 at 08:29 AM.
Venu Bharadwaj
"Dream it. U can do it!"
-
May 22nd, 2007, 08:44 AM
#2
Re: Commenting
I dont follow you...
Anything inside "<!-- -->" in your aspx/ascx files will be treated as a comment......
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
May 22nd, 2007, 09:02 AM
#3
Re: Commenting
Actually these comments won't work in ASPX files. They never did work in Classic ASP also. Although you comment, they actually get rendered on the client side.
The proper way of commenting would be
Code:
<%--<asp:DataGrid id="DataGrid1" style="Z-INDEX: 102; LEFT: 16px; POSITION: absolute; TOP: 56px" runat="server"
Height="40px" Width="328px"></asp:DataGrid>--%>
This type of commenting is known as Server Side comments.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|