打开aspx文件而不在地址栏中输入文件名... [英] open aspx file without typing file name in Address bar...

查看:125
本文介绍了打开aspx文件而不在地址栏中输入文件名...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,你全部...
我回来了一些有趣的小问题.
上次我得到了很好的回应...对此表示感谢...
现在我的下一个问题...
在vs2008中,如果在asp.net(C#)中创建了一个小项目

我将Default.aspx设置为启动页面...现在,当我第一次运行项目时,将执行Default.aspx.

http://myproject/Default.aspx

但是...如果我在addressBar中输入Sub目录名,则需要文件名...
例如:
http://myproject/user/login.aspx

现在我想要如果我在地址栏中输入(http://myproject/user)

它将自动移至(http://myproject/user/login.aspx)

我已经知道它是由子虚拟目录处理的.但是在vs 2008中,我该如何设置.
通过使用webconfig或其他的东西或什么?
我想要如何为子目录设置startUpPage ....
我必须做什么设置...

注意*
我没有权限在服务器端建立subVirtual目录.
我只需要发布项目,然后使用filezilla上传它即可....

朴素帮我..
提前谢谢..
.

Hello All of u ...
I am back with some more little interesting Questions.
Last time I got good response...for that thanks...
Now My next Question...
in vs2008 if created a little project in asp.net(C#)

I set a Default.aspx as set a startup page...Now when i run my project firstly Default.aspx is executed.

http://myproject/Default.aspx

But ... If I type Sub directory name in addressBar it requires file name...
Ex:
http://myproject/user/login.aspx

Now I wants If I type ( http://myproject/user ) in address bar

it will autometically move to ( http://myproject/user/login.aspx )

I already know it is handle by sub virtual directory.. but in vs 2008 How can i set.
By using webconfig or using something Else or what ?
I wants how to set startUpPage for subdiretories....
What setting i have to do......

Note *
I dont have priviliges to make subVirtual directory on server side.
I have to just publish my project and by using filezilla upload it....

Plaese help me ..
Thanks in aadvance..
.

推荐答案

您可以尝试技巧:在用户文件夹中添加"Default.aspx",然后再通过"Default.aspx"进行服务器或浏览器重定向进入登录页面.
You could try a trick: add a "Default.aspx" in the user folder, and that "Default.aspx" then does a server or browser redirect to your login page.


执行此操作的简单方法实际上取决于您是否有权访问Web服务器设置以及Web服务器是否正在运行足够高的IIS版本.基本上,您要在此处尝试使用 URL重写 [ ^ ].如果您按照我刚刚给您的教程进行操作,则应该可以轻松地对其进行设置.
The easy way to do this really depends on whether or not you have access to the web server settings and the web server is running a high enough version of IIS. Basically, what you are trying to do here is to use URL rewriting[^]. If you follow the tutorial I''ve just given you, you should be able to set it up easily enough.


不..您错了...基本上,如果我键入myproject /admin它会自动移至myproject/admin/adminlogin.aspx
No .. U r getting wrong... basically If I type myproject/admin It auto moves to myproject/admin/adminlogin.aspx


这篇关于打开aspx文件而不在地址栏中输入文件名...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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