Profile Picture

NWatermark NImageFillStyle

Posted By Mike O'Ceirin 4 Years Ago
Author
Message
Nevron Support
Posted 4 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: 2 Weeks Ago
Posts: 3,054, Visits: 4,015
Hi Mike,

We're glad you managed to fix the problem. Yes, that was the original idea - to convert the path to a relative while the code is still on the aspx page. The chart itself will not try to convert paths from relative to absolute as the engine has to work on desktop as well so it does not have information on how to remap the path properly. Let us know if you meet any problems or have any questions.


Best Regards,
Nevron Support Team



Mike O'Ceirin
Posted 4 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 22, Visits: 184
My previous comment was a bit premature I didn't see what you were driving at. So the answer is take the relative and use this

string imagePath =
      MapPathSecure(this.AppRelativeTemplateSourceDirectory + "\\" + "WaterMark.gif");
to find the absolute. Note it is AppRelativeTemplateSourceDirectory not AppTemplateSourceDirectory.

Thanks for your help.


Mike O'Ceirin
Posted 4 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 22, Visits: 184
It works as per documentation and is an absolute path on my desktop. The image must be added to the solution and then published to the web. To do this you must have a relative path so your answer is back to front. The question is why wont this the watermark accept a relative path. I do not see how it can be used if it will not.

Nevron Support
Posted 4 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: 2 Weeks Ago
Posts: 3,054, Visits: 4,015

 Hi Mike,
You can try to convert the relative path to an absolute one using MapPathSecure:

this.MapPathSecure(this.TemplateSourceDirectory + "\\" + "someImage.gif");

for example, will give you the absolute path to "someImage.gif" located in the same directory as the current aspx page.

We hope this helps - let us know if you have any questions or meet any problems.



Best Regards,
Nevron Support Team



Mike O'Ceirin
Problem Posted 4 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 22, Visits: 184
Using your documentation I do have this working but there is a problem. It is working on my desktop in a visual studio web form. I cannot get away from giving it an absolute reference to the graphics *.gif file. In the default.aspx page there can be a relative reference to "~/WaterMark.gif" but trying to apply the same file to Fillstyle I am forced to use "E:\\Development\\Production\\Energy Chart\\Energy Chart\\WaterMark.gif". When I publish this to the web it produces a black rectangle? It certainly looks all wrong. Essentially the control will not recognise the gif file that is part of the solution.



Similar Topics


Reading This Topic