Server.MapPath : Server class « Development « ASP.NET Tutorial

Home
ASP.NET Tutorial
1.ASP.Net Instroduction
2.Language Basics
3.ASP.net Controls
4.HTML Controls
5.Page Lifecycle
6.Response
7.Collections
8.Validation
9.Development
10.File Directory
11.Sessions
12.Cookie
13.Cache
14.Custom Controls
15.Profile
16.Configuration
17.LINQ
18.ADO.net Database
19.Data Binding
20.Ajax
21.Authentication Authorization
22.I18N
23.Mobile
24.WebPart
25.XML
ASP.NET Tutorial » Development » Server class 




<%@ Page Language="VB" %>
<html>
<head>
   <title>Determining a Physical Path</title>
   <script runat="server">

      Sub MapPath()

         Dim RelativePath As String
         Dim PhysicalPath As String

         RelativePath = "HtmlEncode.aspx"
         PhysicalPath = Server.MapPath(RelativePath)
         Response.Write(PhysicalPath)

      End Sub

   </script>
</head>
<body>

<% MapPath %>

</body>
</html>














9.39.Server class
9.39.1.Use Server.HtmlEncode to encode HTML tags (C#)
9.39.2.Use Server.Transfer to transfer action to another aspx file (C#)
9.39.3.Server.UrlEncode
9.39.4.Forward the user to the information page, with the query string data (#)
9.39.5.Use Server.MapPath() to load the file in the current directory (VB.net)
9.39.6.Demonstration of Page_Error Handler
9.39.7.text generated by Execute can be embedded in the main response or cached in a writer object
9.39.8.Server.Execute
9.39.9.Server.GetLastError()
9.39.10.Server.HtmlDecode
9.39.11.Server.HtmlEncode
9.39.12.Server.MachineName
9.39.13.Server.MapPath
9.39.14.Server.ScriptTimeout
9.39.15.Server.Transfer
9.39.16.Server.UrlDecode
9.39.17.Server.UrlPathEncode
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.