为什么我们在C#中使用Common.GetBaseURL [英] why we use Common.GetBaseURL in c#

查看:133
本文介绍了为什么我们在C#中使用Common.GetBaseURL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请有人告诉我们为什么我们在c#中使用Common.GetBaseURL,例如

Pls some one tell that why we use Common.GetBaseURL in c# like

<td align="center" width="15%">
                                    <a href='<%=Common.GetBaseURL%>Admin/AddPropertyDetail.aspx' class="Black10pt">Add Propert
                                        Detail </a>
                                </td>




我想知道为什么有人使用此代码.请有人告诉....




i want to know why someone used this code. pls some one tell....

推荐答案

如果没有其他原因,它允许代码在实时生产站点和开发服务器上运行而无需修改.如果它不存在,则必须在某处指定要用于访问要从其执行域的URL,并确保在将代码发布到生产环境时正确更改它.
If no other reason, it allows code to work without modification on both the live production site and the developement server. If it didn''t exist, you would have to somewhere specify the URL to use to access the domain from which you are executing, and make sure you change it correctly when you release teh code to production.


这篇关于为什么我们在C#中使用Common.GetBaseURL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆