I am working on a web framework. I have some web forms that are embedded soruce. I set one of this web form as a startup page for other web project that has my framework as a reference. I use some ifragistics controls in my embedded pages and this controls add link some css to page in runtime.
My StyleSetPath is : "~/appResource ";
I can show my images url as below:
"img src='../../appResource/Office2007Silver/images/ig_treePlus.gif'". but I can not affect correctly some urls such as
<link href='../../app_resource/datenwerk.webforms.dll/datenwerk.webforms/appresource/office2007silver/ig_tree.css' type='text/css' rel='stylesheet' />
I want this to be shown as "<link href='../../appresource/office2007silver/ig_tree.css' type='text/css' rel='stylesheet' />
How can I do this?
Hello,
Unfortunately I can`t understand what you want to do? Where you want to add this link? You can use the tag CustomerRules and use the css there is not suitable property. If that doesn't help, please try to describe you case in detail.
Thanks.
I use infragistics controls in a web application.
And all my pages and usercontrols that includes infragistics controls are embedded source.
When I call this pages from browser, It is a long url and it points out a virtual file.
I set StyleSetPath "~/appResource" in WebPageStyler.
And in a httpmodule class I rewrite this virtual path.
Where is my problem?
when I open the source part of my page from browser:
Instead of I can see many urls correctly (i.e:
img src='../../appResource/Office2007Silver/images/ig_treePlus.gif' imgType='exp' />),
there are some missing parts in some css hrefs (ie: <link href='../../app_resource/datenwerk.webforms.dll/datenwerk.webforms/appresource/office2007silver/ig_shared.css' type='text/css' rel='stylesheet' />)
What I want to see is to have this path shown as href='../../appresource/office2007silver/ig_shared.css') as like as the other style objects.
It is a bit hard to get the whole scenario right, the tilde slash syntax "~/" will always instruct the framework to replace "~/" with the path from the current page the control is located in to the root of the virtual application, so if you have your forms nested several levels down, ~/ will always match the full path.
Are you using custom Url Rewriting module? I am not sure what to advise you in this situation. Is it possible for you to use a separate virtual folder for the resources, e.g. "/ig_common" and map to there? Could be easier than trying to use Url Rewriting with stylesets and sub-frameworks nested levels deep the site.
Thanks. I solved that problem
In the code behind of embedded webform in assembly,
protected override void OnPreInit(EventArgs e) { base.OnPreInit(e);
this.AppRelativeTemplateSourceDirectory = "~/CurrentVirtualDirectory"; this.AppRelativeVirtualPath = "~/CurrentVirtualFile"; }