日期:2014-05-17  浏览次数:20767 次

asp.net 链接地址改变问题
http://localhost:2487/400visa/nation_Germany.html  

问题,我如何才能把网址中的"nation" 隐藏起来,浏览网站时不显示,
代码为:
 <asp:Repeater ID="Repeatergq" runat="server">
                                      <ItemTemplate>
                                      <li><span class="gj1"><a href='nation_<%#Eval("couEname") %>.html'><img alt='<%#Eval("couname") %>' src='uploadimage/<%#Eval("CouImage2") %>'/></a></span> <span class="gj2"><a href='nation_<%#Eval("couEname") %>.html' class="gj2"><%#Eval("couName") %></a></span></li>
                                      </ItemTemplate>
                                      </asp:Repeater>


图片传不上去,nation.aspx是模板页面

------解决方案--------------------
重写URL
在web.config中
<!--注册-->
<configSections>
<section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter"/>
</configSections>
<rewriter>
<!--重写规则-->
<rewrite url="^/400visa/nation_Germany.html " to="/400visa/Germany.html" processing="stop"/>
</rewriter>
------解决方案--------------------
有种办法。你永远访问的都是主页面。
就是只在站内迁移。
http://bbs.csdn.net/
类似这种。你点任何一个板块都是在同一个网址。但是内容却不一样。