Hide your asp.net tag attribute from HTML output


You have an attribute and you want to hide this attribute in your HTML output . It useful when you dont want extra junk in your response then  use “meta:”

Example:

<asp:Label id=”myLabel” runat=”server”  text=”hello”  myattribute=”mello”  />

Output is

<span myattribute=”mello”>hello </span>

with using meta:

<asp:Label id=”myLabel” runat=”server”  text=”hello”  meta:myattribute=”mello”  />

output is

<span>hello</span>

May the code be with you…

Advertisements

About bpostaci
Escalation Engineer in Microsoft.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: