Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
SDK Documentation
General Reference
Reference
View Schema
T-Z
 UrlBaseName Element
Community Content
In this section
Statistics Annotations (0)
Collapse All/Expand All Collapse All
This page is specific to
The 2007 product release

Other versions are also available for the following:
UrlBaseName Element (View)

Renders the base name of a particular URL.

<UrlBaseName
  HTMLEncode = "TRUE" | "FALSE">
</UrlBaseName>
Attribute Description

HTMLEncode

Optional Boolean. TRUE to convert embedded characters so that they are displayed as text in the browser. In other words, characters that could be confused with HTML tags are converted to entities.

Numerous

Minimum: 0

Maximum: Unbounded

This element is particularly useful in document library views.

Remember that Collaborative Application Markup Language (CAML) is case-sensitive; note the lowercase "rl" in UrlBaseName.

The following example uses the UrlBaseName element to construct the absolute URL for a thumbnail image in a picture library.

Xml
<DisplayPattern>
   <HttpHost />
   <UrlDirName>
      <HTML>/</HTML>
      <LookupColumn URLEncodeAsURL="TRUE" Name="FileRef" />
   </UrlDirName>
   <HTML>/_t/</HTML>
   <UrlBaseName>
      <Field Name="EncodedAbsUrl" />
   </UrlBaseName>
   <HTML>_</HTML>
   <GetFileExtension>
      <Field Name="EncodedAbsUrl" />
   </GetFileExtension>
   <HTML>.jpg</HTML>
</DisplayPattern>

If the image file has a .jpg extension and is contained in a picture library on a subsite, the example creates a URL in the following form:

http://Server_Name/Subsite_Name/Library_Name/_t/File_Base_Name/_jpg.jpg

Other Resources

URL
UrlDirName

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker