Absolute or Relative path?

ASP.NET

    Next

  • 1. Changing the user account of aspnet_wp, stops the programme from r
    have you added that account to debuggerusers group? " XXXX@XXXXX.COM " wrote: > I've changed bit in the processmodel section in the machine.config > file, so that the aspnet_wp process runs under this new account (See > below) I've run IISREST and now visual studio wouldn't allow me to run > the programme?? Is says something about not being able to debug. > (Note: The user account is the same accout that I log into my > workstation as) > > Code snippet > userName="DOMAIN\user" password="password" > >
  • 2. Update unable to find TableMapping .. or Datatable
    Hi all, I have the code below. This is doing what I want, but always has the following exception: Update unable to find TableMapping ['mytable'] or Datatable 'mytable' The code I'm using is: Try Dim aDispuesto As Single, aDisponible As Single aDispuesto = Session("dispuesto") + APagar aDisponible = Session("disponible") - APagar ' conexi con tbEmprendedor Dim oDSemp As Data.DataSet = New DataSet("DatasetEmprendedor") ' consulta de actualizaci con nuevos valores Dim SQLemp As String SQLemp = "UPDATE tbEmprendedor" & _ " SET Dispuesto = " & aDispuesto & ", Disponible = " & aDisponible & _ " WHERE id_Emprendedor = " _ & CType(idEmp, Integer) & ";" Dim oDAemp As New OleDb.OleDbDataAdapter(SQLemp, oCnn1) oDAemp.Fill(oDSemp) oDAemp.UpdateCommand = New OleDb.OleDbCommand oDAemp.UpdateCommand.CommandText = SQLemp oDAemp.UpdateCommand.Connection = oCnn1 ' Actualizar oDAemp.Update(oDSemp, "tbEmprendedor") oCnn1.Close() Catch ex As Exception lblMensaje.Text = lblMensaje.Text & "<br>Excepcion tbEmprendedor: {0}" & ex.Message End Try Thanks for helping me.
  • 3. Hide Java Script
    Hello all, I have an asp.net web application with tons of Java script files. I would like to protect the Java Script somehow so it can't be seen by a remote user. I found several 3rd party solutions, but I thought I remember that there was a way to 'compile' java script and use that instead of the actual script? The problem I have with 3rd party solutions is two-fold: 1) I'm cheap 2) I'm going to install the app on a customer's server for use by their customers. I don't want them (my customer) or their customers to have access to the java script files. I think a 3rd party solution would work fine for me on my server, but I can't really give the customer the app and the 3rd party protection thingy and say: install this so you can't see my code (because they might not!). Anyway, I'm open to any solution. Thanks kpg
  • 4. First ASP.Net
    Hi , I write a Hello.Aspx in Notepad. And save in C:\ASPNET folder. What will be the configuration change to run the Hello.aspx on my local machine(localhost) ? Thanks,

Absolute or Relative path?

Postby matthias s. » Sat, 09 Jul 2005 05:44:46 GMT

Hi there,

Say I have a domain called www.mydomain.com. In my virtual directory I've
created subfolders called 'sub1' and 'sub2'. Now in 'sub1 resides the file
'file1.aspx' and in 'sub2' resides the image 'img1.jpg'. When specifying a
relative URL (to the image) in the file1.aspx I'd go like:

<img src="../sub2/img1.jpg" />

and should be fine with it. My problem is, I have a couple of web-controls
within a 'controls' subdirectory which I use throughout the site. The aspx
pages are located in different nested subdirectories. One of the controls
which is hosted on almost every page links to an image. Due to the different
'levels' at which the aspx page might be, the image is not displayed
sometimes.

I can't use absolute path values since server names might vary. There are
dusty and vague memories of specifying relative path like this

<img src="/sub2/img1.jpg" />
or
<img src="~/sub2/img1.jpg" />

but neither yields the desired results. How do you do this?

Thanks in advance!

/matthias



Similar Threads:

1.Absolute and relative paths in applicaiton

2.How to chage Absolute url to relative url ,and relative url to absolute url

How to chage Absolute url to relative url ,and relative 
url to absolute url

3.why relative hint path but absolute reference path

I have a vs.net 2002 solution that contains a number of projects
All projects are created in folders under the solution folder.
The idea here is that this entire solution should be 'moveable' ie. copied
to and useable from a new directory or computer.
And it almost is.

One project makes reference to an existing .net dll that also exists in a
folder under the solution folder.
The project file shows a relative hint path to the dll ie
"..\..\dllFolder\my.dll"
If I move the solution to a new folder and the open solution from the new
location, the dll can no longer be found.  if i restore the original
solution folder, the dll is once again found.  so obviously, although the
project file includes a relative hint path, vs.net is in fact looking for
the dll at an absolute location.  This is causing headaches as this solution
cannot be 'passed around'  without re-adding the reference to this dll.

is there some setting somewhere to get the relative path used ?
there does not seem to be any problem using relative project references - is
there some trick using a dummy project to get this to work ?

gerry



4.Get machine name path from relative or absolute path

Hello, is it possible in C#.Net to get a path to a file in the form
"\\Spain\Madrid\readme.txt" from a relative path i.e "readme.txt" or
from a absolute path in the following form "C:\Madrid\readme.txt" where
"Spain" is the name of the machine that the file is on? Thanks in
advance.

5.absolute path to relative path conversion

6. why relative hint path but absolute reference path

7. Relative & absolute path question (JavaScript, mostly)

8. User controls --> Relative/Absolute Paths



Return to ASP.NET

 

Who is online

Users browsing this forum: No registered users and 42 guest