Server.MapPath() Through Image1_BeforePrint Event !
Server.MapPath() Through Image1_BeforePrint Event !
hi;
we can not retrieve our web application Path via Server.MapPath Function
the error message below
c:\Documents and Settings\User\Local Settings\Temp\xlrhh4iy.0.cs(29,13) : error CS0103: The name 'Server' does not exist in the current context.
we try this code
HttpContext.Current.Server.MapPath , but the error still occur .
how we can get the Path ?
thank you.
we can not retrieve our web application Path via Server.MapPath Function
the error message below
c:\Documents and Settings\User\Local Settings\Temp\xlrhh4iy.0.cs(29,13) : error CS0103: The name 'Server' does not exist in the current context.
we try this code
HttpContext.Current.Server.MapPath , but the error still occur .
how we can get the Path ?
thank you.
Server.MapPath() Through Image1_BeforePrint Event !
Hi
Report is being rendered not in the context of the Server request, so you need to obtain the path in advance before rendering.
Please show all the code.
You can call this method when a request is in progress so you will access to Server using
HttpContext.Current.Server
otherwise such things as Request, Response, Session and Server just inaccessible.
So make sure that the code is executed when a request is in progress, or you will be able to use the absolute path only.
Thank you.
Report is being rendered not in the context of the Server request, so you need to obtain the path in advance before rendering.
Please show all the code.
You can call this method when a request is in progress so you will access to Server using
HttpContext.Current.Server
otherwise such things as Request, Response, Session and Server just inaccessible.
So make sure that the code is executed when a request is in progress, or you will be able to use the absolute path only.
Thank you.
Server.MapPath() Through Image1_BeforePrint Event !
hi
this is our code
we currently using absolute Path
we have more than one customer in deferent server , for that we must not using absolute path .
thank you.
this is our code
Code: Select all
public void Image1_BeforePrint(object sender, System.EventArgs e)
{
string sPath=Server.MapPath("~//img");
string sFile=Notif.ManagementID+".jpg";
string sFullPath=sPath+sFile;
Image1.Image = Image.FromFile(sFullPath);;
}
Code: Select all
public void Image1_BeforePrint(object sender, System.EventArgs e)
{
string sFile=Notif.ManagementID+".jpg";
string sFullPath="d:\\www\\sahara\\hsystem\\hrmesystem.com\\www\\img\\"+sFile;
Image1.Image = Image.FromFile(sFullPath);;
}
thank you.
Server.MapPath() Through Image1_BeforePrint Event !
Hi
In that case you need to obtain the path before rendering of the report and to pass this path to the report as parameter.
Thank you.
In that case you need to obtain the path before rendering of the report and to pass this path to the report as parameter.
Thank you.
Server.MapPath() Through Image1_BeforePrint Event !
hi
we are using report variable to pass the path to our reports now .
it be usefull if you Add Variable "AbsolutePath" to Stimulsoft Report System Variables .
thank you.
we are using report variable to pass the path to our reports now .
it be usefull if you Add Variable "AbsolutePath" to Stimulsoft Report System Variables .
thank you.
Server.MapPath() Through Image1_BeforePrint Event !
Hi
We will think about adding of this feature.
Thank you.
We will think about adding of this feature.
Thank you.