开发者

asp.net treeview not rendering custom expand and collapse images

I've got a Treeview inside an Updatepanel, currently I'm developing directly on a dev server with a remote connection to it. I've set the CollapseImageUrl and ExpandImageUrl properties and when I view it on the dev servers开发者_开发百科' browser it renders fine.

It produces:

<td><a id="tvPartyRolesn0" href="javascript:TreeView_ToggleNode(tvPartyRoles_Data,0,tvPartyRolesn0,' ',tvPartyRolesn0Nodes)"><img src="Images/expanded.gif" alt="Expand EUGEN MAY(0)" style="border-width:0;" /></a></td><td style="white-space:nowrap;"><a class="tvPartyRoles_0" href="javascript:__doPostBack('tvPartyRoles','s419f4890-31ef-4216-a518-e8faabe24349')" onclick="TreeView_SelectNode(tvPartyRoles_Data, this,'tvPartyRolest0');" id="tvPartyRolest0">EUGEN MAY(0)</a></td>

However, when I view it from my local pc (same url, exactly the same browser: IE 8) it doesn't render the expand image and the generated html is different:

<td><img src="/WebResource.axd?d=NqoU8iloxnxrlj-ZMUKCyamdjzSBKRr3z953sczo15w8GlcBeb28IywRWdNJp1sMt7Amde05goEj7xS55cTJgC-vUieKdef5bZnLtb6RuEJoxUlM0&amp;t=634208849469717278" alt="" /></td><td style="white-space:nowrap;"><a class="tvPartyRoles_0" href="javascript:__doPostBack('tvPartyRoles','s419f4890-31ef-4216-a518-e8faabe24349')" onclick="TreeView_SelectNode(tvPartyRoles_Data, this,'tvPartyRolest0');" id="tvPartyRolest0">EUGEN MAY(0)</a></td>

Any ideas why this happens?


It's probably the leading /, are you viewing it from a virtual directory on your local machine?

If you are running http://localhost/Project then the / will cause the treeview to look for the images at http://localhost/WebResource.axd when it should be looking at http://localhost/Project/WebResource.axd

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜