Saturday, March 24, 2012
Strip Visual Studio META Tags Is Safe?
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name=vs_defaultClientScript content="JavaScript">
<meta name=vs_targetSchema
content="http://schemas.microsoft.com/intellisense/ie5"
And I am wondering if it is safe to remove them after I compile the
ASP.NET application, or if it is possible to have VS.NET 2003 not put
them in my .aspx pages in the first place.
Thanks.meta tags are not rendered, they are only used to provide information to the
server and the client. They can be deleted at will, if you don't need them.
Removing the target schema and client script meta tags will remove some
intellisense features on the development environment, but nothing contained
in a meta tag will affect the rendering of the page itself.
--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--
"localhost" <primpilus@.cohort.ces> wrote in message
news:3ubf20p4i2t4k30u4je2hjmv5atl7g4e4v@.4ax.com...
>I have these in all of my pages:
> <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
> <meta name="CODE_LANGUAGE" Content="C#">
> <meta name=vs_defaultClientScript content="JavaScript">
> <meta name=vs_targetSchema
> content="http://schemas.microsoft.com/intellisense/ie5">
> And I am wondering if it is safe to remove them after I compile the
> ASP.NET application, or if it is possible to have VS.NET 2003 not put
> them in my .aspx pages in the first place.
> Thanks.
Hi Localhost,
Thanks for posting in the community!
From your description, you are wondering some infos on the <meta> tags
VS.NET has automatically put in the ASP.NET page when page is created and
whether it'll cause any problem if remove them, yes?
If there is anything I misunderstood, please feel free to let me know.
As for this problem, I agree to Chris's opinion, the meta tags commonly
tells web browsers basic host information about a site or the tools that
created the source files of the site. This information is also used by
search engines. For detailed info on the META tags, you may view the
following web references:
#META - Metadata
http://www.htmlhelp.com/reference/html40/head/meta.html
#HTML Tutorial -> META - Metadata
http://www.style-sheets.com/html_tutorial/head/meta.asp
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Tuesday, March 13, 2012
Stuck Passing a DataList to a User Component
Stuck on this one: I have User Component that is the main content table on my web page. It simply serves as a table with decorative border and header. All content (mostly text) is placed inside this User Component on each of my web pages by accessing the UserControl's properties.
However, now I have a web page with a DataList control, and would love to place this control inside my UserControl, but am stuck.
In my previous pages, I access the UserControl's strContent property that sets the cell.text property to the text coming from my dbase, but once again, is it somehow possible to put my DataList inside this Cell or something similar.
Thanks again,
JohnHad the same problem, here's my solution:
<DefaultProperty("Title"), ParseChildrenAttribute(False), ToolboxData("<{0}:WindowPanel runat=server></{0}:WindowPanel>")> Public Class WindowPanel
Inherits System.Web.UI.WebControls.WebControlDim _title As String
Dim _cssclass As String
Dim _width As System.Web.UI.WebControls.Unit<Bindable(True), Category("Appearance"), DefaultValue("")> Property [Title]() As String
Get
Return _title
End GetSet(ByVal Value As String)
_title = Value
End Set
End Property<Bindable(True), Category("Appearance"), DefaultValue("")> Overrides Property [CSSClass]() As String
Get
Return _cssclass
End GetSet(ByVal Value As String)
_cssclass = Value
End Set
End Property
<Bindable(True), Category("Appearance"), DefaultValue("")> Overrides Property [Width]() As System.Web.UI.WebControls.Unit
Get
Return _width
End GetSet(ByVal Value As System.Web.UI.WebControls.Unit)
_width = Value
End Set
End PropertyProtected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter)
output.Write("<table border=""0"" cellspacing=""0"" cellpadding=""0"" style=""width:" & _width.ToString & ";border: 1px solid;border-collapse:collapse;"" class=""" & _cssclass & """>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td style=""padding: 3px; border: 1px solid;"" class=""" & _cssclass & """>" & _title & "</td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td style=""padding: 3px;"">" & vbCrLf)
Me.RenderContents(output)
output.Write(" </td>" & vbCrLf & _
" </tr>" & vbCrLf & _
"</table>")
End SubEnd Class
The important thing to remember is the "ParseChildrenAttribute(False)" Statement to be able to include other controls within this custom control.